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

            Bug ID: 65066
           Summary: [5 Regression] ICE: Segmentation fault with -Wformat=2
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org

markus@x4 /tmp % cat rt_names.i
extern int sscanf(__const char *__restrict __s,
                  __const char *__restrict __format, ...);
int *a;
void foo() { sscanf(0, "0x%x  #", a); }

markus@x4 /tmp % gcc -Wformat=2 -c rt_names.i
rt_names.i: In function ‘foo’:
rt_names.i:4:1: internal compiler error: Segmentation fault
 void foo() { sscanf(0, "0x%x  #", a); }
 ^
0xaed31f crash_signal
        ../../gcc/gcc/toplev.c:383
0x57c131 check_format_types
        ../../gcc/gcc/c-family/c-format.c:2495
0x57c131 check_format_info_main
        ../../gcc/gcc/c-family/c-format.c:2326
0x6a6ec8 check_format_arg
        ../../gcc/gcc/c-family/c-format.c:1623
0x6a7604 check_format_info
        ../../gcc/gcc/c-family/c-format.c:1358
0x6a7604 check_function_format(tree_node*, int, tree_node**)
        ../../gcc/gcc/c-family/c-format.c:1028
0x6949a7 check_function_arguments(tree_node const*, int, tree_node**)
        ../../gcc/gcc/c-family/c-common.c:9540
0x6293dd 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/gcc/c/c-typeck.c:2994
0x64b44a c_parser_postfix_expression_after_primary
        ../../gcc/gcc/c/c-parser.c:7894
0x644a36 c_parser_postfix_expression
        ../../gcc/gcc/c/c-parser.c:7715
0x6470fa c_parser_unary_expression
        ../../gcc/gcc/c/c-parser.c:6602
0x647d0f c_parser_cast_expression
        ../../gcc/gcc/c/c-parser.c:6440
0x647ef2 c_parser_binary_expression
        ../../gcc/gcc/c/c-parser.c:6255
0x648a55 c_parser_conditional_expression
        ../../gcc/gcc/c/c-parser.c:6031
0x649030 c_parser_expr_no_commas
        ../../gcc/gcc/c/c-parser.c:5949
0x649702 c_parser_expression
        ../../gcc/gcc/c/c-parser.c:8022
0x64a129 c_parser_expression_conv
        ../../gcc/gcc/c/c-parser.c:8055
0x642988 c_parser_statement_after_labels
        ../../gcc/gcc/c/c-parser.c:5115
0x644183 c_parser_compound_statement_nostart
        ../../gcc/gcc/c/c-parser.c:4701
0x65605e c_parser_compound_statement
        ../../gcc/gcc/c/c-parser.c:4538
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Probably started with r220677.

Reply via email to