This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51993] Erroneous type component initialization leads to internal compiler error


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]