public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
@ 2020-03-12 13:34 redi at gcc dot gnu.org
2020-03-12 13:35 ` [Bug c++/94155] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-12 13:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
Bug ID: 94155
Summary: internal compiler error: in gimplify_init_ctor_eval,
at gimplify.c:4664
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
I get an ICE with this use of parenthesized aggregate init (which needs
-std=gnu++2a to compile, and is a new feature so isn't a regression):
#include <utility>
void f()
{
std::pair<int, std::pair<int, int>> p[2]( {1, {1, 1}}, {1, {1, 1}} );
}
t.cc:4:39: internal compiler error: in gimplify_init_ctor_eval, at
gimplify.c:4664
0x72e354 gimplify_init_ctor_eval
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:4664
0xda9064 gimplify_init_constructor
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:5107
0xda9cc5 gimplify_modify_expr_rhs
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:5370
0xda9eea gimplify_modify_expr
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:5721
0xdac158 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:13602
0xdafc36 gimplify_stmt(tree_node**, gimple**)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:6823
0xdb87d8 gimplify_and_add(tree_node*, gimple**)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:486
0xdb87d8 gimplify_decl_expr
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:1816
0xdad35d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:13799
0xdafc36 gimplify_stmt(tree_node**, gimple**)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:6823
0xdad1d9 gimplify_cleanup_point_expr
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:6565
0xdad1d9 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:13994
0xdafc36 gimplify_stmt(tree_node**, gimple**)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:6823
0xdb09be gimplify_bind_expr
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:1424
0xdad324 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:13803
0xdafc36 gimplify_stmt(tree_node**, gimple**)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:6823
0xdb16eb gimplify_body(tree_node*, bool)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:14851
0xdb1ac7 gimplify_function_tree(tree_node*)
/home/jwakely/src/gcc/gcc/gcc/gimplify.c:14995
0xc166d7 cgraph_node::analyze()
/home/jwakely/src/gcc/gcc/gcc/cgraphunit.c:669
0xc1957a analyze_functions
/home/jwakely/src/gcc/gcc/gcc/cgraphunit.c:1210
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
@ 2020-03-12 13:35 ` redi at gcc dot gnu.org
2020-03-12 14:07 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-12 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-reduction
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The same variable definition works at namespace scope, I only get the ICE an
function scope.
My brief attempts to reduce it to remove std::pair made the ICE go away.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
2020-03-12 13:35 ` [Bug c++/94155] " redi at gcc dot gnu.org
@ 2020-03-12 14:07 ` mpolacek at gcc dot gnu.org
2020-03-27 20:23 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-03-12 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2020-03-12
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
2020-03-12 13:35 ` [Bug c++/94155] " redi at gcc dot gnu.org
2020-03-12 14:07 ` mpolacek at gcc dot gnu.org
@ 2020-03-27 20:23 ` mpolacek at gcc dot gnu.org
2020-03-27 21:17 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-03-27 20:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reduced:
template <typename T> struct A {
int i;
T t;
constexpr A(int, T e) : i(), t(e) {}
};
void
f()
{
A<A<int>> g[1]({1, {1, 1}});
}
We ICE because we don't satisfy:
4662 /* ??? Here's to hoping the front end fills in all of the indices,
4663 so we don't have to figure out what's missing ourselves. */
4664 gcc_assert (purpose);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-27 20:23 ` mpolacek at gcc dot gnu.org
@ 2020-03-27 21:17 ` mpolacek at gcc dot gnu.org
2020-04-06 16:39 ` cvs-commit at gcc dot gnu.org
2020-04-06 16:40 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-03-27 21:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Even simpler:
struct S { int i, j; };
struct A {
S s;
constexpr A(S e) : s(e) {}
};
void
f()
{
A g[1]({{1, 1}});
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
` (3 preceding siblings ...)
2020-03-27 21:17 ` mpolacek at gcc dot gnu.org
@ 2020-04-06 16:39 ` cvs-commit at gcc dot gnu.org
2020-04-06 16:40 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-06 16:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:f84aded848f6fdd2704c9376263c6d1aee6bb0ca
commit r10-7568-gf84aded848f6fdd2704c9376263c6d1aee6bb0ca
Author: Marek Polacek <polacek@redhat.com>
Date: Mon Mar 30 15:49:17 2020 -0400
c++: Fix crash in gimplifier with paren init of aggregates [PR94155]
Here we crash in the gimplifier because gimplify_init_ctor_eval doesn't
expect null indexes for a constructor:
/* ??? Here's to hoping the front end fills in all of the indices,
so we don't have to figure out what's missing ourselves. */
gcc_assert (purpose);
The indexes weren't filled because we never called reshape_init: for
a constructor that represents parenthesized initialization of an
aggregate we don't allow brace elision or designated initializers.
PR c++/94155 - crash in gimplifier with paren init of aggregates.
* init.c (build_vec_init): Fill in indexes.
* g++.dg/cpp2a/paren-init22.C: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/94155] internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
` (4 preceding siblings ...)
2020-04-06 16:39 ` cvs-commit at gcc dot gnu.org
@ 2020-04-06 16:40 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-04-06 16:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94155
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-06 16:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 13:34 [Bug c++/94155] New: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:4664 redi at gcc dot gnu.org
2020-03-12 13:35 ` [Bug c++/94155] " redi at gcc dot gnu.org
2020-03-12 14:07 ` mpolacek at gcc dot gnu.org
2020-03-27 20:23 ` mpolacek at gcc dot gnu.org
2020-03-27 21:17 ` mpolacek at gcc dot gnu.org
2020-04-06 16:39 ` cvs-commit at gcc dot gnu.org
2020-04-06 16:40 ` mpolacek 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).