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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Probably a duplicate, but this C++ code also causes a crash:

float *a;
void b() {
  float c, d;
  a[0] = a[1] = 0.5f * (c - 2 + d);
  a[2] = a[3] = 0.5f * (c + 2 + d);
}

$ /home/dcb/gcc/results/bin/gcc -c -w -O3 -march=native bug623.cc
during GIMPLE pass: slp
bug623.cc: In function ‘void b()’:
bug623.cc:2:6: internal compiler error: Segmentation fault
    2 | void b() {
      |      ^
0x1193667 crash_signal
        ../../trunk.git/gcc/toplev.c:328
0x1471370 vect_schedule_slp_instance
        ../../trunk.git/gcc/tree-vect-slp.c:4220
0x14712c7 vect_schedule_slp_instance
        ../../trunk.git/gcc/tree-vect-slp.c:4182
0x14712c7 vect_schedule_slp_instance
        ../../trunk.git/gcc/tree-vect-slp.c:4182

Native is AMD FX(tm)-8350 Eight-Core Processor.

Reply via email to