https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83197
Bug ID: 83197
Summary: ICE in strip_float_extensions, at tree.c:11935
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Depending on function, at different optimization levels :
$ cat z1.c
double sqrt ();
void f (float a)
{
a = sqrt ();
}
$ cat z2.c
double sin ();
void f (float a)
{
a = sin ();
}
$ gcc-8-20171126 -c z1.c -O0
$ gcc-8-20171126 -c z1.c -O1
z1.c: In function 'f':
z1.c:4:3: internal compiler error: Segmentation fault
a = sqrt ();
^
0xac9f1f crash_signal
../../gcc/toplev.c:325
0xcfa588 strip_float_extensions(tree_node*)
../../gcc/tree.c:11935
0x787b30 convert_to_real_1
../../gcc/convert.c:197
0x682148 convert(tree_node*, tree_node*)
../../gcc/c/c-convert.c:137
0x6b6003 convert_and_check(unsigned int, tree_node*, tree_node*)
../../gcc/c-family/c-common.c:1557
0x66eaf9 convert_for_assignment
../../gcc/c/c-typeck.c:6509
0x67d54c build_modify_expr(unsigned int, tree_node*, tree_node*, tree_code,
unsigned int, tree_node*, tree_node*)
../../gcc/c/c-typeck.c:5956
0x692d16 c_parser_expr_no_commas
../../gcc/c/c-parser.c:6739
0x692eb2 c_parser_expression
../../gcc/c/c-parser.c:9476
0x694729 c_parser_expression_conv
../../gcc/c/c-parser.c:9509
0x6a50ec c_parser_statement_after_labels
../../gcc/c/c-parser.c:5667
0x6a1265 c_parser_compound_statement_nostart
../../gcc/c/c-parser.c:5179
0x6a19aa c_parser_compound_statement
../../gcc/c/c-parser.c:5012
0x6a310e c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:2343
0x6a98f3 c_parser_external_declaration
../../gcc/c/c-parser.c:1656
0x6aa369 c_parser_translation_unit
../../gcc/c/c-parser.c:1536
0x6aa369 c_parse_file()
../../gcc/c/c-parser.c:19041
0x6f15b5 c_common_parse_file()
../../gcc/c-family/c-opts.c:1127
$ gcc-8-20171126 -c z2.c -O2
$ gcc-8-20171126 -c z2.c -O3
$ gcc-8-20171126 -c z2.c -Ofast
z2.c: In function 'f':
z2.c:4:3: internal compiler error: Segmentation fault
#...