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

            Bug ID: 120285
           Summary: ice in digest_init_r, at cp/typeck2.cc:1397
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code:

struct S {
  int a = 1;
};
void non_pod_val_syntax_2() {
  S arr[2];
  auto [x, y](arr);
}

derived from clang C++ testsuite file
./Analysis/uninit-structured-binding-array.cpp,
recent gcc does this:

foundBugs $ ../results/bin/g++ -c -w bug1099.cc 
bug1099.cc: In function ‘void non_pod_val_syntax_2()’:
bug1099.cc:6:18: internal compiler error: in digest_init_r, at
cp/typeck2.cc:1397
    6 |   auto [x, y](arr);
      |                  ^
0x26b29ee ???
       
/home/dcb40b/gcc/working/gcc/../../trunk/gcc/diagnostic-global-context.cc:517
0x26911cb fancy_abort
        /home/dcb40b/gcc/working/gcc/../../trunk/gcc/diagnostic.cc:1815
0xb379e9 digest_init_r
        /home/dcb40b/gcc/working/gcc/../../trunk/gcc/cp/typeck2.cc:1397

Looking at earlier releases:

foundBugs $ ../results.14.2.0/bin/g++ -c bug1099.cc 
foundBugs $ ../results.15.1.0.ubsan/bin/g++ -c bug1099.cc 
bug1099.cc: In function ‘void non_pod_val_syntax_2()’:
bug1099.cc:6:18: internal compiler error: in digest_init_r, at
cp/typeck2.cc:1397
    6 |   auto [x, y](arr);
      |                  ^
0x269295e ???
       
/home/dcb40b/gcc/working/gcc/../../gcc-15.1.0/gcc/diagnostic-global-context.cc:517
0x267924b fancy_abort
        /home/dcb40b/gcc/working/gcc/../../gcc-15.1.0/gcc/diagnostic.cc:1749
0xb30a49 digest_init_r
        /home/dcb40b/gcc/working/gcc/../../gcc-15.1.0/gcc/cp/typeck2.cc:1397

Reply via email to