public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
@ 2012-08-31 23:24 mbeyer at cirrusaircraft dot com
2012-09-01 0:07 ` [Bug fortran/54443] " dominiq at lps dot ens.fr
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: mbeyer at cirrusaircraft dot com @ 2012-08-31 23:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
Bug #: 54443
Summary: Segmentation Fault when Compiling for code using
Fortran Polymorphic Entities
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mbeyer@cirrusaircraft.com
Created attachment 28113
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28113
Sample Code
$gfortran --version
GNU Fortran (GCC) 4.7.2 20120818 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
$gfortran -C class.f03 -o class
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
See attached code.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
@ 2012-09-01 0:07 ` dominiq at lps dot ens.fr
2012-09-01 0:30 ` dominiq at lps dot ens.fr
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-01 0:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-01 00:06:53 UTC ---
AFAICT the code is invalid:
pr54443.f90:43.25:
select type(hp%htype)
1
Error: Selector in SELECT TYPE at (1) is not a named variable; use
associate-name=>
...
>From my archives, it seems to have been fixed on trunk between revisions
187200, 2012-05-05 (Segmentation fault) and 187291, 2012-05-08 (errors) and it
has been introduced between revisions 182107, 2011-12-08 (errors) and 183001,
2012-01-27 (Segmentation fault).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
2012-09-01 0:07 ` [Bug fortran/54443] " dominiq at lps dot ens.fr
@ 2012-09-01 0:30 ` dominiq at lps dot ens.fr
2012-09-01 13:37 ` [Bug fortran/54443] [4.7/4.8 Regression] " janus at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-01 0:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-01 00:30:05 UTC ---
Compiling the following reduced test
program class_test
type hashnode
! character(12) :: name
character(4) :: htype
end type hashnode
class(hashnode), pointer :: hfirst,hcur,hp
select type(hp%htype)
end program class_test
gives an internal compiler error: Segmentation fault with trunk, but the error
pr54443_red.f90:8.25:
select type(hp%htype)
1
Error: Selector in SELECT TYPE at (1) is not a named variable; use
associate-name=>
if I uncomment the line character(12) :: name, while it still gives an ICE with
4.7.1.
The backtrace for trunk is
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
gfc_match_select_type () at ../../work/gcc/fortran/match.c:5438
5438 && (strcmp (CLASS_DATA (expr1)->name, "_data") == 0)
(gdb) bt
#0 gfc_match_select_type () at ../../work/gcc/fortran/match.c:5438
#1 0x0000000100078fea in match_word (subr=<value temporarily unavailable, due
to optimizations>, old_locus=0x100ea35e0) at ../../work/gcc/fortran/parse.c:67
#2 0x000000014180f750 in ?? ()
Previous frame inner to this frame (gdb could not unwind past this frame)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
2012-09-01 0:07 ` [Bug fortran/54443] " dominiq at lps dot ens.fr
2012-09-01 0:30 ` dominiq at lps dot ens.fr
@ 2012-09-01 13:37 ` janus at gcc dot gnu.org
2012-09-01 14:02 ` janus at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-01 13:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-09-01
CC| |janus at gcc dot gnu.org
Summary|Segmentation Fault when |[4.7/4.8 Regression]
|Compiling for code using |Segmentation Fault when
|Fortran Polymorphic |Compiling for code using
|Entities |Fortran Polymorphic
| |Entities
Ever Confirmed|0 |1
--- Comment #3 from janus at gcc dot gnu.org 2012-09-01 13:37:34 UTC ---
The test case in comment 2 ICEs on 4.7 and trunk, but gives the correct error
in 4.6, so it's a regression.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
` (2 preceding siblings ...)
2012-09-01 13:37 ` [Bug fortran/54443] [4.7/4.8 Regression] " janus at gcc dot gnu.org
@ 2012-09-01 14:02 ` janus at gcc dot gnu.org
2012-09-04 8:03 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-01 14:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #4 from janus at gcc dot gnu.org 2012-09-01 14:02:05 UTC ---
This is apparently a duplicate of PR 54435. The patch given there also fixes
the ICE here.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
` (3 preceding siblings ...)
2012-09-01 14:02 ` janus at gcc dot gnu.org
@ 2012-09-04 8:03 ` janus at gcc dot gnu.org
2012-09-07 10:48 ` [Bug fortran/54443] [4.7 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-04 8:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
--- Comment #5 from janus at gcc dot gnu.org 2012-09-04 08:03:16 UTC ---
Author: janus
Date: Tue Sep 4 08:03:09 2012
New Revision: 190910
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190910
Log:
2012-09-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/54435
PR fortran/54443
* match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
for BT_CLASS.
2012-09-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/54243
PR fortran/54244
* gfortran.dg/select_type_29.f03: New.
Added:
trunk/gcc/testsuite/gfortran.dg/select_type_29.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
` (4 preceding siblings ...)
2012-09-04 8:03 ` janus at gcc dot gnu.org
@ 2012-09-07 10:48 ` rguenth at gcc dot gnu.org
2012-09-10 12:10 ` janus at gcc dot gnu.org
2012-09-10 12:14 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-07 10:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.2
Priority|P3 |P4
Summary|[4.7/4.8 Regression] |[4.7 Regression]
|Segmentation Fault when |Segmentation Fault when
|Compiling for code using |Compiling for code using
|Fortran Polymorphic |Fortran Polymorphic
|Entities |Entities
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-07 10:48:22 UTC ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
` (5 preceding siblings ...)
2012-09-07 10:48 ` [Bug fortran/54443] [4.7 " rguenth at gcc dot gnu.org
@ 2012-09-10 12:10 ` janus at gcc dot gnu.org
2012-09-10 12:14 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-10 12:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
--- Comment #7 from janus at gcc dot gnu.org 2012-09-10 12:10:27 UTC ---
Author: janus
Date: Mon Sep 10 12:10:12 2012
New Revision: 191135
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191135
Log:
2012-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/54435
PR fortran/54443
* match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
for BT_CLASS.
2012-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/54435
PR fortran/54443
* gfortran.dg/select_type_29.f03: New.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/select_type_29.f03
Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/match.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/54443] [4.7 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
` (6 preceding siblings ...)
2012-09-10 12:10 ` janus at gcc dot gnu.org
@ 2012-09-10 12:14 ` janus at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-10 12:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from janus at gcc dot gnu.org 2012-09-10 12:14:27 UTC ---
Fixed on trunk and 4.7. Closing.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-10 12:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 23:24 [Bug fortran/54443] New: Segmentation Fault when Compiling for code using Fortran Polymorphic Entities mbeyer at cirrusaircraft dot com
2012-09-01 0:07 ` [Bug fortran/54443] " dominiq at lps dot ens.fr
2012-09-01 0:30 ` dominiq at lps dot ens.fr
2012-09-01 13:37 ` [Bug fortran/54443] [4.7/4.8 Regression] " janus at gcc dot gnu.org
2012-09-01 14:02 ` janus at gcc dot gnu.org
2012-09-04 8:03 ` janus at gcc dot gnu.org
2012-09-07 10:48 ` [Bug fortran/54443] [4.7 " rguenth at gcc dot gnu.org
2012-09-10 12:10 ` janus at gcc dot gnu.org
2012-09-10 12:14 ` janus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).