[Bug tree-optimization/105769] [11/12/13 Regression] program segmentation fault with -ftree-vectorize and nested lambdas
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 17 12:31:44 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105769
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
struct S { S *p; S *q; S () {} ~S (); };
void bar (S *);
void
foo ()
{
S a, b;
bar (nullptr);
{
S c;
c.p = &a;
c.q = &b;
bar (&c);
}
bar (nullptr);
}
at -O2 gets roughly the same stuff in the IL with taking address of a and b
being done before a and b is clobbered, then c being clobbered, initialized,
eol clobbered and only then a and b destructed and eol clobbered. But for some
reason no stack sharing happens in that case.
More information about the Gcc-bugs
mailing list