]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP/Fortran: Ensure allocator is gimplified for 'omp allocate'
authorTobias Burnus <tobias@codesourcery.com>
Mon, 30 Oct 2023 09:53:29 +0000 (10:53 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 30 Oct 2023 09:53:29 +0000 (10:53 +0100)
commit2cbf164c7fd0b84bf3ed361188b8cb014f25a900
tree8eea9107c6a73f13994957cb2fd6a3b5f735e987
parentf0d163da425049242cc327d7036873040572836a
OpenMP/Fortran: Ensure allocator is gimplified for 'omp allocate'

Without this change, we we get an ICE in verify_gimple_call for
GOMP_allocate when doing a late replacement in omp-low.cc

gcc/fortran/ChangeLog:

       * trans-openmp.cc (gfc_trans_omp_clauses): Avoid gfc_evaluate_now
       for allocator with indirect ref for better diagnostic.

gcc/ChangeLog:

* gcc/gimplify.cc (gimplify_omp_allocate): Gimplify allocator.
* omp-low.cc (lower_omp_allocate): Simplify; GOMP_free can also
take a plain 0 as allocator argument (arg is unused in libgomp).

libgomp/ChangeLog:

* testsuite/libgomp.fortran/allocate-8a.f90: New test.
gcc/ChangeLog.omp
gcc/fortran/ChangeLog.omp
gcc/fortran/trans-openmp.cc
gcc/gimplify.cc
gcc/omp-low.cc
libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.fortran/allocate-8a.f90 [new file with mode: 0644]