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

            Bug ID: 120060
           Summary: [16 Regression] bash-5.2 ICE
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed gcc ICE on r16-343-gc6efdffa7d5c68 (did not bisect) on bash-5.2.

cvise produced this thing:

// $ ccat unwind_prot.c.c
typedef void VFunction();
void without_interrupts(function, arg1, arg2) VFunction function;
char arg1, arg2;
{
  function(arg2);
}

Crashing:

gcc/xgcc -Bgcc -O2 -c unwind_prot.c.c -std=gnu17
unwind_prot.c.c: In function ‘without_interrupts’:
unwind_prot.c.c:5:3: internal compiler error: Segmentation fault
    5 |   function(arg2);
      |   ^~~~~~~~
0x263bef5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x264f535 internal_error(char const*, ...)
        ???:0
0xff2037 crash_signal(int)
        ???:0
0x846fb5 build_function_call_vec(unsigned long, vec<unsigned long, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*, tree_node*)
        ???:0
0x8484e4 c_build_function_call_vec(unsigned long, vec<unsigned long, va_heap,
vl_ptr> const&, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*,
va_gc, vl_embed>*)
        ???:0
0x88d081 c_parser_postfix_expression_after_primary(c_parser*, unsigned long,
c_expr)
        ???:0
0x87a6d2 c_parser_postfix_expression(c_parser*)
        ???:0
0x8841af c_parser_unary_expression(c_parser*)
        ???:0
0x88425f c_parser_cast_expression(c_parser*, c_expr*)
        ???:0
0x884552 c_parser_binary_expression(c_parser*, c_expr*, tree_node*)
        ???:0
0x885d3c c_parser_conditional_expression(c_parser*, c_expr*, tree_node*)
        ???:0
0x886623 c_parser_expr_no_commas(c_parser*, c_expr*, tree_node*)
        ???:0
0x887ead c_parser_expression(c_parser*)
        ???:0
0x8886e4 c_parser_expression_conv(c_parser*)
        ???:0
0x8aae11 c_parser_statement_after_labels(c_parser*, bool*, tree_node*,
vec<tree_node*, va_heap, vl_ptr>*, attr_state)
        ???:0
0x8aef28 c_parser_compound_statement_nostart(c_parser*)
        ???:0
0x8af220 c_parser_compound_statement(c_parser*, unsigned long*)
        ???:0
0x8a91be c_parser_declaration_or_fndef(c_parser*, bool, bool, bool, bool, bool,
bool, tree_node**, vec<c_token, va_heap, vl_ptr>*, bool, tree_node*,
oacc_routine_data*, bool*)
        ???:0
0x8b7cd1 c_parser_external_declaration(c_parser*)
        ???:0
0x8b8abf c_parse_file()
        ???:0

Built as:

$ gcc/xgcc -Bgcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c
CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0' : (reconfigured)
/home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap
--disable-lto --disable-libsanitizer --enable-languages=c CFLAGS='-O1 -g0'
CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20250502 (experimental) (GCC)

Reply via email to