[Patch, fortran] PR45081 - [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208

Paul Richard Thomas paul.richard.thomas@gmail.com
Mon Sep 20 16:13:00 GMT 2010


Dear Dominique,

I found several such nasties in the course of fixing the immediate
problem.  Your example in comment #8 fails because the maximum size
for an array constructor is exceeded.  Rather than ICEing, there
should be an error together with the advice as to what to do.  You can
generate segfaults with 'spread' by having a shape mismatch between
initializer and the parameter.

Your example is legal and should work.  I'll take a quick look to see
if I can figure out the problem.

Cheers

Paul

On Mon, Sep 20, 2010 at 11:26 AM, Dominique Dhumieres
<dominiq@lps.ens.fr> wrote:
> Paul,
>
> 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,
> this hsould not delay the commit: I'll open a new PR for the above test.
>
> Thanks,
>
> Dominique
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list