https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93812
Bug ID: 93812 Summary: [9/10 Regression] ICE in get_constant, at c-family/c-format.c:325 Product: gcc Version: 10.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 20181111 and 20181118 : $ cat z1.c void f(void) { __attribute__((__format__(__gcc_gfc__, 1, 2))) void f() ; f(); } $ gcc-9-20181111 -c z1.c -Wall $ $ gcc-10-20200216 -c z1.c -Wall z1.c: In function 'f': z1.c:4:3: warning: 'format' attribute argument 2 value '1' exceeds the number of function parameters 0 [-Wattributes] 4 | f(); | ^ z1.c:4:3: internal compiler error: in get_constant, at c-family/c-format.c:325 0x6a1b4b get_constant ../../gcc/c-family/c-format.c:325 0x6a1b4b decode_format_attr ../../gcc/c-family/c-format.c:378 0x6a1f77 check_function_format(tree_node const*, tree_node*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ../../gcc/c-family/c-format.c:1183 0x6960e5 check_function_arguments(unsigned int, tree_node const*, tree_node const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ../../gcc/c-family/c-common.c:5726 0x62e77c build_function_call_vec(unsigned int, vec<unsigned int, va_heap, vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc, vl_embed>*, tree_node*) ../../gcc/c/c-typeck.c:3117 0x64c4c1 c_parser_postfix_expression_after_primary ../../gcc/c/c-parser.c:10494 0x63e66b c_parser_postfix_expression ../../gcc/c/c-parser.c:10169 0x648252 c_parser_unary_expression ../../gcc/c/c-parser.c:8266 0x64927f c_parser_cast_expression ../../gcc/c/c-parser.c:8108 0x649539 c_parser_binary_expression ../../gcc/c/c-parser.c:7911 0x64a3e5 c_parser_conditional_expression ../../gcc/c/c-parser.c:7645 0x64a930 c_parser_expr_no_commas ../../gcc/c/c-parser.c:7562 0x64ab92 c_parser_expression ../../gcc/c/c-parser.c:10630 0x64b22b c_parser_expression_conv ../../gcc/c/c-parser.c:10663 0x65ac7b c_parser_statement_after_labels ../../gcc/c/c-parser.c:6294 0x65cd82 c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:5800 0x65d516 c_parser_compound_statement ../../gcc/c/c-parser.c:5616 0x65ed35 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2504 0x665d67 c_parser_external_declaration ../../gcc/c/c-parser.c:1746 0x666889 c_parser_translation_unit ../../gcc/c/c-parser.c:1619