> g++-4.5 -S bug-593923_integrals.3.ii bug-593923_integrals.3.ii: In instantiation of 'boost::numeric::ublas::banded_adaptor<boost::numeric::ublas::matrix<double> >::iterator1': bug-593923_integrals.3.ii:500:50: instantiated from 'void lsp::singular_decomposition<T>::apply(M1&, M2&) const [with M1 = boost::numeric::ublas::matrix<double>, M2 = boost::numeric::ublas::matrix<double>, T = boost::numeric::ublas::matrix<double>]' bug-593923_integrals.3.ii:555:27: instantiated from here bug-593923_integrals.3.ii:467:17: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:10074 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 20347 [details] autoreduced testcase
Created attachment 20350 [details] More reduced
Created attachment 20351 [details] More reduced
Fully reduced: template< typename T2 , typename T3 > struct if_ { typedef T2 type; }; template<class I1> struct iterator_restrict_traits { }; template<class T> class matrix { class ci {}; class i {}; }; template<class M, class TRI> struct triangular_adaptor { typedef typename if_<typename M::ci,typename M::i>::type ty1; class iterator2 : iterator_restrict_traits<typename ty1::ic>::iterator_category { }; }; template<class M> struct banded_adaptor { typedef typename if_<typename M::ci,typename M::i>::type ty1; class iterator1 : iterator_restrict_traits<typename ty1::ic>::iterator_category { }; }; template<class T> struct singular_decomposition { banded_adaptor< matrix< double > >::iterator1 it1; };
The failure of the testcase in comment #1 is caused by revision 145440: http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg00060.html
A patch was posted to http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00928.html
Subject: Bug 43704 Author: dodji Date: Mon Apr 19 09:32:16 2010 New Revision: 158508 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158508 Log: Fix PR c++/43704 gcc/cp/ChangeLog: PR c++/43704 * typeck.c (structural_comptypes): Test dependent typedefs incompatibility before testing for their main variant based equivalence. gcc/testsuite/ChangeLog: PR c++/43704 * g++.dg/template/typedef32.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/typedef32.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog
On Linux/ia32, I got Executing on host: /export/gnu/import/svn/gcc-test/bld/gcc/testsuite/g++2/../../g++ -B/export/gnu/import/svn/gcc-test/bld/gcc/testsuite/g++2/../../ /export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/template/typedef32.C -nostdinc++ -I/export/gnu/import/svn/gcc-test/bld/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/export/gnu/import/svn/gcc-test/bld/i686-pc-linux-gnu/libstdc++-v3/include -I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/libsupc++ -I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/include/backward -I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/testsuite/util -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long -S -o typedef32.s (timeout = 300) /export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/template/typedef32.C: In instantiation of 'banded_adaptor<matrix<double> >::iterator1':^M /export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/template/typedef32.C:43:46: instantiated from here^M /export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/template/typedef32.C:35:9: error: no type named 'ic' in 'class banded_adaptor<matrix<double> >::ty1'^M
*** Bug 43822 has been marked as a duplicate of this bug. ***
Subject: Bug 43704 Author: dodji Date: Tue Apr 20 19:23:45 2010 New Revision: 158571 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158571 Log: Fix PR c++/43800 gcc/cp/ChangeLog: PR c++/43800 PR c++/43704 * typeck.c (incompatible_dependent_types_p): If one of the compared types if not a typedef then honour their main variant equivalence. gcc/testsuite/ChangeLog: PR c++/43800 PR c++/43704 * g++.dg/template/typedef32.C: Adjust. * g++.dg/template/typedef33.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/typedef33.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/template/typedef32.C
Fixed in trunk (4.6) and 4.5.1.
Subject: Bug 43704 Author: dodji Date: Tue Apr 20 19:40:11 2010 New Revision: 158572 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158572 Log: Fix PR c++/43704 gcc/cp/ChangeLog: PR c++/43704 * typeck.c (structural_comptypes): Test dependent typedefs incompatibility before testing for their main variant based equivalence. (incompatible_dependent_types_p): If one of the compared types if not a typedef then honour their main variant equivalence. gcc/testsuite/ChangeLog: PR c++/43704 * g++.dg/template/typedef32.C: New test. * g++.dg/template/typedef33.C: New test. gcc/testsuite/ChangeLog: Added: branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/typedef32.C branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/typedef33.C Modified: branches/gcc-4_5-branch/gcc/cp/ChangeLog branches/gcc-4_5-branch/gcc/cp/typeck.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog