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

            Bug ID: 91623
           Summary: [7/8/9 Regression] -msse4.1 -O3 segfault in
                    /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/smmintr
                    in.h:270:10
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: soap at gentoo dot org
  Target Milestone: ---

Created attachment 46793
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46793&action=edit
Minimum test case

Under certain conditions, GCC raises an ICE. I have used creduce to produce a
minimal example:


typedef long long a __attribute__((__vector_size__(16)));
typedef long long b __attribute__((__vector_size__(16)));
b c, e, g, h;
d;
const i;
j(k, l) {
  if (d && 0 <= k - 1 && l)
    m();
}
p() {
  int f = 0;
  c = (a){1};
  b n = c;
  g = (a){};
  b o = g;
  for (; f < i; ++f) {
    b a = o == n;
    h = a;
    j(f, i);
    o = e;
  }
}


gcc-6.5.0 -msse4.1 -O3 -c test.c: PASS
gcc-6.5.0 -msse4.1 -O2 -c test.c: PASS

gcc-7.4.0 -msse4.1 -O3 -c test.c: FAIL
gcc-7.4.0 -msse4.1 -O2 -c test.c: PASS

gcc-8.3.0 -msse4.1 -O3 -c test.c: FAIL
gcc-8.3.0 -msse4.1 -O2 -c test.c: PASS

gcc-9.2.0 -msse4.1 -O3 -c test.c: FAIL
gcc-9.2.0 -msse4.1 -O2 -c test.c: PASS

In all failure cases I get the error

during RTL pass: expand
test.c: In function ā€˜pā€™:
test.c:10:1: internal compiler error: Segmentation fault

Reply via email to