This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/58904] New: ICE: accessing a component field of an unavailable type results in a seg fault
- From: "kimwooyoung at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Oct 2013 14:55:06 +0000
- Subject: [Bug fortran/58904] New: ICE: accessing a component field of an unavailable type results in a seg fault
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58904
Bug ID: 58904
Summary: ICE: accessing a component field of an unavailable
type results in a seg fault
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: kimwooyoung at gmail dot com
The following code causes gfortran 4.8.2 to die with a seg fault.
(Ubuntu 12.10, intel64 (i.e., 64-bit x86) )
MODULE mymod
CONTAINS
TYPE(mytype) FUNCTION create_sort_range(b) result(r)
INTEGER b
r%b = b
END FUNCTION create_sort_range
END MODULE mymod
The compiler produces the correct error message if the statement 'r%b = b' is
commented out.
$ gfortran -c repro.F90
f951: internal compiler error: Segmentation fault
0x869cbf crash_signal
../../gcc-4.8.2/gcc/toplev.c:332
0x555765 gfc_match_varspec(gfc_expr*, int, bool, bool)
../../gcc-4.8.2/gcc/fortran/primary.c:1944
0x555d31 match_variable
../../gcc-4.8.2/gcc/fortran/primary.c:3304
0x537eb9 gfc_match(char const*, ...)
../../gcc-4.8.2/gcc/fortran/match.c:1115
0x53925c gfc_match_assignment()
../../gcc-4.8.2/gcc/fortran/match.c:1292
0x54cb69 match_word
../../gcc-4.8.2/gcc/fortran/parse.c:65
0x54db6b match_word
../../gcc-4.8.2/gcc/fortran/parse.c:327
0x54db6b decode_statement
../../gcc-4.8.2/gcc/fortran/parse.c:327
0x54f154 next_free
../../gcc-4.8.2/gcc/fortran/parse.c:783
0x54f154 next_statement
../../gcc-4.8.2/gcc/fortran/parse.c:976
0x54f8ed parse_spec
../../gcc-4.8.2/gcc/fortran/parse.c:2760
0x551738 parse_progunit
../../gcc-4.8.2/gcc/fortran/parse.c:4124
0x551ac0 parse_contained
../../gcc-4.8.2/gcc/fortran/parse.c:4063
0x552c7f parse_module
../../gcc-4.8.2/gcc/fortran/parse.c:4322
0x552c7f gfc_parse_file()
../../gcc-4.8.2/gcc/fortran/parse.c:4593
0x58e365 gfc_be_parse_file
../../gcc-4.8.2/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.