re PR fortran/92977 (ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526)
authorJakub Jelinek <jakub@redhat.com>
Wed, 18 Dec 2019 23:33:54 +0000 (00:33 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 18 Dec 2019 23:33:54 +0000 (00:33 +0100)
commita7a09efa24289b93d127ec41d5bec873d9fe000d
treea2e9663986bb3758ba550e3b6703a44580c889b9
parent601399c0dfc02bf97132816a5b16e14e768c9e5a
re PR fortran/92977 (ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526)

PR fortran/92977
* frontend-passes.c (in_omp_atomic): New variable.
(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
inline_matmul_assign, call_external_blas): Don't optimize in
EXEC_OMP_ATOMIC.
(optimize_namespace): Clear in_omp_atomic.
(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
it around.

* gfortran.dg/gomp/pr92977.f90: New test.

From-SVN: r279554
gcc/fortran/ChangeLog
gcc/fortran/frontend-passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr92977.f90 [new file with mode: 0644]