This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/56769] New: [4.7] ICE in set_ssa_val_to, at tree-ssa-sccvn.c:2511


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56769

             Bug #: 56769
           Summary: [4.7] ICE in set_ssa_val_to, at tree-ssa-sccvn.c:2511
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ppluzhnikov@google.com


Probably related to PR 56768

Google ref b/8485258

Does *not* reproduce on trunk
Does reproduce using gcc-4_7 (r197167)

Test case:

struct Iter
{
  int& operator* ();
  void operator++ ();
};

bool operator!= (Iter &, Iter &) { }

struct Container
{
  Iter begin () const;
  Iter end () const;
};

struct J
{
    virtual J *mutable_child ();
};

struct M
{
    M (const Container &);
    J ns_;
};
namespace
{
  J MakeNamespace (const Container &src)
  {
    J a;
    J *b = 0;
    for (const int &c: src)
      b = b ? b->mutable_child () : &a;
    return a;
  }
}
M::M (const Container &ns):ns_ (MakeNamespace (ns))
{
}



Note: the only difference from test case in PR 56768 is:

diff pp.ii pp2.ii 
7c7
< bool operator!= (Iter &, Iter &);
---
> bool operator!= (Iter &, Iter &) { }


cc1plus pp2.ii -std=c++11 -quiet && echo ok
ok

cc1plus pp2.ii -std=c++11 -quiet -O2
pp2.ii: In constructor âM::M(const Container&)â:
pp2.ii:36:1: internal compiler error: in set_ssa_val_to, at
tree-ssa-sccvn.c:2511
Please submit a full bug report,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]