Backport from trunk
PR fortran/45187
* trans-decl.c (gfc_create_module_variable): Don't create
Cray-pointee decls twice.
* gfortran.dg/cray_pointers_10.f90: New file.
From-SVN: r211688
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ Backport from trunk.
+ PR fortran/45187
+ * trans-decl.c (gfc_create_module_variable): Don't create
+ Cray-pointee decls twice.
+
2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
Backport from mainline
}
/* 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-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ Backport from trunk.
+ PR fortran/45187
+ * gfortran.dg/cray_pointers_10.f90: New file.
+
2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
Backport from mainline
--- /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