public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28260]  New: ICE with incompatible friend declaration
@ 2006-07-05  0:12 reichelt at gcc dot gnu dot org
  2006-07-17 22:07 ` [Bug c++/28260] " lmillward at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-05  0:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

void foo() { A<0> a; }
=========================================

bug.cc: In instantiation of 'A<0>':
bug.cc:6:   instantiated from here
bug.cc:3: error: new declaration 'int foo()'
bug.cc:6: error: ambiguates old declaration 'void foo()'
bug.cc: In function 'int foo()':
bug.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


-- 
           Summary: ICE with incompatible friend declaration
           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=28260


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

end of thread, other threads:[~2006-07-18 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-05  0:12 [Bug c++/28260] New: ICE with incompatible friend declaration reichelt at gcc dot gnu dot org
2006-07-17 22:07 ` [Bug c++/28260] " lmillward at gcc dot gnu dot org
2006-07-18 17:22 ` lmillward at gcc dot gnu dot org
2006-07-18 17:24 ` lmillward 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).