ICE on valid code, duplicate bug or new?

Neilen Marais nmarais@gmail.com
Thu Jun 9 11:21:00 GMT 2005


Hi!

On Thu, 2005-06-09 at 08:52 +0200, Carsten Lemmen wrote:
> Invalid code, blah needs to be integer-valued
> 
> SUBROUTINE GW_S_PARAMS
>    IMPLICIT NONE
> 
>    REAL(KIND(1.0)), DIMENSION(6) :: ell
>    REAL(KIND(1.0)), DIMENSION(3) :: ell_tri
>    INTEGER, DIMENSION(3) :: blah

Ah, it seems I made an error while reducing the test case. The original
indeed used integers, but used the return value of a function, rather
than a variable as the subscript.

The following ICEs
...

        ell_tri = ell(LOCAL_FACEEDGES(j_face))
...

while

INTEGER, DIMENSION(3) :: gfortran_tmp
...
        gfortran_tmp = LOCAL_FACEEDGES(j_face)
        ell_tri = ell(gfortran_tmp)
...

doesn't. And  the first snippet produces a different ICE, which is a
well known one I've run into before:

gw_sys.f90:926: internal compiler error: in gfc_conv_ss_descriptor, at
fortran/trans-array.c:1235

I've fixed several such ICEs throughout the code before by using
intermediate variables, but in this case accidentaly used REAL instead
of INTEGER, which led to the other ICE. While reducing the case I never
noticed that the ICE changed, just that there was indeed an ICE!

Regards
Neilen



More information about the Fortran mailing list