https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107320
Bug ID: 107320 Summary: ICE in fold_binary_loc, at fold-const.cc:11329 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.c unsigned long long int c = 0ULL; void f () { if ( isascii(c) ) return; } $ gcc-13-20221016 -c z1.c z1.c: In function 'f': z1.c:4:8: warning: implicit declaration of function 'isascii' [-Wimplicit-function-declaration] 4 | if ( isascii(c) ) | ^~~~~~~ z1.c:4:16: warning: 'isascii' argument 1 type is 'long long unsigned int' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch] 4 | if ( isascii(c) ) | ^ <built-in>: note: built-in 'isascii' declared here z1.c:4:3: internal compiler error: in fold_binary_loc, at fold-const.cc:11329 4 | if ( isascii(c) ) | ^~ 0x9cf3c2 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.cc:11329 0x9cf62a fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.cc:13802 0x8689d3 fold_builtin_isascii ../../gcc/builtins.cc:8818 0x8689d3 fold_builtin_1 ../../gcc/builtins.cc:9667 0x86b6e7 fold_builtin_n ../../gcc/builtins.cc:9901 0x9e01fa fold(tree_node*) ../../gcc/fold-const.cc:13404 0x7dab2f c_fully_fold_internal ../../gcc/c/c-fold.cc:244 0x7dc049 c_fully_fold(tree_node*, bool, bool*, bool) ../../gcc/c/c-fold.cc:125 0x79ccfd build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, bool) ../../gcc/c/c-typeck.cc:12878 0x78b1c2 c_objc_common_truthvalue_conversion(unsigned int, tree_node*) ../../gcc/c/c-typeck.cc:13054 0x7b911e c_parser_condition ../../gcc/c/c-parser.cc:6500 0x7b91c7 c_parser_paren_condition ../../gcc/c/c-parser.cc:6519 0x7ce098 c_parser_if_statement ../../gcc/c/c-parser.cc:6698 0x7ce098 c_parser_statement_after_labels ../../gcc/c/c-parser.cc:6312 0x7cf9ca c_parser_compound_statement_nostart ../../gcc/c/c-parser.cc:5991 0x7d0243 c_parser_compound_statement ../../gcc/c/c-parser.cc:5800 0x7d1c64 c_parser_declaration_or_fndef ../../gcc/c/c-parser.cc:2651 0x7d944f c_parser_external_declaration ../../gcc/c/c-parser.cc:1833 0x7d9d7d c_parser_translation_unit ../../gcc/c/c-parser.cc:1695 0x7d9d7d c_parse_file() ../../gcc/c/c-parser.cc:24213