* trans-decl.c (gfc_create_module_variable): Don't create
Cray-pointee decls twice.
* gfortran.dg/cray_pointers_10.f90: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211367
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/45187
+ * trans-decl.c (gfc_create_module_variable): Don't create
+ Cray-pointee decls twice.
+
2014-06-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* io.c (resolve_tag): Warn on non-default kind for NUMBER,
}
/* Don't generate variables from other modules. Variables from
- COMMONs will already have been generated. */
- if (sym->attr.use_assoc || sym->attr.in_common)
+ COMMONs and Cray pointees will already have been generated. */
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
return;
/* Equivalenced variables arrive here after creation. */
+2014-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/45187
+ * gfortran.dg/cray_pointers_10.f90: New file.
+
2014-06-09 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/gomp/udr6.f90 (f1, f2, f3): Use complex(kind=8)
--- /dev/null
+! { dg-do run }
+! { dg-options "-fcray-pointer" }
+!
+! PR fortran/45187
+!
+module foo
+ implicit none
+ real :: a
+ pointer(c_a, a)
+end module foo
+
+program test
+ use foo
+ real :: z
+ c_a = loc(z)
+ a = 42
+ if (z /= 42) call abort
+end program test