This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51993] Erroneous type component initialization leads to internal compiler error
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 11:01:39 +0000
- Subject: [Bug fortran/51993] Erroneous type component initialization leads to internal compiler error
- Auto-submitted: auto-generated
- References: <bug-51993-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51993
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid,
| |diagnostic,
| |ice-on-invalid-code
CC| |burnus at gcc dot gnu.org
Version|fortran-dev |4.7.0
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-25 11:01:39 UTC ---
I can reproduce the ICE. It compiles with GCC 4.1 (without further diagnostic)
but it crashes with 4.3 to 4.7. (If one uses the DT without specifying an
initialization, GCC 4.1 prints an error.)
There are also other variants, which crash, e.g.
type :: mytyp
character(len=.true.) :: a = '3'
end type mytyp
which diagnoses the error without the initializer "= '3'".
No error but nevertheless invalid: Initialization of a scalar with an array
type :: mytyp
character(len=4) :: a = ['a','3']
end type mytyp