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

            Bug ID: 128496
           Summary: internal compiler error: in
                    dwarf2out_abstract_function, at dwarf2out.cc
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 0599jiangyc at gmail dot com
  Target Milestone: ---

The following code:
```cpp
int q;
struct A
{
  typedef int T;
#pragma omp declare reduction (x : T : omp_out += omp_in + [] (){ return q;
}()) initializer (omp_priv = [](){ return 0; }())
};
void test ()
{
#pragma omp declare reduction (x : int : omp_out += omp_in + [] (){ return q;
}()) initializer (omp_priv = [](){ return 0; }())
}
```

Resulted in this output:
```
cc1plus: internal compiler error: in dwarf2out_abstract_function, at
dwarf2out.cc:23783
```

Trunk reproducer (`-g -O2 -fopenmp -fkeep-inline-functions`):
https://godbolt.org/z/Gn6xjYrWr

Reply via email to