https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70260
Bug ID: 70260 Summary: ICE: gimplification failed Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A situation where gimplification fails : $ cat z1.f90 module m interface gkind procedure g end interface contains integer function g() g => 1 end subroutine f(x) character(kind=kind(gkind())) :: x end end $ gfortran-6 -c z1.f90 gimplification failed: &__result_g <addr_expr 0x2af0602cbdc0 type <pointer_type 0x2af06014b930 type <integer_type 0x2af0601367e0 integer(kind=4) public SI size <integer_cst 0x2af060132e10 constant 32> unit size <integer_cst 0x2af060132e28 constant 4> align 32 symtab 0 alias set -1 canonical type 0x2af0601367e0 precision 32 min <integer_cst 0x2af060132dc8 -2147483648> max <integer_cst 0x2af060132de0 2147483647> pointer_to_this <pointer_type 0x2af06014b930>> unsigned DI size <integer_cst 0x2af060132bd0 constant 64> unit size <integer_cst 0x2af060132be8 constant 8> align 64 symtab 0 alias set -1 canonical type 0x2af06014b930> arg 0 <var_decl 0x2af05ef7e990 __result_g type <integer_type 0x2af0601367e0 integer(kind=4)> addressable used decl_5 SI file z1.f90 line 6 col 0 size <integer_cst 0x2af060132e10 32> unit size <integer_cst 0x2af060132e28 4> align 32 context <function_decl 0x2af0602f1540 g>> z1.f90:7:0 start: z1.f90:7:0 finish: z1.f90:7:0> z1.f90:7:0: g => 1 internal compiler error: gimplification failed Before : $ gfortran-5 -c z1.f90 z1.f90:7:0: g => 1 ^ internal compiler error: in gimplify_expr, at gimplify.c:9063 Working variant : $ cat z2.f90 module m interface gkind procedure g end interface contains integer function g() g = 1 end subroutine f(x) character(kind=kind(gkind())) :: x end end