re PR fortran/45187 (ICE with CRAY pointer in module)

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: r211367
This commit is contained in:
Francois-Xavier Coudert 2014-06-09 09:25:14 +00:00 committed by François-Xavier Coudert
parent 122032d2ae
commit f84c6bd920
4 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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,

View File

@ -4278,8 +4278,8 @@ gfc_create_module_variable (gfc_symbol * sym)
}
/* 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. */

View File

@ -1,3 +1,8 @@
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)

View File

@ -0,0 +1,18 @@
! { 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