public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization
@ 2014-02-04 7:07 reichelt at gcc dot gnu.org
2014-02-04 7:08 ` [Bug c++/60051] " 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-02-04 7:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Bug ID: 60051
Summary: [4.9 Regression] [c++11] ICE with auto and array
initialization
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 (compiled with "-std=c++11") triggers an
ICE on trunk:
==================================
#include <initializer_list>
auto x[2] = {};
==================================
bug.cc:3:14: internal compiler error: tree check: expected integer_type or
enumeral_type or boolean_type or real_type or fixed_point_type, have error_mark
in unify_array_domain, at cp/pt.c:17098
auto x[2] = {};
^
0xdc4964 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9192
0x6394e9 tree_check5
../../gcc/gcc/tree.h:2800
0x6394e9 unify_array_domain
../../gcc/gcc/cp/pt.c:17098
0x636a8e unify
../../gcc/gcc/cp/pt.c:17263
0x639b17 unify_one_argument
../../gcc/gcc/cp/pt.c:16161
0x63bf74 type_unification_real
../../gcc/gcc/cp/pt.c:16233
0x649b8a do_auto_deduction(tree_node*, tree_node*, tree_node*)
../../gcc/gcc/cp/pt.c:21471
0x5db471 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6200
0x6caa1d cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16815
0x6cc1d9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11205
0x6af4b3 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11086
0x6d67b2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10983
0x6d54a8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6d6d8a cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6d6d8a c_parse_file()
../../gcc/gcc/cp/parser.c:31528
0x7f66d3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
The regression was introduced between 2013-10-12 and 2013-10-19.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
@ 2014-02-04 7:08 ` reichelt at gcc dot gnu.org
2014-02-04 9:52 ` 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-02-04 7:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Known to work| |4.4.0, 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++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
2014-02-04 7:08 ` [Bug c++/60051] " reichelt at gcc dot gnu.org
@ 2014-02-04 9:52 ` jakub at gcc dot gnu.org
2014-02-04 9:56 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-04 9:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-04
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> ---
namespace std
{
typedef __SIZE_TYPE__ size_t;
template<class T>
struct initializer_list
{
const T *c;
size_t d;
constexpr initializer_list(const T *x, size_t y) : c(x), d(y) { }
constexpr initializer_list() noexcept : c(0), d(0) { }
};
}
auto x[2] = {};
(though of course, the original testcase is likely better for the testsuite).
Started with r203725.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
2014-02-04 7:08 ` [Bug c++/60051] " reichelt at gcc dot gnu.org
2014-02-04 9:52 ` jakub at gcc dot gnu.org
@ 2014-02-04 9:56 ` rguenth at gcc dot gnu.org
2014-02-21 5:25 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-04 9:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-02-04 9:56 ` rguenth at gcc dot gnu.org
@ 2014-02-21 5:25 ` jason at gcc dot gnu.org
2014-02-21 14:56 ` jason at gcc dot gnu.org
2014-02-21 15:39 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 5:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-02-21 5:25 ` jason at gcc dot gnu.org
@ 2014-02-21 14:56 ` jason at gcc dot gnu.org
2014-02-21 15:39 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 14:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 14:56:20 2014
New Revision: 207998
URL: http://gcc.gnu.org/viewcvs?rev=207998&root=gcc&view=rev
Log:
DR 1591
PR c++/60051
* pt.c (unify): Only unify if deducible. Handle 0-length list.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist80.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/60051] [4.9 Regression] [c++11] ICE with auto and array initialization
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-02-21 14:56 ` jason at gcc dot gnu.org
@ 2014-02-21 15:39 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 15:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60051
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-21 15:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 7:07 [Bug c++/60051] New: [4.9 Regression] [c++11] ICE with auto and array initialization reichelt at gcc dot gnu.org
2014-02-04 7:08 ` [Bug c++/60051] " reichelt at gcc dot gnu.org
2014-02-04 9:52 ` jakub at gcc dot gnu.org
2014-02-04 9:56 ` rguenth at gcc dot gnu.org
2014-02-21 5:25 ` jason at gcc dot gnu.org
2014-02-21 14:56 ` jason at gcc dot gnu.org
2014-02-21 15:39 ` 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).