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

            Bug ID: 99324
           Summary: ICE in mark_addressable, at gimple-expr.c:918
           Product: gcc
           Version: 11.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 r6, with missing ";" at /// :


$ cat z1.c
#include <stdarg.h>
void f (int x, ...)
{
  va_list a;
  va_arg (a, int);
  int b () ///;
  int c[va_arg (a, int)];
  va_end (a);
  return;
}


$ gcc-11-20210228 -c z1.c
z1.c: In function 'b':
z1.c:7:3: internal compiler error: Segmentation fault
    7 |   int c[va_arg (a, int)];
      |   ^~~
0xb5eeff crash_signal
        ../../gcc/toplev.c:327
0x8c6733 mark_addressable(tree_node*)
        ../../gcc/gimple-expr.c:918
0x6ce03c build_va_arg(unsigned int, tree_node*, tree_node*)
        ../../gcc/c-family/c-common.c:4630
0x6751b6 c_parser_postfix_expression
        ../../gcc/c/c-parser.c:9141
0x67e012 c_parser_unary_expression
        ../../gcc/c/c-parser.c:8224
0x67f03f c_parser_cast_expression
        ../../gcc/c/c-parser.c:8066
0x67f2f9 c_parser_binary_expression
        ../../gcc/c/c-parser.c:7869
0x680305 c_parser_conditional_expression
        ../../gcc/c/c-parser.c:7592
0x680861 c_parser_expr_no_commas
        ../../gcc/c/c-parser.c:7507
0x67d1f6 c_parser_direct_declarator_inner
        ../../gcc/c/c-parser.c:4095
0x694483 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2148
0x695709 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2498
0x693bb9 c_parser_compound_statement_nostart
        ../../gcc/c/c-parser.c:5700
0x693ff3 c_parser_compound_statement
        ../../gcc/c/c-parser.c:5597
0x6958a8 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2539
0x69c717 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1777
0x69d239 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1650
0x69d239 c_parse_file()
        ../../gcc/c/c-parser.c:21984
0x6ed0a2 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1218

Reply via email to