https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84834
Bug ID: 84834 Summary: [7/8 Regression] ICE: tree check: expected integer_cst, have complex_cst in to_wide, at tree.h:5527 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20161204 and 20161211 : $ cat z1.c _Complex int foo (int a) { return (a < 0); } $ gcc-7-20161204 -c z1.c $ $ gcc-8-20180311 -c z1.c z1.c: In function 'foo': z1.c:3:3: internal compiler error: tree check: expected integer_cst, have complex_cst in to_wide, at tree.h:5527 return (a < 0); ^~~~~~ 0x606bdf tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9337 0x965404 tree_check(tree_node const*, char const*, int, char const*, tree_code) ../../gcc/tree.h:3388 0x965404 wi::to_wide(tree_node const*) ../../gcc/tree.h:5527 0x116b24d generic_simplify_COND_EXPR .../gcc/generic-match.c:46976 0x11a6e50 generic_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*) .../gcc/generic-match.c:47541 0x943cc5 fold_ternary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:11324 0x946113 fold_build3_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:12388 0x94ac53 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:9381 0x9651b4 fold(tree_node*) ../../gcc/fold-const.c:11965 0x7202b4 convert_and_check(unsigned int, tree_node*, tree_node*) ../../gcc/c-family/c-common.c:1543 0x6c18e5 convert_for_assignment ../../gcc/c/c-typeck.c:6565 0x6c371d c_finish_return(unsigned int, tree_node*, tree_node*) ../../gcc/c/c-typeck.c:10166 0x70ce54 c_parser_statement_after_labels ../../gcc/c/c-parser.c:5453 0x7083ca c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:5078 0x708b16 c_parser_compound_statement ../../gcc/c/c-parser.c:4912 0x70a2c0 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2341 0x712733 c_parser_external_declaration ../../gcc/c/c-parser.c:1644 0x7131a9 c_parser_translation_unit ../../gcc/c/c-parser.c:1524 0x7131a9 c_parse_file() ../../gcc/c/c-parser.c:18411 0x76ddb5 c_common_parse_file() ../../gcc/c-family/c-opts.c:1132