This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR45081 - [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org, mikael dot morin at sfr dot fr
- Date: Mon, 20 Sep 2010 19:19:28 +0200
- Subject: Re: [Patch, fortran] PR45081 - [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
- References: <20100920092642.A3A773BE0F@mailhost.lps.ens.fr>
Dear Dominique,
> While the test case succeeds, the following code still gives an ICE
>
> [macbook] f90/bug% cat pr45081_red_1.f90
> ?module m
> ? ?implicit none
> ? ?type t
> ? ? ?integer :: i
> ? ?end type t
> ? ?type(t), dimension(2), parameter :: a1 ?= (/ t(1), t(2) /)
> ? ?type(t), dimension(2), parameter :: c = spread ( a1(1), 1, 1 )
> ?end module m
> end
> [macbook] f90/bug% gfc pr45081_red_1.f90
> f951: internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:4333
>
> AFAICT the code is valid (if not, it should not give an ICE). Unless you have an obvious fix,
I have just realised that the code is not valid; the shape of the
result is (1,2). If you change the dimension of c accordingly, the
example compiles.
What is wrong is that this is not diagnosed.
Cheers
Paul