From 7258a2576581f90c5ba8399e6f6ba6c36a16ff86 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Aug 2014 12:23:13 +0200 Subject: re PR fortran/62131 (OpenMP: Subobject of an allocatable array not allowed in OMP ATOMIC) PR fortran/62131 * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr is allocatable, rather than whenever var->attr.allocatable. * gfortran.dg/gomp/pr62131.f90: New test. Co-Authored-By: Tobias Burnus From-SVN: r214010 --- gcc/fortran/openmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/openmp.c') diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 49c3b9e..217fce7 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -2744,7 +2744,7 @@ resolve_omp_atomic (gfc_code *code) break; } - if (var->attr.allocatable) + if (gfc_expr_attr (code->expr1).allocatable) { gfc_error ("!$OMP ATOMIC with ALLOCATABLE variable at %L", &code->loc); -- cgit v1.1