public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27496]  New: ICE on broken templated friend
@ 2006-05-08 15:37 reichelt at gcc dot gnu dot org
  2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-08 15:37 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes an ICE since GCC 3.0:

===================================
template<int> struct A
{
    template<void> friend class X;
};

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

bug.cc:3: error: 'void' is not a valid type for a template constant parameter
bug.cc: In instantiation of 'A<0>':
bug.cc:6:   instantiated from here
bug.cc:3: error: 'void' is not a valid type for a template constant parameter
bug.cc:3: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark'  in tsubst_friend_class, at
cp/pt.c:5443
Please submit a full bug report, [etc.]

GCC 2.95.3 wrongly accepted the code.


-- 
           Summary: ICE on broken templated friend
           Product: gcc
           Version: 4.2.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=27496


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

end of thread, other threads:[~2006-05-15 19:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 15:37 [Bug c++/27496] New: ICE on broken templated friend reichelt at gcc dot gnu dot org
2006-05-08 15:38 ` [Bug c++/27496] " reichelt at gcc dot gnu dot org
2006-05-08 15:46 ` pinskia at gcc dot gnu dot org
2006-05-09 14:51 ` patchapp at dberlin dot org
2006-05-15  8:53 ` reichelt at gcc dot gnu dot org
2006-05-15  9:01 ` reichelt at gcc dot gnu dot org
2006-05-15 19:37 ` patchapp at dberlin 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).