public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references
@ 2013-10-05 22:02 reichelt at gcc dot gnu.org
2013-10-10 11:51 ` [Bug c++/58636] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-05 22:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
Bug ID: 58636
Summary: [4.7/4.8/4.9 Regression] ICE with initializer_list and
rvalue references
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 similar invalid code snippets (compiled with "-std=c++11")
trigger ICEs in different parts of the compiler:
========================================
#include <initializer_list>
int foo(std::initializer_list<int&&>);
int i = foo({ 0 });
========================================
bug.cc:5:18: error: 'const' qualifiers cannot be applied to 'int&&'
int i = foo({ 0 });
^
In file included from bug.cc:1:0:
.../include/c++/4.9.0/initializer_list: In instantiation of 'class
std::initializer_list<int&&>':
bug.cc:5:18: required from here
.../include/c++/4.9.0/initializer_list:54:26: error: forming pointer to
reference type 'int&&'
typedef const _E* iterator;
^
.../include/c++/4.9.0/initializer_list:55:26: error: forming pointer to
reference type 'int&&'
typedef const _E* const_iterator;
^
bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
bug.cc:5:18: internal compiler error: in gimplify_init_ctor_eval, at
gimplify.c:3734
int i = foo({ 0 });
^
0x96977d gimplify_init_ctor_eval
../../gcc/gcc/gimplify.c:3734
0x96fbd4 gimplify_init_constructor
../../gcc/gcc/gimplify.c:4133
0x970a7e gimplify_modify_expr_rhs
../../gcc/gcc/gimplify.c:4518
0x970de4 gimplify_modify_expr
../../gcc/gcc/gimplify.c:4834
0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7332
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x964130 gimplify_and_add
../../gcc/gcc/gimplify.c:329
0x964130 internal_get_tmp_var
../../gcc/gcc/gimplify.c:594
0x964bae gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:8163
0x96dec9 gimplify_call_expr
../../gcc/gcc/gimplify.c:2635
0x96567a gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7303
0x970f58 gimplify_modify_expr
../../gcc/gcc/gimplify.c:4875
0x9661d5 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7332
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x9656fe gimplify_cleanup_point_expr
../../gcc/gcc/gimplify.c:5485
0x9656fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7669
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
0x964f9b gimplify_statement_list
../../gcc/gcc/gimplify.c:1525
0x964f9b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7721
0x9691a6 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5709
Please submit a full bug report, [etc.]
===========================================
#include <initializer_list>
auto i = std::initializer_list<int&&>{ 0 };
===========================================
In file included from bug.cc:1:0:
.../include/c++/4.9.0/initializer_list: In instantiation of 'class
std::initializer_list<int&&>':
bug.cc:3:42: required from here
.../include/c++/4.9.0/initializer_list:54:26: error: forming pointer to
reference type 'int&&'
typedef const _E* iterator;
^
.../include/c++/4.9.0/initializer_list:55:26: error: forming pointer to
reference type 'int&&'
typedef const _E* const_iterator;
^
bug.cc:3:42: error: 'const' qualifiers cannot be applied to 'int&&'
auto i = std::initializer_list<int&&>{ 0 };
^
bug.cc:3:42: internal compiler error: in split_nonconstant_init_1, at
cp/typeck2.c:597
0x5dd883 split_nonconstant_init_1
../../gcc/gcc/cp/typeck2.c:597
0x5e0f12 split_nonconstant_init
../../gcc/gcc/cp/typeck2.c:692
0x5e0f12 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../gcc/gcc/cp/typeck2.c:810
0x557478 check_initializer
../../gcc/gcc/cp/decl.c:5728
0x56a35c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6347
0x651267 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16577
0x65198f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10995
0x653810 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10876
0x65c83e cp_parser_declaration
../../gcc/gcc/cp/parser.c:10773
0x65b5aa cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10659
0x65ce76 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3939
0x65ce76 c_parse_file()
../../gcc/gcc/cp/parser.c:28911
0x7708b3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
@ 2013-10-10 11:51 ` rguenth at gcc dot gnu.org
2014-06-12 13:47 ` [Bug c++/58636] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-10 11:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.7/4.8/4.9/4.10 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
2013-10-10 11:51 ` [Bug c++/58636] " rguenth at gcc dot gnu.org
@ 2014-06-12 13:47 ` rguenth at gcc dot gnu.org
2014-07-13 15:57 ` [Bug c++/58636] [4.8/4.9/4.10 " jason at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.4 |4.8.4
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.8/4.9/4.10 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
2013-10-10 11:51 ` [Bug c++/58636] " rguenth at gcc dot gnu.org
2014-06-12 13:47 ` [Bug c++/58636] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-07-13 15:57 ` jason at gcc dot gnu.org
2014-07-14 5:25 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-13 15:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-07-13
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.8/4.9/4.10 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-07-13 15:57 ` [Bug c++/58636] [4.8/4.9/4.10 " jason at gcc dot gnu.org
@ 2014-07-14 5:25 ` jason at gcc dot gnu.org
2014-07-14 5:28 ` jason at gcc dot gnu.org
2014-07-14 5:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-14 5:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Jul 14 05:25:13 2014
New Revision: 212503
URL: https://gcc.gnu.org/viewcvs?rev=212503&root=gcc&view=rev
Log:
PR c++/58636
* call.c (build_list_conv): Don't try to build a list of references.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist-array4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.8/4.9/4.10 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-07-14 5:25 ` jason at gcc dot gnu.org
@ 2014-07-14 5:28 ` jason at gcc dot gnu.org
2014-07-14 5:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-14 5:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Jul 14 05:28:21 2014
New Revision: 212508
URL: https://gcc.gnu.org/viewcvs?rev=212508&root=gcc&view=rev
Log:
PR c++/58636
* call.c (build_list_conv): Don't try to build a list of references.
Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/initlist-array4.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/call.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58636] [4.8/4.9/4.10 Regression] ICE with initializer_list and rvalue references
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-07-14 5:28 ` jason at gcc dot gnu.org
@ 2014-07-14 5:28 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-14 5:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58636
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|4.8.4 |4.9.1
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.9.1.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-14 5:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-05 22:02 [Bug c++/58636] New: [4.7/4.8/4.9 Regression] ICE with initializer_list and rvalue references reichelt at gcc dot gnu.org
2013-10-10 11:51 ` [Bug c++/58636] " rguenth at gcc dot gnu.org
2014-06-12 13:47 ` [Bug c++/58636] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-07-13 15:57 ` [Bug c++/58636] [4.8/4.9/4.10 " jason at gcc dot gnu.org
2014-07-14 5:25 ` jason at gcc dot gnu.org
2014-07-14 5:28 ` jason at gcc dot gnu.org
2014-07-14 5:28 ` 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).