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

            Bug ID: 121083
           Summary: internal compiler error: in
                    process_init_constructor_record, at cp/typeck2.cc:1796
                    in 15.1 and trunk
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mario.rodriguezb1 at um dot es
  Target Milestone: ---

ICE in:

Program

```
struct Xint
{
  int x;
  const int * y;
};

int main(){

    const char * p;
    Xint * p = new Xint[3] ({6,[2]=20});
}
```

Stack dump

```
<source>:11:39: internal compiler error: in process_init_constructor_record, at
cp/typeck2.cc:1796
   11 |     Xint * p = new Xint[3] ({6,[2]=20});
      |                                       ^
0x2879ca5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x289b986 internal_error(char const*, ...)
        ???:0
0xaf3494 fancy_abort(char const*, int, char const*)
        ???:0
0xc2b2b0 build_new(unsigned long, vec<tree_node*, va_gc, vl_embed>**,
tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int, int)
        ???:0
0xd20193 c_parse_file()
        ???:0
0xe8a449 c_common_parse_file()
        ???:0
```

To quickly reproduce:

https://godbolt.org/z/1fn1nh47q

Reply via email to