public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12170] New: Internal compiler error
@ 2003-09-04 16:22 dave at boost-consulting dot com
  2003-09-04 16:23 ` [Bug c++/12170] " dave at boost-consulting dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dave at boost-consulting dot com @ 2003-09-04 16:22 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170

           Summary: Internal compiler error
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dave at boost-consulting dot com
                CC: gcc-bugs at gcc dot gnu dot org

I believe the root of the problem is in passing class templates in the form of 
outer<T>::inner<U> as template template parameters.

--

c:/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: In instantiation 
of 
`boost::mpl::aux::template_arity_impl<boost::detail::tuple_of_references<boost:
:tuples::tuple<std::_Rb_tree_iterator<int, const int&, const int*>, 
__gnu_cxx::__normal_iterator<double*, std::vector<double, 
std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >::iterator_reference<boost::mpl::arg<1> >, 1>':
c:/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:78:   instantiated 
from 
`boost::mpl::aux::template_arity<boost::detail::tuple_of_references<boost::tupl
es::tuple<std::_Rb_tree_iterator<int, const int&, const int*>, 
__gnu_cxx::__normal_iterator<double*, std::vector<double, 
std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >::iterator_reference<boost::mpl::arg<1> > >'
c:/boost/boost/iterator/zip_iterator.hpp:313:   instantiated from 
`boost::detail::tuple_impl_specific::tuple_meta_transform<boost::tuples::tuple<
std::_Rb_tree_iterator<int, const int&, const int*>, 
__gnu_cxx::__normal_iterator<double*, std::vector<double, 
std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type>, 
boost::detail::tuple_of_references<boost::tuples::tuple<std::_Rb_tree_iterator<
int, const int&, const int*>, __gnu_cxx::__normal_iterator<double*, 
std::vector<double, std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >::iterator_reference<boost::mpl::arg<1> > >'
c:/boost/boost/iterator/zip_iterator.hpp:313:   instantiated from 
`boost::detail::tuple_of_references<boost::tuples::tuple<std::_Rb_tree_iterator
<int, const int&, const int*>, __gnu_cxx::__normal_iterator<double*, 
std::vector<double, std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >'
c:/boost/boost/iterator/zip_iterator.hpp:392:   instantiated from 
`boost::detail::zip_iterator_base<boost::tuples::tuple<std::_Rb_tree_iterator<i
nt, const int&, const int*>, __gnu_cxx::__normal_iterator<double*, 
std::vector<double, std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >'
zip_iterator_test.cpp:202:   instantiated from 
`boost::zip_iterator<boost::tuples::tuple<std::_Rb_tree_iterator<int, const 
int&, const int*>, __gnu_cxx::__normal_iterator<double*, std::vector<double, 
std::allocator<double> > >, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, 
boost::tuples::null_type> >'
zip_iterator_test.cpp:202:   instantiated from here
c:/boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:68: Internal 
compiler error in tsubst, at cp/pt.c:6459
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


    g++  -fmessage-length=0  -c -Wall -ftemplate-depth-100   -g -O0 -fno-
inline   -I"c:\build\libs\iterator\test"  -I "c:\boost"  -
o "c:\build\libs\iterator\test\bin\zip_iterator_test.test\gcc\debug\runtime-
link-dynamic\zip_iterator_test.obj"  "zip_iterator_test.cpp"


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] Internal compiler error
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
@ 2003-09-04 16:23 ` dave at boost-consulting dot com
  2003-09-05 23:45 ` [Bug c++/12170] ICE in cp_type_quals bangerth at dealii dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dave at boost-consulting dot com @ 2003-09-04 16:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170



------- Additional Comments From dave at boost-consulting dot com  2003-09-04 16:23 -------
Created an attachment (id=4702)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4702&action=view)
zipped preprocessed source


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
  2003-09-04 16:23 ` [Bug c++/12170] " dave at boost-consulting dot com
@ 2003-09-05 23:45 ` bangerth at dealii dot org
  2003-12-05  2:46 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2003-09-05 23:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-05 23:45:52
               date|                            |
            Summary|Internal compiler error     |ICE in cp_type_quals


------- Additional Comments From bangerth at dealii dot org  2003-09-05 23:45 -------
OK, here's a reduced testcase (that was tough...):
-------------------------
template <typename> struct W {};

template< template<typename> class F, typename T>
int foo(W< F<T> >);


template<typename T>
struct L  {
    static int const value = sizeof(foo(W<T>()));
    typedef T type;
};


template <typename>
struct Y {
    template <typename> struct X { typedef int type; };
    typedef typename L<X<int> >::type type;
};

template struct Y<int>;
-----------------------------

This crashes all compiles I have, since 2.95. With 3.3 and 3.4 we get:
g/x> /home/bangerth/bin/gcc-3.3*-pre/bin/c++ -c z.cc
z.cc: In instantiation of `L<Y<int>::X<int> >':
z.cc:17:   instantiated from `Y<int>'
z.cc:20:   instantiated from here
z.cc:9: internal compiler error: tree check: expected class 't', have 'x' (
   tree_vec) in cp_type_quals, at cp/typeck.c:6597
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

g/x> /home/bangerth/bin/gcc-3.4*-pre/bin/c++ -c z.cc
z.cc: In instantiation of `L<Y<int>::X<int> >':
z.cc:17:   instantiated from `Y<int>'
z.cc:20:   instantiated from here
z.cc:9: internal compiler error: tree check: expected class 't', have 'x'
(tree_vec) in cp_type_quals, at cp/typeck.c:6111
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


W.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
  2003-09-04 16:23 ` [Bug c++/12170] " dave at boost-consulting dot com
  2003-09-05 23:45 ` [Bug c++/12170] ICE in cp_type_quals bangerth at dealii dot org
@ 2003-12-05  2:46 ` pinskia at gcc dot gnu dot org
  2004-07-18 15:31 ` lerdsuwa at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-05  2:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-05 02:46 -------
The small testcase is rejected with checking disabled:
pr12170.cc: In instantiation of `L<Y<int>::X<int> >':
pr12170.cc:17:   instantiated from `Y<int>'
pr12170.cc:20:   instantiated from here
pr12170.cc:9: error: no matching function for call to `foo(W<Y<int>::X<int> >)'

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
                   ` (2 preceding siblings ...)
  2003-12-05  2:46 ` pinskia at gcc dot gnu dot org
@ 2004-07-18 15:31 ` lerdsuwa at gcc dot gnu dot org
  2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-18 15:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-07-18 15:31 -------
Patch in progress.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
                   ` (3 preceding siblings ...)
  2004-07-18 15:31 ` lerdsuwa at gcc dot gnu dot org
@ 2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
  2004-07-18 16:19 ` lerdsuwa at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-18 15:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-07-18 15:37 -------
*** Bug 15818 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
                   ` (4 preceding siblings ...)
  2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
@ 2004-07-18 16:19 ` lerdsuwa at gcc dot gnu dot org
  2004-07-19 15:04 ` cvs-commit at gcc dot gnu dot org
  2004-07-19 15:04 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-18 16:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
                   ` (5 preceding siblings ...)
  2004-07-18 16:19 ` lerdsuwa at gcc dot gnu dot org
@ 2004-07-19 15:04 ` cvs-commit at gcc dot gnu dot org
  2004-07-19 15:04 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-19 15:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-07-19 15:04 -------
Subject: Bug 12170

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	lerdsuwa@gcc.gnu.org	2004-07-19 15:03:58

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: ttp9.C 

Log message:
	PR c++/12170
	* pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
	innermost set of template arguments during deduction.  Simplify.
	
	* g++.dg/template/ttp9.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4221&r2=1.4222
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.888&r2=1.889
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4018&r2=1.4019
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ttp9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/12170] ICE in cp_type_quals
  2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
                   ` (6 preceding siblings ...)
  2004-07-19 15:04 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-19 15:04 ` lerdsuwa at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-19 15:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-07-19 15:04 -------
Fixed in mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12170


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-07-19 15:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-04 16:22 [Bug c++/12170] New: Internal compiler error dave at boost-consulting dot com
2003-09-04 16:23 ` [Bug c++/12170] " dave at boost-consulting dot com
2003-09-05 23:45 ` [Bug c++/12170] ICE in cp_type_quals bangerth at dealii dot org
2003-12-05  2:46 ` pinskia at gcc dot gnu dot org
2004-07-18 15:31 ` lerdsuwa at gcc dot gnu dot org
2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
2004-07-18 16:19 ` lerdsuwa at gcc dot gnu dot org
2004-07-19 15:04 ` cvs-commit at gcc dot gnu dot org
2004-07-19 15:04 ` lerdsuwa at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).