* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
@ 2014-06-08 15:59 ` fxcoudert at gcc dot gnu.org
2014-06-08 16:42 ` fxcoudert at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-08 15:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
Summary|ICE with CRAY pointer in |ICE with CRAY pointer in
|module depending on |module
|variable name |
--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Confirm on current trunk. Also, I have an idea why it depends on the variable
name :)
The ICE is observed with any variable name that is lexicographically smaller
than "c_" (i.e., that sorts before "c_" in alphabetical order). I suppose we're
trying to create backend decls for the POINTER in this order, and it fails when
the variable has already been created before it.
Since the error is a "checking" in gfc_create_module_variable(), and we
probably simply need to bail out if the symbol is a Cray-pointee, here's a
suggested patch:
Index: trans-decl.c
===================================================================
--- trans-decl.c (revision 211315)
+++ trans-decl.c (working copy)
@@ -4282,6 +4282,10 @@ gfc_create_module_variable (gfc_symbol *
if (sym->attr.use_assoc || sym->attr.in_common)
return;
+ /* Cray pointees will be created elsewhere. */
+ if (sym->attr.cray_pointee)
+ return;
+
/* Equivalenced variables arrive here after creation. */
if (sym->backend_decl
&& (sym->equiv_built || sym->attr.in_equivalence))
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
2014-06-08 15:59 ` [Bug fortran/45187] ICE with CRAY pointer in module fxcoudert at gcc dot gnu.org
@ 2014-06-08 16:42 ` fxcoudert at gcc dot gnu.org
2014-06-09 9:25 ` fxcoudert at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-08 16:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |fxcoudert at gcc dot gnu.org
--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Patch works, submitted for review:
https://gcc.gnu.org/ml/fortran/2014-06/msg00089.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
2014-06-08 15:59 ` [Bug fortran/45187] ICE with CRAY pointer in module fxcoudert at gcc dot gnu.org
2014-06-08 16:42 ` fxcoudert at gcc dot gnu.org
@ 2014-06-09 9:25 ` fxcoudert at gcc dot gnu.org
2014-06-09 9:29 ` fxcoudert at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-09 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
--- Comment #4 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Mon Jun 9 09:25:14 2014
New Revision: 211367
URL: http://gcc.gnu.org/viewcvs?rev=211367&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/cray_pointers_10.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-06-09 9:25 ` fxcoudert at gcc dot gnu.org
@ 2014-06-09 9:29 ` fxcoudert at gcc dot gnu.org
2014-06-15 19:22 ` fxcoudert at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-09 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.5
--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed on trunk, waiting a bit before backporting to 4.9 and 4.8 branches (as
per Paul Thomas' request).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-06-09 9:29 ` fxcoudert at gcc dot gnu.org
@ 2014-06-15 19:22 ` fxcoudert at gcc dot gnu.org
2014-06-15 19:35 ` fxcoudert at gcc dot gnu.org
2014-06-15 19:36 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-15 19:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
--- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Sun Jun 15 19:21:38 2014
New Revision: 211687
URL: https://gcc.gnu.org/viewcvs?rev=211687&root=gcc&view=rev
Log:
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.
Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/cray_pointers_10.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/trans-decl.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-06-15 19:22 ` fxcoudert at gcc dot gnu.org
@ 2014-06-15 19:35 ` fxcoudert at gcc dot gnu.org
2014-06-15 19:36 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-15 19:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
--- Comment #8 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Sun Jun 15 19:35:11 2014
New Revision: 211688
URL: https://gcc.gnu.org/viewcvs?rev=211688&root=gcc&view=rev
Log:
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.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/cray_pointers_10.f90
Modified:
branches/gcc-4_8-branch/gcc/fortran/ChangeLog
branches/gcc-4_8-branch/gcc/fortran/trans-decl.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/45187] ICE with CRAY pointer in module
[not found] <bug-45187-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-06-15 19:35 ` fxcoudert at gcc dot gnu.org
@ 2014-06-15 19:36 ` fxcoudert at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-15 19:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45187
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed on all three active branches.
^ permalink raw reply [flat|nested] 7+ messages in thread