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

* [Bug c++/28260] ICE with incompatible friend declaration
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-17 22:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

lmillward at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lmillward at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-17 22:07:04
               date|                            |


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


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

* [Bug c++/28260] ICE with incompatible friend declaration
  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
  2 siblings, 0 replies; 4+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-18 17:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from lmillward at gcc dot gnu dot org  2006-07-18 17:22 -------
Subject: Bug 28260

Author: lmillward
Date: Tue Jul 18 17:22:39 2006
New Revision: 115561

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115561
Log:
        PR c++/28258
        * method.c (locate_copy): Check for non_reference
        returning error_mark_node.

        PR c++/28260
        * decl.c (duplicate_decls): Return error_mark_node
        on ambiguous declaration.

        PR c++/28258
        * g++/dg/other/error13.C: New test.

        PR c++/28260
        * g++.dg/template/friend44.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/other/error13.C
    trunk/gcc/testsuite/g++.dg/template/friend44.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/method.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28260] ICE with incompatible friend declaration
  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
  2 siblings, 0 replies; 4+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-18 17:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from lmillward at gcc dot gnu dot org  2006-07-18 17:24 -------
Fixed on mainline.


-- 

lmillward at gcc dot gnu dot org changed:

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


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