[Bug fortran/83196] ICE in gfc_build_compare_string, at fortran/trans-expr.c:3609 (and others)

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Nov 28 17:05:00 GMT 2017


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

--- Comment #2 from G. Steinmetz <gscfq@t-online.de> ---

Slightly modified :


$ cat z3.f90
program p
   call s
contains
   subroutine s
      if ( f /= '' ) call abort
   end
   character(3) function f()
      f = ''
   end
end


$ gfortran-8-20171126 -c z3.f90 -O2
z3.f90:5:0:

       if ( f /= '' ) call abort

internal compiler error: Segmentation fault
0xb6848f crash_signal
        ../../gcc/toplev.c:325
0x94ef4d is_gimple_reg_type
        ../../gcc/gimple-expr.h:75
0x94ef4d gimplify_arg(tree_node**, gimple**, unsigned int, bool)
        ../../gcc/gimplify.c:3061
0x95a23c gimplify_call_expr
        ../../gcc/gimplify.c:3309
0x953e10 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11312
0x953a3c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:12070
0x9598fc gimplify_cond_expr
        ../../gcc/gimplify.c:3957
0x9543f0 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11297
0x956d26 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6556
0x9545cb gimplify_statement_list
        ../../gcc/gimplify.c:1736
0x9545cb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11769
0x956d26 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6556
0x95827f gimplify_bind_expr
        ../../gcc/gimplify.c:1294
0x954510 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.c:11541
0x956d26 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.c:6556
0x958ac1 gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.c:12538
0x958ea5 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.c:12696
0xbebb22 gimplify_all_functions
        ../../gcc/tree-nested.c:3318
0xbebb07 gimplify_all_functions
        ../../gcc/tree-nested.c:3320
0xbefd5f lower_nested_functions(tree_node*)
        ../../gcc/tree-nested.c:3337


More information about the Gcc-bugs mailing list