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

            Bug ID: 83966
           Summary: ICE in check_function_arguments at
                    gcc/c-family/c-common.c:5617
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org
  Target Milestone: ---

Starting from GCC 4.8.0, where the warning was added, we ICE on:

$ ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c
-c -Wsuggest-attribute=format
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:72:7:
warning: conflicting types for built-in function ‘scanf’
[-Wbuiltin-declaration-mismatch]
   int scanf (NO_PROTO);
       ^~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:73:7:
warning: conflicting types for built-in function ‘fscanf’
[-Wbuiltin-declaration-mismatch]
   int fscanf (NO_PROTO);
       ^~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:74:7:
warning: conflicting types for built-in function ‘sscanf’
[-Wbuiltin-declaration-mismatch]
   int sscanf (NO_PROTO);
       ^~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:78:7:
warning: conflicting types for built-in function ‘printf’
[-Wbuiltin-declaration-mismatch]
   int printf (NO_PROTO);
       ^~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:79:7:
warning: conflicting types for built-in function ‘fprintf’
[-Wbuiltin-declaration-mismatch]
   int fprintf (NO_PROTO);
       ^~~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:80:7:
warning: conflicting types for built-in function ‘sprintf’
[-Wbuiltin-declaration-mismatch]
   int sprintf (NO_PROTO);
       ^~~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:82:7:
warning: conflicting types for built-in function ‘snprintf’
[-Wbuiltin-declaration-mismatch]
   int snprintf (NO_PROTO);
       ^~~~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtins.c:181:1:
internal compiler error: Segmentation fault
 T2 (vfscanf);
 ^~
0xfced89 crash_signal
        ../../gcc/toplev.c:325
0x8025b1 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3245
0x905657 check_function_format(tree_node*, int, tree_node**, vec<unsigned int,
va_heap, vl_ptr>*)
        ../../gcc/c-family/c-format.c:1121
0x8f2b5c 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:5617
0x846a56 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>*)
        ../../gcc/c/c-typeck.c:3114
0x847146 c_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>*)
        ../../gcc/c/c-typeck.c:3179
0x89168a c_parser_postfix_expression_after_primary
        ../../gcc/c/c-parser.c:9153
0x890def c_parser_postfix_expression
        ../../gcc/c/c-parser.c:8978
0x88ad7a c_parser_unary_expression
        ../../gcc/c/c-parser.c:7261
0x88a276 c_parser_cast_expression
        ../../gcc/c/c-parser.c:7102
0x888930 c_parser_binary_expression
        ../../gcc/c/c-parser.c:6905
0x888123 c_parser_conditional_expression
        ../../gcc/c/c-parser.c:6643
0x887e33 c_parser_expr_no_commas
        ../../gcc/c/c-parser.c:6560
0x891d94 c_parser_expression
        ../../gcc/c/c-parser.c:9290
0x8812d5 c_parser_typeof_specifier
        ../../gcc/c/c-parser.c:3461
0x87f965 c_parser_declspecs(c_parser*, c_declspecs*, bool, bool, bool, bool,
bool, c_lookahead_kind)
        ../../gcc/c/c-parser.c:2779
0x87d594 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:1838
0x87d186 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1643
0x87ccd7 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1524
0x8b1768 c_parse_file()
        ../../gcc/c/c-parser.c:18409

Reply via email to