[Bug tree-optimization/102139] [11/12 Regression] -O3 miscompile due to slp-vectorize on strict align target

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 31 10:18:28 GMT 2021


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Testcase triggering a segfault on x86_64 and showing the issue inside a single
BB with a function that doesn't return.

void __attribute__((noipa))
foo (int i)
{
  if (i)
    __builtin_exit (0);
}
typedef double aligned_double __attribute__((aligned(2*sizeof(double))));
void __attribute__((noipa))
bar (double *p)
{
  p[0] = 0.;
  p[1] = 1.;
  foo (1);
  *(aligned_double *)p = 3.;
  p[1] = 4.;
}
double x[4] __attribute__((aligned(2*sizeof (double))));
int main()
{
  bar (&x[1]);
  return 0;
}


More information about the Gcc-bugs mailing list