The following code, with default options,

  module m
    implicit none
    type t
      integer :: i
    end type t
    type(t), dimension(1), parameter :: a1  = (/ t(1) /)
    type(t), dimension(1), parameter :: a = reshape ( (/ a1 /), (/ 1 /) )
  end module m

triggers:

  f951: internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:4208

in

  GNU Fortran (GCC) 4.6.0 20100726 (experimental)

The code compiles with the NAG compiler, as it should.  gfortran also compiles
the equivalent code for INTEGERS instead of the derived type.

Maybe there is a relation to bug #44742.


-- 
           Summary: ICE in gfc_conv_array_initializer, at fortran/trans-
                    array.c:4208
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ohl at physik dot uni-wuerzburg dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to