sibcall ICE
Nathan Sidwell
nathan@codesourcery.com
Wed May 24 05:43:00 GMT 2000
Hi,
the sibcall patch of
2000-03-17 Jeff Law <law@cygnus.com>
Richard Henderson <rth@cygnus.com>
is causing a cc1plus ICE in the following C++ code when compiled at -O2
on i686-pc-linux-gnu
struct A
{
A (int s) { }
~A () { }
int get () const { return 0; }
};
void f (const A &s) {
f (s.get ());
}
nathan@uha:69>./cc1plus n3.ii -O2
void f (const A &)
n3.ii:12: Internal compiler error.
Yes, this is strange code, it's culled from gtk--'s autoconf test of
the library's string class, the code is supposed to be compilable.
I've tried turning it into equivalent C code, but that fails to
tickle cc1 into ICEing. FYI here's the nearest I can get to representing
the program at the C source level.
struct A {int m;};
inline void dtor (struct A *t, int inchrg) {}
inline struct A *ctor (struct A *t, int i) {return t;}
inline int get (struct A const *t) { return 0;}
void f (const struct A *s)
{
struct A tmp;
f (ctor (&tmp, get (s))), dtor (&tmp, 0);
}
Can you look at this? Let me know if you need help with the C++ aspects.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
More information about the Gcc-bugs
mailing list