public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member
@ 2014-03-18 20:42 reichelt at gcc dot gnu.org
2014-03-18 20:43 ` [Bug c++/60572] " reichelt at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-18 20:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
Bug ID: 60572
Summary: [4.9 Regression] ICE deriving from class with invalid
member
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet triggers an ICE on trunk:
========================
struct A
{
A x;
virtual ~A() {}
};
struct B : A
{
B() : A() {}
};
========================
bug.cc:3:5: error: field 'x' has incomplete type 'A'
A x;
^
bug.cc: In constructor 'B::B()':
bug.cc:9:11: internal compiler error: Segmentation fault
B() : A() {}
^
0xbab3df crash_signal
../../gcc/gcc/toplev.c:337
0xb9e5a7 bit_from_pos(tree_node*, tree_node*)
../../gcc/gcc/stor-layout.c:784
0x70d066 build_zero_init_1
../../gcc/gcc/cp/init.c:200
0x70db00 expand_aggr_init_1
../../gcc/gcc/cp/init.c:1768
0x710f30 emit_mem_initializers(tree_node*)
../../gcc/gcc/cp/init.c:1087
0x6c6af3 cp_parser_mem_initializer_list
../../gcc/gcc/cp/parser.c:12329
0x6c6af3 cp_parser_ctor_initializer_opt
../../gcc/gcc/cp/parser.c:12240
0x6c6af3 cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18757
0x6cc8b2 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22897
0x6d4c50 cp_parser_late_parsing_for_member
../../gcc/gcc/cp/parser.c:23573
0x6ae6e6 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19509
0x6b07b0 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19533
0x6b07b0 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14331
0x6c8c80 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11567
0x6ce809 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11157
0x6b2983 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11106
0x6d9022 cp_parser_declaration
../../gcc/gcc/cp/parser.c:11003
0x6d7d18 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10889
0x6d95ca cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4030
0x6d95ca c_parse_file()
../../gcc/gcc/cp/parser.c:31645
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
@ 2014-03-18 20:43 ` reichelt at gcc dot gnu.org
2014-03-19 6:39 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-18 20:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.5.0, 4.6.0, 4.7.0, 4.8.0
Target Milestone|--- |4.9.0
Known to fail| |4.9.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
2014-03-18 20:43 ` [Bug c++/60572] " reichelt at gcc dot gnu.org
@ 2014-03-19 6:39 ` jakub at gcc dot gnu.org
2014-03-19 6:49 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-19 6:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-19
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r199779.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
2014-03-18 20:43 ` [Bug c++/60572] " reichelt at gcc dot gnu.org
2014-03-19 6:39 ` jakub at gcc dot gnu.org
@ 2014-03-19 6:49 ` jakub at gcc dot gnu.org
2014-03-19 9:58 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-19 6:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32386
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32386&action=edit
gcc49-pr60572.patch
Untested fix. Whether you want to fix it this way not sure.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-03-19 6:49 ` jakub at gcc dot gnu.org
@ 2014-03-19 9:58 ` rguenth at gcc dot gnu.org
2014-03-20 19:45 ` jakub at gcc dot gnu.org
2014-03-20 19:59 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-19 9:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-03-19 9:58 ` rguenth at gcc dot gnu.org
@ 2014-03-20 19:45 ` jakub at gcc dot gnu.org
2014-03-20 19:59 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-20 19:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 20 19:45:09 2014
New Revision: 208734
URL: http://gcc.gnu.org/viewcvs?rev=208734&root=gcc&view=rev
Log:
PR c++/60572
* init.c (build_zero_init_1): Ignore fields with error_mark_node
type.
* g++.dg/init/pr60572.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/init/pr60572.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60572] [4.9 Regression] ICE deriving from class with invalid member
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-03-20 19:45 ` jakub at gcc dot gnu.org
@ 2014-03-20 19:59 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-20 19:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60572
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-20 19:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 20:42 [Bug c++/60572] New: [4.9 Regression] ICE deriving from class with invalid member reichelt at gcc dot gnu.org
2014-03-18 20:43 ` [Bug c++/60572] " reichelt at gcc dot gnu.org
2014-03-19 6:39 ` jakub at gcc dot gnu.org
2014-03-19 6:49 ` jakub at gcc dot gnu.org
2014-03-19 9:58 ` rguenth at gcc dot gnu.org
2014-03-20 19:45 ` jakub at gcc dot gnu.org
2014-03-20 19:59 ` jakub at gcc dot gnu.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).