http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56265
Bug #: 56265
Summary: [4.8 Regression] ICE in ipa_make_edge_direct_to_target
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
int baz ();
struct A
{
virtual int fn2 () = 0;
virtual int *fn3 ();
double *fn4 ();
int fn5 (int);
template <class T>
void fn1 (A &, T) { fn3 (); fn4 (); fn2 (); }
};
struct B : A
{
int fn2 () { return 6; }
void fn3 (int, double);
B (bool = true);
B (int, int);
};
template <typename T>
void
foo (B &x, A &y, A &z)
{
y.fn2 ();
z.fn2 ();
int i = baz ();
int j = (y.fn3 ())[i];
x.fn3 (j, (y.fn4 ())[i] + (z.fn4 ())[z.fn5 (j)]);
}
inline B
operator+ (A &y, A &z)
{
B x;
foo<int> (x, y, z);
return x;
}
void
bar ()
{
B a, b, c (4, 0), d;
a.fn1 (b, .6);
baz ();
c + d;
}
ICEs at -O2, starting with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195066