Problem with a program: zero-sized array?

Arjen Markus arjen.markus895@gmail.com
Thu Oct 14 07:54:00 GMT 2010


Hello Tobias,

thanks for looking into this. So it is reproduceable in a very small program ...

Regards,

Arjen

2010/10/13 Tobias Burnus <burnus@net-b.de>:
>  On 10/13/2010 12:48 PM, Arjen Markus wrote:
>>
>> Hello,
>>
>> I have run into a peculiar problem with the gfortran compiler (both on
>> Windows and Linux).
>> I have reduced the program to a bare minimum and that has made the
>> crash (access violation or something similarly fatal) disappear, but the
>> bug is still there.
>
> Small test case which crashes here:
>    integer, dimension(10)             :: int1d
>    integer, dimension(:), pointer     :: int1d_retrieved
>
>    allocate(int1d_retrieved(10))
>    if (any(shape(int1d_retrieved) /= shape(INT1D))) call abort()
>    end
>
> The crash happens in the last line when the two shapes are compared; in the
> big program, the same crash happened for:
>    write(*,*) 'shape:', shape(int1d_retrieved) == shape(INT1D), '...'
> The rest of the big program seems to work. I think it should be easy to find
> the reason in the -fdump-tree-original for the shape(int1d_retrieved) ==
> shape(INT1D) comparison, but I have not tried it, yet.
>
> I get the crash with GCC 4.1 to 4.6 and thus it does not seem to be a
> regression.
>
> Can you fill a PR?
>
> Tobias
>



More information about the Fortran mailing list