[Bug fortran/50410] [4.6/4.7 Regression] ICE in record_reference

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 19 00:46:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50410

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #4 from kargl at gcc dot gnu.org 2011-09-18 23:31:53 UTC ---
(In reply to comment #2)
> The following produces a Segmentation fault in gfc_conv_structure (r178925)
> 
>       type t
>        integer g
>       end type
>       type(t) :: u=t(1)
>       data u%g /2/
>       end

The code is invalid and so gfortran can do anything that it
wishes, including segfault.

5.2.5 Data Statement

  ...
  A variable, or part of a variable, shall not be explicitly
  initialized more than once in a program.
  ...



More information about the Gcc-bugs mailing list