public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
@ 2022-01-31 9:59 marxin at gcc dot gnu.org
2022-01-31 9:59 ` [Bug c++/104300] " marxin at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-31 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
Bug ID: 104300
Summary: [12 Regression] ICE in gimplify_var_or_parm_decl, at
gimplify.c:2977 since r12-6326-ge948436eab818c52
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: jason at redhat dot com
Target Milestone: ---
Seen for a couple of packages (e.g. bstone):
$ cat bstone.ii
class Rgba8;
template <int _Nm> struct __array_traits { typedef Rgba8 _Type[_Nm]; };
template <int _Nm> struct array {
typename __array_traits<_Nm>::_Type _M_elems;
};
struct Rgba8 {
char r_;
Rgba8();
};
using Rgba8Palette = array<6>;
Rgba8Palette hw_default_palette_;
void hw_initialize_palette() { hw_default_palette_ = {}; }
$ g++ bstone.ii -c
bstone.ii: In function 'void hw_initialize_palette()':
bstone.ii:12:55: internal compiler error: in gimplify_var_or_parm_decl, at
gimplify.cc:2985
12 | void hw_initialize_palette() { hw_default_palette_ = {}; }
| ^
0x13c383d gimplify_var_or_parm_decl
/home/marxin/Programming/gcc/gcc/gimplify.cc:2985
0x1402263 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:15424
0x13cfbf6 gimplify_addr_expr
/home/marxin/Programming/gcc/gcc/gimplify.cc:6375
0x14004bf gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:15010
0x13cde8e gimplify_modify_expr
/home/marxin/Programming/gcc/gcc/gimplify.cc:5967
0x140010f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:14963
0x13d28e1 gimplify_stmt(tree_node**, gimple**)
/home/marxin/Programming/gcc/gcc/gimplify.cc:7035
0x13c0485 gimplify_statement_list
/home/marxin/Programming/gcc/gcc/gimplify.cc:2022
0x1402180 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:15408
0x1400a2b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:15084
0x13ca055 gimplify_init_ctor_preeval
/home/marxin/Programming/gcc/gcc/gimplify.cc:4674
0x13ca002 gimplify_init_ctor_preeval
/home/marxin/Programming/gcc/gcc/gimplify.cc:4660
0x13cbae1 gimplify_init_constructor
/home/marxin/Programming/gcc/gcc/gimplify.cc:5239
0x13cca0b gimplify_modify_expr_rhs
/home/marxin/Programming/gcc/gcc/gimplify.cc:5556
0x13cdd5b gimplify_modify_expr
/home/marxin/Programming/gcc/gcc/gimplify.cc:5922
0x140010f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:14963
0x13d28e1 gimplify_stmt(tree_node**, gimple**)
/home/marxin/Programming/gcc/gcc/gimplify.cc:7035
0x13d1d47 gimplify_cleanup_point_expr
/home/marxin/Programming/gcc/gcc/gimplify.cc:6774
0x1401d81 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/marxin/Programming/gcc/gcc/gimplify.cc:15356
0x13d28e1 gimplify_stmt(tree_node**, gimple**)
/home/marxin/Programming/gcc/gcc/gimplify.cc:7035
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/104300] [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
@ 2022-01-31 9:59 ` marxin at gcc dot gnu.org
2022-02-01 0:05 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-31 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target Milestone|--- |12.0
Last reconfirmed| |2022-01-31
Priority|P3 |P1
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/104300] [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
2022-01-31 9:59 ` [Bug c++/104300] " marxin at gcc dot gnu.org
@ 2022-02-01 0:05 ` pinskia at gcc dot gnu.org
2022-02-02 23:35 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-01 0:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced a little further:
struct ss {
char r;
ss();
};
struct a {
ss e[6];
};
a vv;
void ff() { vv = {}; }
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/104300] [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
2022-01-31 9:59 ` [Bug c++/104300] " marxin at gcc dot gnu.org
2022-02-01 0:05 ` pinskia at gcc dot gnu.org
@ 2022-02-02 23:35 ` jason at gcc dot gnu.org
2022-02-05 5:57 ` cvs-commit at gcc dot gnu.org
2022-02-07 12:52 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2022-02-02 23:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/104300] [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2022-02-02 23:35 ` jason at gcc dot gnu.org
@ 2022-02-05 5:57 ` cvs-commit at gcc dot gnu.org
2022-02-07 12:52 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-05 5:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:119cea98f664764cce04963243c39c8f6d797d33
commit r12-7069-g119cea98f664764cce04963243c39c8f6d797d33
Author: Jason Merrill <jason@redhat.com>
Date: Wed Feb 2 18:36:41 2022 -0500
c++: assignment, aggregate, array [PR104300]
The PR92385 fix meant that we see more VEC_INIT_EXPR outside of INIT_EXPR;
in such cases, we need to wrap them in TARGET_EXPR. I previously fixed
that in build_array_copy; we also need it in process_init_constructor.
After fixing that, I needed to adjust a few places to recognize the
VEC_INIT_EXPR even inside a TARGET_EXPR. And prevent cp_fully_fold_init
from lowering VEC_INIT_EXPR too soon. And handle COMPOUND_EXPR inside
TARGET_EXPR better.
PR c++/104300
PR c++/92385
gcc/cp/ChangeLog:
* cp-tree.h (get_vec_init_expr): New.
(target_expr_needs_replace): New.
* cp-gimplify.cc (cp_gimplify_init_expr): Use it.
(struct cp_fold_data): New.
(cp_fold_r): Only genericize inits at end of fn.
(cp_fold_function): Here.
(cp_fully_fold_init): Not here.
* init.cc (build_vec_init): Use get_vec_init_expr.
* tree.cc (build_vec_init_expr): Likewise.
* typeck2.cc (split_nonconstant_init_1): Likewise.
(process_init_constructor): Wrap VEC_INIT_EXPR in
TARGET_EXPR.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/initlist-array14.C: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/104300] [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2022-02-05 5:57 ` cvs-commit at gcc dot gnu.org
@ 2022-02-07 12:52 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-07 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104300
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-07 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 9:59 [Bug c++/104300] New: [12 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2977 since r12-6326-ge948436eab818c52 marxin at gcc dot gnu.org
2022-01-31 9:59 ` [Bug c++/104300] " marxin at gcc dot gnu.org
2022-02-01 0:05 ` pinskia at gcc dot gnu.org
2022-02-02 23:35 ` jason at gcc dot gnu.org
2022-02-05 5:57 ` cvs-commit at gcc dot gnu.org
2022-02-07 12:52 ` jakub 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).