public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class
@ 2008-01-21 23:29 reichelt at gcc dot gnu dot org
2008-01-21 23:30 ` [Bug c++/34912] " reichelt at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-01-21 23:29 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet triggers an ICE since GCC 4.1.2:
============================================
void foo()
{
struct A
{
friend void bar();
};
bar();
}
============================================
bug.cc: In function 'void foo()':
bug.cc:7: internal compiler error: in lookup_name_real, at
cp/name-lookup.c:4054
Please submit a full bug report, [etc.]
The code was wrongfully accepted before GCC 4.1.0, but correctly diagnosed in
GCC 4.1.0 and 4.1.1.
--
Summary: [4.1/4.2/4.3 regression] ICE with friend in local class
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, 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=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2/4.3 regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
@ 2008-01-21 23:30 ` reichelt at gcc dot gnu dot org
2008-01-22 10:57 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-01-21 23:30 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2/4.3 regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
2008-01-21 23:30 ` [Bug c++/34912] " reichelt at gcc dot gnu dot org
@ 2008-01-22 10:57 ` rguenth at gcc dot gnu dot org
2008-01-22 17:00 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-22 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-01-22 10:48 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2008-01-22 10:48:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2/4.3 regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
2008-01-21 23:30 ` [Bug c++/34912] " reichelt at gcc dot gnu dot org
2008-01-22 10:57 ` rguenth at gcc dot gnu dot org
@ 2008-01-22 17:00 ` jason at gcc dot gnu dot org
2008-01-22 20:07 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-01-22 17:00 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-01-22 10:48:45 |2008-01-22 16:22:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2/4.3 regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-01-22 17:00 ` jason at gcc dot gnu dot org
@ 2008-01-22 20:07 ` jason at gcc dot gnu dot org
2008-01-22 20:13 ` [Bug c++/34912] [4.1/4.2 Regression] " jason at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-01-22 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jason at gcc dot gnu dot org 2008-01-22 19:51 -------
Subject: Bug 34912
Author: jason
Date: Tue Jan 22 19:50:37 2008
New Revision: 131740
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131740
Log:
PR c++/34912
* friend.c (do_friend): Check for prior declaration of a friend
function of a local class.
* name-lookup.c (lookup_name_innermost_nonclass_level):
No longer static.
* name-lookup.h: Declare it.
Added:
trunk/gcc/testsuite/g++.dg/lookup/friend12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/friend.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/name-lookup.h
trunk/gcc/testsuite/g++.dg/parse/local-class1.C
trunk/gcc/testsuite/g++.old-deja/g++.jason/scoping12.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2 Regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-01-22 20:13 ` [Bug c++/34912] [4.1/4.2 Regression] " jason at gcc dot gnu dot org
@ 2008-01-22 20:13 ` rguenth at gcc dot gnu dot org
2008-09-18 19:19 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-22 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-01-22 20:06 -------
Fixed on the trunk.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.3 4.2.3
Known to work| |4.1.1 4.3.0
Summary|[4.1/4.2/4.3 regression] ICE|[4.1/4.2 Regression] ICE
|with friend in local class |with friend in local class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2 Regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-22 20:07 ` jason at gcc dot gnu dot org
@ 2008-01-22 20:13 ` jason at gcc dot gnu dot org
2008-01-22 20:13 ` rguenth at gcc dot gnu dot org
2008-09-18 19:19 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-01-22 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jason at gcc dot gnu dot org 2008-01-22 20:07 -------
Not worth fixing in 4.1/4.2.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/34912] [4.1/4.2 Regression] ICE with friend in local class
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-01-22 20:13 ` rguenth at gcc dot gnu dot org
@ 2008-09-18 19:19 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-18 19:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-09-18 19:18 -------
*** Bug 37570 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefan dot petrea at gmail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34912
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-18 19:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-21 23:29 [Bug c++/34912] New: [4.1/4.2/4.3 regression] ICE with friend in local class reichelt at gcc dot gnu dot org
2008-01-21 23:30 ` [Bug c++/34912] " reichelt at gcc dot gnu dot org
2008-01-22 10:57 ` rguenth at gcc dot gnu dot org
2008-01-22 17:00 ` jason at gcc dot gnu dot org
2008-01-22 20:07 ` jason at gcc dot gnu dot org
2008-01-22 20:13 ` [Bug c++/34912] [4.1/4.2 Regression] " jason at gcc dot gnu dot org
2008-01-22 20:13 ` rguenth at gcc dot gnu dot org
2008-09-18 19:19 ` pinskia 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).