https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110158
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a slightly reduced testcase (for a slightly different issue still
dealing with unions):
```
struct str1
{
// bool a;
char *var;
union {
char t[15];
int allocated;
};
constexpr str1() : var(new char[2]) { t[0] = 0; }
constexpr ~str1() {if (var != t) delete[] var; }
};
typedef str1 str;
constexpr bool f1() {
str t{};
return true;
}
static_assert( f1() );
constexpr bool f() {
union U{
str s;
constexpr ~U(){ s.~str(); }
} u{};
return true;
}
static_assert( f() );
```