Created attachment 24088 [details] source code demonstrating bug Compile the attached code with g++, and: $ g++-snapshot -c ,barf.i.cc ,barf.i.cc: In member function 'virtual T CylinderMapTex<T>::eval(const TexCoords&) const': ,barf.i.cc:46:16: internal compiler error: tree check: expected field_decl, have identifier_node in fixed_type_or_null, at cp/class.c:5885 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions. $ g++-snapshot --version g++ (Debian 20110419-1) 4.7.0 20110419 (experimental) [trunk revision 172699] Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Thanks, -miles
Looks like a regression in mainline.
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171461 The patch has been backported to 4.6 branch as well and if built with --enable-checking=yes, it ICEs there the same way. In: 5880 case COMPONENT_REF: 5881 /* If this component is really a base class reference, then the field 5882 itself isn't definitive. */ 5883 if (DECL_FIELD_IS_BASE (TREE_OPERAND (instance, 1))) 5884 return RECUR (TREE_OPERAND (instance, 0)); 5885 return RECUR (TREE_OPERAND (instance, 1)); instance is a COMPONENT_REF with type Pos, TREE_OPERAND (instance, 0) is INDIRECT_REF - *coords and TREE_OPERAND (instance, 1) is not FIELD_DECL, but IDENTIFIER_NODE pos.
Author: jason Date: Thu May 5 02:20:12 2011 New Revision: 173412 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173412 Log: PR c++/48749 * class.c (resolves_to_fixed_type_p): Don't look closely in templates. Added: trunk/gcc/testsuite/g++.dg/conversion/base1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/testsuite/ChangeLog
Author: jason Date: Thu May 5 02:51:01 2011 New Revision: 173414 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173414 Log: PR c++/48749 * class.c (resolves_to_fixed_type_p): Don't look closely in templates. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/conversion/base1.C Modified: branches/gcc-4_6-branch/gcc/cp/ChangeLog branches/gcc-4_6-branch/gcc/cp/class.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Fixed.