public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/64538] New: [4.9/5 Regression] Devirt ICE in possible_polymorphic_call_targets
Date: Thu, 08 Jan 2015 11:57:00 -0000	[thread overview]
Message-ID: <bug-64538-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 64538
           Summary: [4.9/5 Regression] Devirt ICE in
                    possible_polymorphic_call_targets
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

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.


             reply	other threads:[~2015-01-08 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 11:57 jakub at gcc dot gnu.org [this message]
2015-01-08 12:06 ` [Bug ipa/64538] " jakub at gcc dot gnu.org
2015-01-13 12:51 ` rguenth at gcc dot gnu.org
2015-01-27 17:11 ` hubicka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64538-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).