[Bug rtl-optimization/93187] [10 Regression] ICE in extract_insn, at recog.c:2294

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 7 19:05:00 GMT 2020


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-01-07
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Target Milestone|---                         |10.0
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Cleaned up testcase:

// PR target/93187
// { dg-do compile }
// { dg-options "-O2" }
// { dg-additional-options "-fstack-protector-strong" { target fstack_protector
} }
// { dg-additional-options "-fpie" { target fpie } }

struct A;
struct B;
struct C { int operator () (B, const B &); };
struct D { typedef int *d; };
struct E { C g; };
struct F { F (D::d); friend bool operator==(F &, const int &); };
template <typename T, typename> struct H {
  typedef D *I;
  E l;
  I foo ();
  T t;
  F bar (I, const T &);
  F baz (const T &);
};
template <typename T, typename U>
F
H<T, U>::bar (I n, const T &o)
{
  while (n)
    if (l.g (t, o))
      n = 0;
  return 0;
}
template <typename T, typename U>
F
H<T, U>::baz (const T &n)
{
  D *r = foo ();
  F p = bar (r, n);
  return p == 0 ? 0 : p;
}
template <typename, typename U> struct J {
  H<B, U> h;
  B &q;
  void baz () { h.baz (q); }
};
enum K { L };
template <typename, K = L> struct M;
template <int> struct G {
  using N = J<int, A>;
  N *operator->();
};
template <typename, K T> struct M : public G<T> {
  using N = J<int, A>;
  N *foo () { return n; }
  N *n;
  int o;
};
template <int N>
inline typename G<N>::N *
G<N>::operator-> ()
{
  N *n = static_cast<M<J<int, A>> *>(this)->foo ();
  return n;
}
struct B { bool qux (); };
struct O {
  struct P { M<int> p; };
  static thread_local P o;
  int baz () const;
};
thread_local O::P O::o;
B be;
int
O::baz () const
{
  do
    o.p->baz ();
  while (be.qux ());
  __builtin_unreachable ();
}


More information about the Gcc-bugs mailing list