https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70260

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---
Another situation :


$ cat z3.f90
subroutine s (f)
   integer, external :: f, g
   integer :: h
   g = f(2)
   h = g(2)
end


$ gfortran-6 -c z3.f90
gimplification failed:
g <addr_expr 0x2abc6cdf6d20
    type <pointer_type 0x2abc6ce1d150
        type <function_type 0x2abc6ce1d0a8 type <integer_type 0x2abc6cc617e0
integer(kind=4)>
            QI
            size <integer_cst 0x2abc6cc5dcc0 constant 8>
            unit size <integer_cst 0x2abc6cc5dcd8 constant 1>
            align 8 symtab 0 alias set -1 canonical type 0x2abc6cc7e738
            attributes <tree_list 0x2abc6ce1bbb8
                purpose <identifier_node 0x2abc6cdf9f50 fn spec>
                value <tree_list 0x2abc6ce1bb90
                    value <string_cst 0x2abc6ce166d8 constant ".">>>
            pointer_to_this <pointer_type 0x2abc6ce1d150>>
        unsigned DI
        size <integer_cst 0x2abc6cc5dbd0 constant 64>
        unit size <integer_cst 0x2abc6cc5dbe8 constant 8>
        align 64 symtab 0 alias set -1 canonical type 0x2abc6ce1d1f8>
    constant
    arg 0 <function_decl 0x2abc6ce1c540 g type <function_type 0x2abc6ce1d0a8>
        addressable used public external QI file z3.f90 line 2 col 0 align 8
context <translation_unit_decl 0x2abc6cc67168 D.3415>
        chain <function_decl 0x2abc6ce1c460 s type <function_type
0x2abc6ce1d3f0>
            public static QI file z3.f90 line 1 col 0 align 8 context
<translation_unit_decl 0x2abc6cc67168 D.3415> initial <block 0x2abc6ce1f0c0>
result <result_decl 0x2abc6cc671e0 D.3417>
            (mem:QI (symbol_ref:DI ("s_") [flags 0x3] <function_decl
0x2abc6ce1c460 s>) [0  S1 A8]) arguments <parm_decl 0x2abc6ce0b200 f>
            struct-function 0x2abc6ce1d498 chain <function_decl 0x2abc6ce1c380
_gfortran_st_set_nml_var_dim>>>
    z3.f90:4:0 start: z3.f90:4:0 finish: z3.f90:4:0>
z3.f90:4:0:

    g = f(2)

internal compiler error: gimplification failed



Before :

$ gfortran-5 -c z3.f90
z3.f90:4:0:

    g = f(2)
 ^
internal compiler error: in gimplify_expr, at gimplify.c:9063



Working variant :

$ cat z4.f90
subroutine s (f)
   integer, external :: f, g
   integer :: h
   h = f(2)
   h = g(2)
end

Reply via email to