public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58882] New: ICE with invalid C99 style designated initializers
@ 2013-10-25 20:36 reichelt at gcc dot gnu.org
2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-25 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
Bug ID: 58882
Summary: ICE with invalid C99 style designated initializers
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 invalid code snippet triggers an ICE since GCC 4.7.0 (when C99
style designated initializers were introduced in the C++ front-end):
=============================
int a[] = { [0.] = 0 };
=============================
bug.cc:1:22: internal compiler error: in check_array_designated_initializer, at
cp/decl.c:4812
int a[] = { [0.] = 0 };
^
0x55aa63 check_array_designated_initializer
../../gcc/gcc/cp/decl.c:4812
0x562bbf reshape_init_array_1
../../gcc/gcc/cp/decl.c:5109
0x561c79 reshape_init(tree_node*, tree_node*, int)
../../gcc/gcc/cp/decl.c:5498
0x563cd3 check_initializer
../../gcc/gcc/cp/decl.c:5667
0x5766fc cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6356
0x663f57 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16652
0x66569f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11066
0x6495e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10947
0x6708fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10844
0x66f61a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10730
0x670f36 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3990
0x670f36 c_parse_file()
../../gcc/gcc/cp/parser.c:30999
0x78e183 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/58882] ICE with invalid C99 style designated initializers
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
@ 2014-12-12 22:03 ` paolo.carlini at oracle dot com
2014-12-12 23:22 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 22:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-12
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/58882] ICE with invalid C99 style designated initializers
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
@ 2014-12-12 23:22 ` paolo.carlini at oracle dot com
2014-12-15 16:17 ` paolo at gcc dot gnu.org
2014-12-15 16:18 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 23:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/58882] ICE with invalid C99 style designated initializers
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
2014-12-12 23:22 ` paolo.carlini at oracle dot com
@ 2014-12-15 16:17 ` paolo at gcc dot gnu.org
2014-12-15 16:18 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-12-15 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon Dec 15 16:16:29 2014
New Revision: 218752
URL: https://gcc.gnu.org/viewcvs?rev=218752&root=gcc&view=rev
Log:
/cp
2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58882
* decl.c (check_array_designated_initializer): Diagnose gracefully
C99 designators which aren't integral constant-expressions; allow
constexpr user-defined type conversion operators.
/testsuite
2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58882
* g++.dg/ext/desig8.C: New.
* g++.dg/cpp0x/desig1.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/desig1.C
trunk/gcc/testsuite/g++.dg/ext/desig8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/58882] ICE with invalid C99 style designated initializers
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-12-15 16:17 ` paolo at gcc dot gnu.org
@ 2014-12-15 16:18 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-15 16:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58882
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org
Target Milestone|--- |5.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-15 16:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-25 20:36 [Bug c++/58882] New: ICE with invalid C99 style designated initializers reichelt at gcc dot gnu.org
2014-12-12 22:03 ` [Bug c++/58882] " paolo.carlini at oracle dot com
2014-12-12 23:22 ` paolo.carlini at oracle dot com
2014-12-15 16:17 ` paolo at gcc dot gnu.org
2014-12-15 16:18 ` paolo.carlini at oracle dot com
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).