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

            Bug ID: 94670
           Summary: ICE in extract_insn, at recog.c:2310 on
                    s390x-linux-gnu with -march=z13
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

Seen on the gcc-8, gcc-9 branches and trunk, worked around with -O2.

$ cat hb-set.ii
struct f {
  long operator[](int i) { return c.d[i]; }
  struct {
    long d[sizeof 0];
  } c;
};
template <typename e> struct o {
  int g;
  e h;
  e &operator[](int i) {
    e *j;
    unsigned b = i;
    j = &h;
    return j[b];
  }
};
int k, m;
unsigned l;
struct n {
  struct C {
    int t() {
      int p = l = sizeof(d);
      for (unsigned b = 0; b < l; b++) {
        long q = d[b], d = q;
        k = __builtin_popcountl(d);
        p += k;
      }
      return p;
    }
    f d;
  };
  o<C> pages;
  int m_fn1() {
    unsigned a = pages.g;
    for (unsigned b = 0; b < a; b++)
      m += pages[b].t();
    return m;
  }
} r;
void s() { r.m_fn1(); }


$ s390x-linux-gnu-g++ -c -mbackchain -march=z13 -mzarch -O3 -Wall
-Wno-strict-aliasing -std=gnu++98 -fno-stack-protector hb-set.ii
hb-set.ii: In function ‘void s()’:
hb-set.ii:40:23: error: unrecognizable insn:
   40 | void s() { r.m_fn1(); }
      |                       ^
(insn 109 108 110 7 (set (reg:V16QI 1302)
        (unspec:V16QI [
                (subreg:V16QI (subreg:V2DI (reg:V16QI 1300) 0) 0)
            ] UNSPEC_POPCNT)) "hb-set.ii":25:32 -1
     (nil))
during RTL pass: vregs
hb-set.ii:40:23: internal compiler error: in extract_insn, at recog.c:2310
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to