This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56243] [4.8 regression] ICE in tree check: expected field_decl, have identifier_node in fixed_type_or_null, at cp/class.c:6645
- From: "ppluzhnikov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 23 Feb 2013 23:06:18 +0000
- Subject: [Bug c++/56243] [4.8 regression] ICE in tree check: expected field_decl, have identifier_node in fixed_type_or_null, at cp/class.c:6645
- Auto-submitted: auto-generated
- References: <bug-56243-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56243
--- Comment #6 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2013-02-23 23:06:18 UTC ---
(In reply to comment #4)
> I think the testcase is invalid
Looks like you are right, and it's been over-reduced.
> Shouldn't the below line be diagnosed, even if it is in a template ?
> F& name = x->value;
The error being that typeof(x->value) is A, not F, right?
If so, this corrected test case still triggers ICE:
class A
{
virtual int String ();
};
class F: public A { };
template < typename V > class G
{
V value;
};
class D
{
template < int N > void Verify() {
G<F>* x = 0;
F& name = x->value;
name.String();
}
};