From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6952 invoked by alias); 5 Jul 2006 00:12:23 -0000 Received: (qmail 6928 invoked by uid 48); 5 Jul 2006 00:12:16 -0000 Date: Wed, 05 Jul 2006 00:12:00 -0000 Subject: [Bug c++/28260] New: ICE with incompatible friend declaration X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00232.txt.bz2 List-Id: The following invalid testcase triggers an ICE since at least GCC 2.95.3: ========================================= template 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