Revision 143404: http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00780.html caused [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -DSPEC_CPU -DNDEBUG -Iinclude -DBOOST_DISABLE_THREADS -Ddeal_II_dimension=3 -O2 -DSPEC_CPU_LP64 fe_tools.cc -S fe_tools.cc: In static member function ‘static std::pair<FiniteElement<dim>*, unsigned int> FETools::get_fe_from_name_aux(const std::string&)’: fe_tools.cc:1271: internal compiler error: tree check: expected field_decl, have identifier_node in lvalue_p_1, at cp/tree.c:120 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../src/configure --prefix=/export/gnu/import/rrs/143437/usr --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-shared --enable-threads=posix --enable-haifa --enable-checking --enable-languages=c,c++ --disable-bootstrap Thread model: posix gcc version 4.4.0 20090116 (experimental) [trunk revision 143437] (GCC) [hjl@gnu-27 build_base_o3.0000]$
Testcase? I don't have SPEC handy.
[hjl@gnu-27 build_base_o3.0000]$ cat x.cc #include <string> #include <utility> template <int dim> class bar; template <int dim> std::pair<bar<dim> *, unsigned int> foo (const std::string &name, unsigned int position) { const std::pair<int,unsigned int> tmp; return std::make_pair (new bar<dim>(tmp.first), position); } [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -O2 x.cc -S x.cc: In function ‘std::pair<bar<dim>*, unsigned int> foo(const std::string&, unsigned int)’: x.cc:10: internal compiler error: tree check: expected field_decl, have identifier_node in lvalue_p_1, at cp/tree.c:120 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-27 build_base_o3.0000]$
[hjl@gnu-27 build_base_o3.0000]$ cat y.cc template<class _T1, class _T2> struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair () : first(), second() { } pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } }; template<class _T1, class _T2> inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } template <int dim> class bar; template <int dim> pair<bar<dim> *, unsigned int> foo (unsigned int position) { const pair<int,unsigned int> tmp; return make_pair (new bar<dim>(tmp.first), position); } [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -O2 y.cc -S y.cc: In function ‘pair<bar<dim>*, unsigned int> foo(unsigned int)’: y.cc:27: internal compiler error: tree check: expected field_decl, have identifier_node in lvalue_p_1, at cp/tree.c:120 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-27 build_base_o3.0000]$
Subject: Bug 38877 Author: jason Date: Fri Jan 16 22:36:32 2009 New Revision: 143446 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143446 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. * init.c (build_new): Don't call describable_type unless we have an auto. Added: trunk/gcc/testsuite/g++.dg/template/lvalue1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/init.c trunk/gcc/cp/tree.c
Subject: Bug 38877 Author: jason Date: Fri Jan 16 22:40:25 2009 New Revision: 143448 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143448 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. * init.c (build_new): Don't call describable_type unless we have an auto. Modified: trunk/gcc/testsuite/ChangeLog
Fixed for 4.4. Will fix in 4.3 soon.
Patch is ok for the 4.3 branch, adjusting target milestone.
Only happens with checking enabled.
Subject: Bug 38877 Author: jason Date: Fri Jan 16 23:17:35 2009 New Revision: 143449 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143449 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. Added: branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/lvalue1.C - copied unchanged from r143446, trunk/gcc/testsuite/g++.dg/template/lvalue1.C Modified: branches/gcc-4_3-branch/gcc/cp/ChangeLog branches/gcc-4_3-branch/gcc/cp/tree.c
Fixed.