summaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-15 10:23:13 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-15 10:23:13 +0000
commit79e690dfd84e6c9600db0ab3ddeb7b4cfc58aa52 (patch)
tree9b4e0aa1f7dec4be8ba7da062efc4bd34dccd18b /gcc/fortran/openmp.c
parenta2588a5b8c3e413b4fed128f7e45409462fa5bcb (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 49c3b9e86c1a..217fce73828d 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);