public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend
@ 2005-07-04 10:39 reichelt at gcc dot gnu dot org
2005-07-04 10:44 ` [Bug c++/22293] " pinskia 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 @ 2005-07-04 10:39 UTC (permalink / raw)
To: gcc-bugs
Since gcc 4.0.0 the following code snippet causes a segfault:
\x13================================
struct A
{
friend ~A();
};
=================================
bug.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
The compiler used to give a warning before:
bug.cc:3: warning: member functions are implicitly friends of their class
--
Summary: [4.0/4.1 regression] ICE declaring destructor as friend
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
@ 2005-07-04 10:44 ` pinskia at gcc dot gnu dot org
2005-07-04 10:52 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-04 10:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-04 10:44 -------
Confirmed. This was introduced after "20041124" but before "20050225".
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-07-04 10:44:12
date| |
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
2005-07-04 10:44 ` [Bug c++/22293] " pinskia at gcc dot gnu dot org
@ 2005-07-04 10:52 ` pinskia at gcc dot gnu dot org
2005-08-03 17:25 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-04 10:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-04 10:52 -------
This is invalid code.
The following is still invalid code (but closer to legal code):
struct B
{
~B();
};
struct A
{
friend ~B();
};
Add B:: infront of the destructor fixes both the ICE and validness of the testcase.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
2005-07-04 10:44 ` [Bug c++/22293] " pinskia at gcc dot gnu dot org
2005-07-04 10:52 ` pinskia at gcc dot gnu dot org
@ 2005-08-03 17:25 ` reichelt at gcc dot gnu dot org
2005-08-08 14:23 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-03 17:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-03 17:25 -------
Working on a patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-08-03 17:25 ` reichelt at gcc dot gnu dot org
@ 2005-08-08 14:23 ` reichelt at gcc dot gnu dot org
2005-09-10 5:21 ` pinskia at gcc dot gnu dot org
2005-09-27 16:09 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-08 14:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |reichelt at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-08-08 14:23 ` reichelt at gcc dot gnu dot org
@ 2005-09-10 5:21 ` pinskia at gcc dot gnu dot org
2005-09-27 16:09 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-10 5:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-10 05:21 -------
Backtrace:
#0 0x080fc839 in comptypes (t1=0xb7cc3844, t2=0x0, strict=0) at /home/peshtigo/pinskia/src/
gnu/gcc/src/gcc/cp/typeck.c:933
#1 0x08077a83 in grokdeclarator (declarator=0x91509b4, declspecs=0xbffb4660,
decl_context=FIELD, initialized=0, attrlist=0xbffb4630)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/decl.c:7962
#2 0x080d316e in grokfield (declarator=0x91509d4, declspecs=0xbffb4660, init=0x0,
asmspec_tree=0x0, attrlist=0x0)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/decl2.c:833
#3 0x080e9381 in cp_parser_member_declaration (parser=0xb7cc4ea0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/cp/parser.c:13512
#4 0x080ea1fe in cp_parser_type_specifier (parser=0xb7cc4ea0, flags=Variable "flags" is not available.
) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:13169
#5 0x080ebbd2 in cp_parser_decl_specifier_seq (parser=0xb7cc4ea0,
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0xbffb47c8, declares_class_or_enum=0xbffb4814)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:7406
#6 0x080f3f50 in cp_parser_simple_declaration (parser=0xb7cc4ea0, function_definition_allowed_p=1
'\001')
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:7102
#7 0x080f432a in cp_parser_block_declaration (parser=0xb7cc4ea0, statement_p=0 '\0') at /home/
peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:7063
#8 0x080f4f27 in cp_parser_declaration (parser=0xb7cc4ea0) at /home/peshtigo/pinskia/src/gnu/
gcc/src/gcc/cp/parser.c:6980
#9 0x080f5635 in cp_parser_declaration_seq_opt (parser=0xb7cc4ea0) at /home/peshtigo/pinskia/
src/gnu/gcc/src/gcc/cp/parser.c:6879
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/22293] [4.0/4.1 regression] ICE declaring destructor as friend
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-09-10 5:21 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 16:09 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22293
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-27 16:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-04 10:39 [Bug c++/22293] New: [4.0/4.1 regression] ICE declaring destructor as friend reichelt at gcc dot gnu dot org
2005-07-04 10:44 ` [Bug c++/22293] " pinskia at gcc dot gnu dot org
2005-07-04 10:52 ` pinskia at gcc dot gnu dot org
2005-08-03 17:25 ` reichelt at gcc dot gnu dot org
2005-08-08 14:23 ` reichelt at gcc dot gnu dot org
2005-09-10 5:21 ` pinskia at gcc dot gnu dot org
2005-09-27 16:09 ` mmitchel 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).