public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
@ 2013-10-12 21:01 ` reichelt at gcc dot gnu.org
2013-10-13 0:30 ` paolo.carlini at oracle dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-12 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0, 4.8.0
Target Milestone|--- |4.9.0
Known to fail| |4.9.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union
@ 2013-10-12 21:01 reichelt at gcc dot gnu.org
2013-10-12 21:01 ` [Bug c++/58701] " reichelt at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-12 21:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Bug ID: 58701
Summary: [4.9 Regression] [c++11] ICE initializing member of
static union
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following valid code snippet (compiled with "-std=c++11") triggers an ICE
on trunk (since at least 4.9.0 20130920):
===============
static union
{
union
{
int i = 0;
};
};
===============
bug.cc: In constructor 'constexpr<anonymous union>::<constructor>()':
bug.cc:2:1: internal compiler error: tree check: accessed operand 2 of
indirect_ref with 1 operands in build_anon_member_initialization, at
cp/semantics.c:7404
{
^
0xd201a7 tree_operand_check_failed(int, tree_node const*, char const*, int,
char const*)
../../gcc/gcc/tree.c:9499
0x6d2677 tree_operand_check
../../gcc/gcc/tree.h:3109
0x6d2677 build_anon_member_initialization
../../gcc/gcc/cp/semantics.c:7404
0x6d2677 build_data_member_initialization
../../gcc/gcc/cp/semantics.c:7533
0x6d338d build_constexpr_constructor_member_initializers
../../gcc/gcc/cp/semantics.c:7652
0x6d338d massage_constexpr_body
../../gcc/gcc/cp/semantics.c:7752
0x6da9a3 register_constexpr_fundef(tree_node*, tree_node*)
../../gcc/gcc/cp/semantics.c:7856
0x56ea38 maybe_save_function_definition
../../gcc/gcc/cp/decl.c:13823
0x56ea38 finish_function(int)
../../gcc/gcc/cp/decl.c:13944
0x6acc19 synthesize_method(tree_node*)
../../gcc/gcc/cp/method.c:809
0x61e379 mark_used(tree_node*, int)
../../gcc/gcc/cp/decl2.c:4778
0x54d0b6 build_over_call
../../gcc/gcc/cp/call.c:7116
0x548eae build_new_method_call_1
../../gcc/gcc/cp/call.c:7813
0x548eae build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
../../gcc/gcc/cp/call.c:7883
0x549e22 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
../../gcc/gcc/cp/call.c:7440
0x69eba7 expand_default_init
../../gcc/gcc/cp/init.c:1668
0x69eba7 expand_aggr_init_1
../../gcc/gcc/cp/init.c:1769
0x6a1779 build_aggr_init(tree_node*, tree_node*, int, int)
../../gcc/gcc/cp/init.c:1520
0x55e005 build_aggr_init_full_exprs
../../gcc/gcc/cp/decl.c:5552
0x55e005 check_initializer
../../gcc/gcc/cp/decl.c:5687
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
2013-10-12 21:01 ` [Bug c++/58701] " reichelt at gcc dot gnu.org
@ 2013-10-13 0:30 ` paolo.carlini at oracle dot com
2013-10-14 11:22 ` mpolacek at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-13 0:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-10-13
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is the relevant change: r199455. CC-ing Jason.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
2013-10-12 21:01 ` [Bug c++/58701] " reichelt at gcc dot gnu.org
2013-10-13 0:30 ` paolo.carlini at oracle dot com
@ 2013-10-14 11:22 ` mpolacek at gcc dot gnu.org
2013-10-31 13:19 ` paolo.carlini at oracle dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-10-14 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Isn't this by any chance invalid? Anonymous aggregates cannot have members
with constructors.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-10-14 11:22 ` mpolacek at gcc dot gnu.org
@ 2013-10-31 13:19 ` paolo.carlini at oracle dot com
2013-11-05 15:01 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-31 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
However, I think this is invalid
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-10-31 13:19 ` paolo.carlini at oracle dot com
@ 2013-11-05 15:01 ` rguenth at gcc dot gnu.org
2013-11-18 17:07 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 15:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code,
| |ice-on-valid-code
Priority|P3 |P1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2013-11-05 15:01 ` rguenth at gcc dot gnu.org
@ 2013-11-18 17:07 ` paolo.carlini at oracle dot com
2013-11-19 9:57 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-18 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |
Priority|P1 |P3
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This appears to be invalid, thus unlikely to be P1.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2013-11-18 17:07 ` paolo.carlini at oracle dot com
@ 2013-11-19 9:57 ` rguenth at gcc dot gnu.org
2013-12-17 19:28 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19 9:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (6 preceding siblings ...)
2013-11-19 9:57 ` rguenth at gcc dot gnu.org
@ 2013-12-17 19:28 ` mpolacek at gcc dot gnu.org
2014-01-27 16:25 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-12-17 19:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P1 |P2
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Downgrading to P2.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (7 preceding siblings ...)
2013-12-17 19:28 ` mpolacek at gcc dot gnu.org
@ 2014-01-27 16:25 ` jason at gcc dot gnu.org
2014-01-27 17:24 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 16:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Duplicate.
*** This bug has been marked as a duplicate of bug 58965 ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (8 preceding siblings ...)
2014-01-27 16:25 ` jason at gcc dot gnu.org
@ 2014-01-27 17:24 ` mpolacek at gcc dot gnu.org
2014-01-28 21:05 ` jason at gcc dot gnu.org
2014-01-28 21:05 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-27 17:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Resolution|DUPLICATE |---
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Actually, this one still ICEs.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (9 preceding siblings ...)
2014-01-27 17:24 ` mpolacek at gcc dot gnu.org
@ 2014-01-28 21:05 ` jason at gcc dot gnu.org
2014-01-28 21:05 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 21:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
` (10 preceding siblings ...)
2014-01-28 21:05 ` jason at gcc dot gnu.org
@ 2014-01-28 21:05 ` jason at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 21:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 21:04:44 2014
New Revision: 207209
URL: http://gcc.gnu.org/viewcvs?rev=207209&root=gcc&view=rev
Log:
PR c++/58701
* semantics.c (build_anon_member_initialization): Stop walking
when we run out of COMPONENT_REFs.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-01-28 21:05 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-12 21:01 [Bug c++/58701] New: [4.9 Regression] [c++11] ICE initializing member of static union reichelt at gcc dot gnu.org
2013-10-12 21:01 ` [Bug c++/58701] " reichelt at gcc dot gnu.org
2013-10-13 0:30 ` paolo.carlini at oracle dot com
2013-10-14 11:22 ` mpolacek at gcc dot gnu.org
2013-10-31 13:19 ` paolo.carlini at oracle dot com
2013-11-05 15:01 ` rguenth at gcc dot gnu.org
2013-11-18 17:07 ` paolo.carlini at oracle dot com
2013-11-19 9:57 ` rguenth at gcc dot gnu.org
2013-12-17 19:28 ` mpolacek at gcc dot gnu.org
2014-01-27 16:25 ` jason at gcc dot gnu.org
2014-01-27 17:24 ` mpolacek at gcc dot gnu.org
2014-01-28 21:05 ` jason at gcc dot gnu.org
2014-01-28 21:05 ` jason 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).