[Bug c++/38577] [4.4 Regression] ICE: tree check: expected call_expr, have compound_expr in build_new_method_call, at cp/call.c:6000
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 19 20:06:00 GMT 2008
------- Comment #11 from jakub at gcc dot gnu dot org 2008-12-19 20:05 -------
With COMPOUND_EXPR, finish_decltype_type doesn't ICE, but as you note, probably
doesn't do the right thing.
Say on:
struct A
{
static A *bar ();
};
struct B : public A
{
static int baz ();
};
template <class T>
void foo ()
{
__decltype ((static_cast<B *> (A::bar ()))->baz ()) i;
}
void blah ()
{
__decltype ((static_cast<B *> (A::bar ()))->baz ()) i;
}
void
bar ()
{
foo<int> ();
}
in foo finish_decltype_type is called just with CALL_EXPR and does the right
thing, but in blah is called with COMPOUND_EXPR and doesn't handle it as
CALL_EXPR, but just returns TREE_TYPE. Not sure how would a testcase where
this would make a difference look though.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38577
More information about the Gcc-bugs
mailing list