f951: internal compiler error: in gfc_simplify_expr, at fortran/expr.c:1923

Janus Weil janus@gcc.gnu.org
Sun Jan 13 09:52:00 GMT 2013


Hi Tilo,

> Since the ICE sais it is in fortran/expr.c I thought I ask here first before
> filing a general bug report (having never done that for gcc).
>
> The program shown below gives an ICE:

thanks for reporting. I can confirm the ICE with version 4.6.x and
4.7.x. However, with trunk I get:

        procedure :: getx => pdf_point_getx
                 1
Error: Result mismatch for the overriding procedure 'getx' at (1):
Shape mismatch in dimension 1 of function result


When fixing this, by e.g. changing

>         real pdf_point_getx(2)

to

        real pdf_point_getx(this%dims)

I get back to the ICE:


f951: internal compiler error: in gfc_simplify_expr, at fortran/expr.c:1920
0x5751ca gfc_simplify_expr(gfc_expr*, int)
        /home/jweil/gcc48/trunk/gcc/fortran/expr.c:1920
0x59ef2a check_io_constraints
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3560
0x59f50e match_io
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3758
0x59f60c gfc_match_print()
        /home/jweil/gcc48/trunk/gcc/fortran/io.c:3802
0x5c6c83 match_word
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:65
0x5c8287 decode_statement
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:466
0x5c91d6 next_free
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:777
0x5c9632 next_statement
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:970
0x5cd343 parse_executable
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:3914
0x5cda67 parse_progunit
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4144
0x5ce590 gfc_parse_file()
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4548
0x61b4c1 gfc_be_parse_file
        /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:189


> If I change the wrong line
>     print pp%getx()
> to
>     print *, pp%getx()
> it compiles.

Yes, this seems to fix it.

I just filed it in bugzilla as PR55959:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55959

Cheers,
Janus



More information about the Fortran mailing list