Bug 64538 - [4.9/5 Regression] Devirt ICE in possible_polymorphic_call_targets
Summary: [4.9/5 Regression] Devirt ICE in possible_polymorphic_call_targets
Status: RESOLVED DUPLICATE of bug 60871
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 4.9.3
: P2 normal
Target Milestone: 4.9.3
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Reported: 2015-01-08 11:57 UTC by Jakub Jelinek
Modified: 2015-01-27 17:11 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2015-01-08 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2015-01-08 11:57:46 UTC
struct A {};
template <typename> struct I;
struct P { virtual ~P(); };
template <typename> struct B;
struct J : P { friend I<B<double>>; virtual B<int> &foo(int); };
struct L : virtual J, virtual P {};
struct C { P &c; C(P &p1) : c(p1) {} };
template <typename B> struct I : C {
  typedef typename B::template F<0>::t R;
  J &c;
  I(J &p1) : C(p1), c(p1) {}
  R &bar(int) { c.foo(0); }
template <int, typename T> struct K : A {
  typedef typename T::S S;
  bool baz(const int &, I<S> &p2, I<S> &p3);
struct D { virtual void foo(); };
template <typename> struct B { template <int> struct F { typedef int t; }; };
struct M : P, virtual public J {};
struct N : public M, virtual L {};
struct O : public N, D { O(int); };
struct G { typedef B<double> S; template <int> struct H { typedef O t; }; };
template <int N, typename T>
bool K<N, T>::baz(const int &, I<S> &p2, I<S> &p3) {
  typedef typename T::template H<0>::t W;
  typedef typename S::template F<0>::t R;
  W a(0);
  I<S> b(a);
  R &c = b.bar(0);
template struct K<0, G>;

with -std=c++0x -O2 started to ICE with r201836 and while the exact spot where it ICEd changed several times, it continues to ICE with current 4.9 branch and latest trunk.
Comment 1 Jan Hubicka 2015-01-27 17:11:45 UTC
Also fixed by fix for PR60871

*** This bug has been marked as a duplicate of bug 60871 ***