https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122905
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Component|c++ |lto
Keywords|needs-reduction |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-11-29
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
semi-reduced testcase:
b.h:
```
struct mys{
typedef char * pointer;
struct _Alloc_hider {
_Alloc_hider(pointer __dat) {}
};
_Alloc_hider _M_dataplus;
enum { _S_local_capacity = 15 / sizeof(char) };
union {
char _M_local_buf[16];
};
mys(const char *__s) : _M_dataplus{ _M_local_buf} { }
};
mys example();
```
a.cc:
```
#include "b.h"
mys example()
{
return "TEST";
}
```
b.cc:
```
#include "b.h"
auto foo = example();
```
The enum is not used but makes the difference between C++17 and C++20.