public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38634]  New: ICE with wrong number of template parameters
@ 2008-12-26 22:01 reichelt at gcc dot gnu dot org
  2008-12-26 22:29 ` [Bug c++/38634] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-12-26 22:01 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since at least GCC 2.95.3:

========================================
template<int> struct A
{
  A();
};

template<int N, char> A<N>::A()
{
  struct B {};
}

A<0> a;
========================================

bug.cc:6: error: got 2 template parameters for 'A<<anonymous> >::A()'
bug.cc:6: error:   but 1 required
bug.cc: In constructor 'A<<anonymous> >::A() [with int <anonymous> = 0]':
bug.cc:11:   instantiated from here
bug.cc:8: internal compiler error: tree check: accessed elt 2 of tree_vec with
1 elts in tsubst, at cp/pt.c:9048
Please submit a full bug report, [etc.]


-- 
           Summary: ICE with wrong number of template parameters
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-38634-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-07-04 21:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-26 22:01 [Bug c++/38634] New: ICE with wrong number of template parameters reichelt at gcc dot gnu dot org
2008-12-26 22:29 ` [Bug c++/38634] " pinskia at gcc dot gnu dot org
     [not found] <bug-38634-4@http.gcc.gnu.org/bugzilla/>
2011-05-03 22:56 ` paolo.carlini at oracle dot com
2011-05-03 23:54 ` jason at gcc dot gnu.org
2011-05-04 12:08 ` paolo.carlini at oracle dot com
2013-06-09 22:19 ` paolo.carlini at oracle dot com
2013-07-04 21:59 ` paolo.carlini at oracle dot com

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).