[Bug c++/104031] [12 regression] Global nested constructors generate invalid code since r12-6329-g4f6bc28fc7dd86bd
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 14 18:27:58 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104031
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase without any headers:
struct vector
{
vector(){} ~vector(){}
};
struct Info {
vector args;
int arity = 0;
};
struct RegisterPrimOp
{
[[gnu::noipa, gnu::noinline]]
RegisterPrimOp(Info info) {
if (info.arity != 0)
__builtin_trap();
}
};
static RegisterPrimOp s_op({
.args = vector{},
.arity = 0,
});
int main() {}
More information about the Gcc-bugs
mailing list