public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33239]  New: internal compiler error in instantiate_class_template, at cp/pt.c:5666
@ 2007-08-29 21:54 masse_nicolas at yahoo dot fr
  2007-08-29 21:57 ` [Bug c++/33239] " masse_nicolas at yahoo dot fr
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: masse_nicolas at yahoo dot fr @ 2007-08-29 21:54 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]

All is in the title. Here is the complete output I have (my system is in
french):
g++ -DHAVE_CONFIG_H -I. -I.. -I ../src    -g -O2 -MT sample1.o -MD -MP -MF
.deps/sample1.Tpo -c -o sample1.o sample1.cpp
../src/tuple.hpp: In instantiation of 'yactl::tuple_impl<int,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
>::append<yactl::null_type, int, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >':
../src/tuple.hpp:105:   instantiated from 'yactl::tuple<int,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
yactl::null_type, yactl::null_type, yactl::null_type, yactl::null_type,
yactl::null_type, yactl::null_type, yactl::null_type, yactl::null_type,
yactl::null_type, yactl::null_type, yactl::null_type, yactl::null_type,
yactl::null_type, yactl::null_type>'
sample1.cpp:37:   instantiated from here
../src/tuple.hpp:40: erreur interne du compilateur: dans
instantiate_class_template, à cp/pt.c:5666
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <URL:http://gcc.gnu.org/bugs.html> pour plus de détail.


-- 
           Summary: internal compiler error in instantiate_class_template,
                    at cp/pt.c:5666
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: masse_nicolas at yahoo dot fr


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


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

* [Bug c++/33239] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
@ 2007-08-29 21:57 ` masse_nicolas at yahoo dot fr
  2007-09-01  0:40 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: masse_nicolas at yahoo dot fr @ 2007-08-29 21:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from masse_nicolas at yahoo dot fr  2007-08-29 21:57 -------
Created an attachment (id=14135)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14135&action=view)
Complete sources tree where the problem happens


-- 


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


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

* [Bug c++/33239] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
  2007-08-29 21:57 ` [Bug c++/33239] " masse_nicolas at yahoo dot fr
@ 2007-09-01  0:40 ` pinskia at gcc dot gnu dot org
  2007-09-01  0:42 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-01  0:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-09-01 00:40 -------
I get errors before the ICE:
../src/typelist.hpp:49: error: 'uint' has not been declared


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|internal compiler error in  |internal compiler error in
                   |instantiate_class_template, |instantiate_class_template,
                   |at cp/pt.c:5666             |at cp/pt.c:5666


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


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

* [Bug c++/33239] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
  2007-08-29 21:57 ` [Bug c++/33239] " masse_nicolas at yahoo dot fr
  2007-09-01  0:40 ` pinskia at gcc dot gnu dot org
@ 2007-09-01  0:42 ` pinskia at gcc dot gnu dot org
  2007-09-01  1:29 ` [Bug c++/33239] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-01  0:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-09-01 00:42 -------
But after fixing the errors, I still get the ICE so reducing.


-- 


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (2 preceding siblings ...)
  2007-09-01  0:42 ` pinskia at gcc dot gnu dot org
@ 2007-09-01  1:29 ` pinskia at gcc dot gnu dot org
  2007-09-01 12:22 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-01  1:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-09-01 01:29 -------
Reduced testcase:
struct null_type {typedef null_type base_type;};
template<typename T1, typename T2=null_type>
struct tuple_impl
{
 template<typename U, typename V=T1>
 struct append{
  typedef tuple_impl<U, tuple_impl<V, null_type> > type;
 };
 template<typename V>
 struct append<null_type, V>{
  typedef tuple_impl <V, null_type> type;
 };
  int data;
};
template<typename T1 = null_type,typename T2 = null_type,typename T3 =
null_type,typename T4 = null_type,typename T5 = null_type,typename T6 =
null_type,typename T7 = null_type,typename T8 = null_type,typename T9 =
null_type,typename T10 = null_type,typename T11 = null_type,typename T12 =
null_type,typename T13 = null_type,typename T14 = null_type,typename T15 =
null_type>
class tuple : public tuple_impl<T1, null_type>::template
append<T2>::type::template append<T3>::type::template
append<T4>::type::template append<T5>::type::template
append<T6>::type::template append<T7>::type::template
append<T8>::type::template append<T9>::type::template
append<T10>::type::template append<T11>::type::template
append<T12>::type::template append<T13>::type::template
append<T14>::type::template append<T15>::type
{
 using tuple_impl<T1, null_type>::template append<T2>::type::template
append<T3>::type::template append<T4>::type::template
append<T5>::type::template append<T6>::type::template
append<T7>::type::template append<T8>::type::template
append<T9>::type::template append<T10>::type::template
append<T11>::type::template append<T12>::type::template
append<T13>::type::template append<T14>::type::template
append<T15>::type::data;
};
tuple<int, int>  my_tuple;


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.1 4.3.0
      Known to work|                            |3.3.3
            Summary|internal compiler error in  |[4.1/4.2/4.3 Regression]
                   |instantiate_class_template, |internal compiler error in
                   |at cp/pt.c:5666             |instantiate_class_template,
                   |                            |at cp/pt.c:5666
   Target Milestone|---                         |4.1.3


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (3 preceding siblings ...)
  2007-09-01  1:29 ` [Bug c++/33239] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-09-01 12:22 ` rguenth at gcc dot gnu dot org
  2007-09-05  1:11 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-01 12:22 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-09-01 12:22:43
               date|                            |


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (4 preceding siblings ...)
  2007-09-01 12:22 ` rguenth at gcc dot gnu dot org
@ 2007-09-05  1:11 ` mmitchel at gcc dot gnu dot org
  2007-09-08  2:22 ` pcarlini at suse dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-09-05  1:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (5 preceding siblings ...)
  2007-09-05  1:11 ` mmitchel at gcc dot gnu dot org
@ 2007-09-08  2:22 ` pcarlini at suse dot de
  2007-09-23 18:24 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2007-09-08  2:22 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]



------- Comment #5 from pcarlini at suse dot de  2007-09-08 02:22 -------
Now the ICE is at line 6586. Can be triggered with this smaller snippet:

struct null_type;

template<typename T1, typename T2>
struct tuple_impl
{
  template<typename U>
  struct append
  {
    typedef tuple_impl<U, null_type> type;
  };

  int data;
};

template<typename T1, typename T2>
class tuple
: public tuple_impl<T1, null_type>::template append<T1>::type
{
  using tuple_impl<T1, null_type>::template append<T1>::type::data;
};

tuple<int, int>  my_tuple;

---------

Note that if I remove the now redundant template parameter T2 of tuple and
instantiate with typle<int>, we get immediately a bit of additional info:

33239_p2.C: In instantiation of ‘tuple<int>’:
33239_p2.C:22:   instantiated from here
33239_p2.C:19: internal compiler error: tree check: accessed elt 2 of tree_vec
with 1 elts in tsubst, at cp/pt.c:8601


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcarlini at suse dot de


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (6 preceding siblings ...)
  2007-09-08  2:22 ` pcarlini at suse dot de
@ 2007-09-23 18:24 ` jason at gcc dot gnu dot org
  2007-09-24 20:54 ` jason at gcc dot gnu dot org
  2007-09-24 20:56 ` [Bug c++/33239] [4.1/4.2 " jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-23 18:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-09-01 12:22:43         |2007-09-23 18:24:07
               date|                            |


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


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

* [Bug c++/33239] [4.1/4.2/4.3 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (7 preceding siblings ...)
  2007-09-23 18:24 ` jason at gcc dot gnu dot org
@ 2007-09-24 20:54 ` jason at gcc dot gnu dot org
  2007-09-24 20:56 ` [Bug c++/33239] [4.1/4.2 " jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-24 20:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2007-09-24 20:54 -------
Subject: Bug 33239

Author: jason
Date: Mon Sep 24 20:54:34 2007
New Revision: 128725

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128725
Log:
        PR c++/33239
        * pt.c (resolve_typename_type): Don't look things up in the original
        template if it would mean losing template arguments.

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


-- 


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


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

* [Bug c++/33239] [4.1/4.2 Regression] internal compiler error in instantiate_class_template, at cp/pt.c:5666
  2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
                   ` (8 preceding siblings ...)
  2007-09-24 20:54 ` jason at gcc dot gnu dot org
@ 2007-09-24 20:56 ` jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-24 20:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2007-09-24 20:56 -------
Fixed for 4.3.0.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.1.1 4.3.0                 |4.1.1
      Known to work|3.3.3                       |3.3.3 4.3.0
         Resolution|                            |FIXED
            Summary|[4.1/4.2/4.3 Regression]    |[4.1/4.2 Regression]
                   |internal compiler error in  |internal compiler error in
                   |instantiate_class_template, |instantiate_class_template,
                   |at cp/pt.c:5666             |at cp/pt.c:5666


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


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

end of thread, other threads:[~2007-09-24 20:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 21:54 [Bug c++/33239] New: internal compiler error in instantiate_class_template, at cp/pt.c:5666 masse_nicolas at yahoo dot fr
2007-08-29 21:57 ` [Bug c++/33239] " masse_nicolas at yahoo dot fr
2007-09-01  0:40 ` pinskia at gcc dot gnu dot org
2007-09-01  0:42 ` pinskia at gcc dot gnu dot org
2007-09-01  1:29 ` [Bug c++/33239] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-09-01 12:22 ` rguenth at gcc dot gnu dot org
2007-09-05  1:11 ` mmitchel at gcc dot gnu dot org
2007-09-08  2:22 ` pcarlini at suse dot de
2007-09-23 18:24 ` jason at gcc dot gnu dot org
2007-09-24 20:54 ` jason at gcc dot gnu dot org
2007-09-24 20:56 ` [Bug c++/33239] [4.1/4.2 " jason 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).