commit e374d415801588435d62ac214e0313ffd3ef2198
Author: Julian Brown <julian@codesourcery.com>
Date: Thu Feb 14 16:40:21 2019 -0800
[og8] Don't rescan "attach" node for dereferenced struct member
gcc/
* gimplify.c (gimplify_scan_omp_clauses): Avoid scanning 'c' again
after creating base-pointer nodes for dereferenced struct.
gcc/testsuite/
* gfortran.dg/goacc/derived-types-2.f90: New.
@@ -8289,8 +8289,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
*list_p = c2;
OMP_CLAUSE_CHAIN (c2) = c3;
OMP_CLAUSE_CHAIN (c3) = c;
- c = c3;
- list_p = &OMP_CLAUSE_CHAIN (c3);
struct_deref_set->add (decl);
}
new file mode 100644
@@ -0,0 +1,14 @@
+module bar
+ type :: type1
+ real(8), pointer, public :: p(:) => null()
+ end type
+ type :: type2
+ class(type1), pointer :: p => null()
+ end type
+end module
+
+subroutine foo (var)
+ use bar
+ type(type2), intent(inout) :: var
+ !$acc enter data create(var%p%p)
+end subroutine