* [Bug c++/98353] [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
@ 2020-12-18 8:44 ` marxin at gcc dot gnu.org
2020-12-21 12:17 ` jakub at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-18 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Last reconfirmed| |2020-12-18
Summary|[9/10/11 Regression] ICE in |[9/10/11 Regression] ICE in
|propagate_necessity, at |propagate_necessity, at
|tree-ssa-dce.c:1053 |tree-ssa-dce.c:1053 since
| |r6-4886-gcda0a029f45d20f4
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r6-4886-gcda0a029f45d20f4.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
2020-12-18 8:44 ` [Bug c++/98353] [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4 marxin at gcc dot gnu.org
@ 2020-12-21 12:17 ` jakub at gcc dot gnu.org
2020-12-21 12:47 ` [Bug c++/98353] [8/9/10/11 " jakub at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-21 12:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the FE side, I think this can be fixed with:
--- gcc/cp/init.c.jj 2020-12-09 09:03:38.270054654 +0100
+++ gcc/cp/init.c 2020-12-21 13:05:33.137218177 +0100
@@ -187,7 +187,7 @@ build_zero_init_1 (tree type, tree nelts
else if (NULLPTR_TYPE_P (type))
init = build_int_cst (type, 0);
else if (SCALAR_TYPE_P (type))
- init = fold (convert (type, integer_zero_node));
+ init = cp_fold_rvalue (convert (type, integer_zero_node));
else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))
{
tree field;
It is unclear to me why it uses so arcane way of emitting zero constants, can't
just build_zero_cst (type); do that?, but if it has to, the complex types can't
be handled by simple fold as fold is not recursive, and convert emits
COMPLEX_EXPR with FLOAT_EXPR of 0 operands, so one needs to fold those operands
and only then fold the COMPLEX_EXPR.
I guess there is some bug on the gimplifier side too, it shouldn't ICE even
when such COMPLEX_EXPRs are not simplified.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
2020-12-18 8:44 ` [Bug c++/98353] [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4 marxin at gcc dot gnu.org
2020-12-21 12:17 ` jakub at gcc dot gnu.org
@ 2020-12-21 12:47 ` jakub at gcc dot gnu.org
2020-12-21 12:53 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-21 12:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE in |[8/9/10/11 Regression] ICE
|propagate_necessity, at |in propagate_necessity, at
|tree-ssa-dce.c:1053 since |tree-ssa-dce.c:1053 since
|r6-4886-gcda0a029f45d20f4 |r6-4886-gcda0a029f45d20f4
Status|NEW |ASSIGNED
Target Milestone|--- |8.5
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (2 preceding siblings ...)
2020-12-21 12:47 ` [Bug c++/98353] [8/9/10/11 " jakub at gcc dot gnu.org
@ 2020-12-21 12:53 ` jakub at gcc dot gnu.org
2020-12-21 23:03 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-21 12:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49820
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49820&action=edit
gcc11-pr98353.patch
Untested fix for the gimplifier.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (3 preceding siblings ...)
2020-12-21 12:53 ` jakub at gcc dot gnu.org
@ 2020-12-21 23:03 ` cvs-commit at gcc dot gnu.org
2020-12-21 23:33 ` [Bug c++/98353] [8/9/10 " jakub at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-21 23:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a477f1445b3093d01e68cd4c096c5776ad769e11
commit r11-6295-ga477f1445b3093d01e68cd4c096c5776ad769e11
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 22 00:01:34 2020 +0100
gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]
gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't
a gimple val, verification at the end of gimplification would ICE (or with
release checking some random pass later on would ICE or misbehave).
2020-12-21 Jakub Jelinek <jakub@redhat.com>
PR c++/98353
* gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before
storing it into cref.
* g++.dg/opt/pr98353.C: New test.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (4 preceding siblings ...)
2020-12-21 23:03 ` cvs-commit at gcc dot gnu.org
@ 2020-12-21 23:33 ` jakub at gcc dot gnu.org
2020-12-23 21:48 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-21 23:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10/11 Regression] ICE |[8/9/10 Regression] ICE in
|in propagate_necessity, at |propagate_necessity, at
|tree-ssa-dce.c:1053 since |tree-ssa-dce.c:1053 since
|r6-4886-gcda0a029f45d20f4 |r6-4886-gcda0a029f45d20f4
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (5 preceding siblings ...)
2020-12-21 23:33 ` [Bug c++/98353] [8/9/10 " jakub at gcc dot gnu.org
@ 2020-12-23 21:48 ` cvs-commit at gcc dot gnu.org
2021-01-05 8:32 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-23 21:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:550880a31688f1031a21efe7923c86db423cbbf1
commit r11-6321-g550880a31688f1031a21efe7923c86db423cbbf1
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Dec 23 22:45:56 2020 +0100
c++: Fix up floating point complex handling in build_zero_init_1 [PR98353]
While the gimplifier patch I've just committed fixed an ICE, in some cases
like on the committed testcase cp folding doesn't happen after
build_zero_init_1 because it is called already during gimplification.
For the scalar types, if we want to use convert, the problem with complex
floats
is that it returns a COMPLEX_EXPR with FLOAT_EXPR arguments which have
INTEGER_CST 0 as argument. As fold isn't recursive, it doesn't do anything
in that case, we need to first fold those FLOAT_EXPRs to REAL_CST 0.0 and
only afterwards the COMPLEX_EXPR can be folded into COMPLEX_CST with 0.0
arguments.
This patch instead just uses build_zero_cst that creates the zero constant
for
any scalar types (and more) directly, instead of going through multiple
hops.
2020-12-23 Jakub Jelinek <jakub@redhat.com>
PR c++/98353
* init.c (build_zero_init_1): Use build_zero_cst for SCALAR_TYPE_P
zero initializers.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (6 preceding siblings ...)
2020-12-23 21:48 ` cvs-commit at gcc dot gnu.org
@ 2021-01-05 8:32 ` rguenth at gcc dot gnu.org
2021-01-06 9:40 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-05 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Priority|P3 |P2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9/10 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (7 preceding siblings ...)
2021-01-05 8:32 ` rguenth at gcc dot gnu.org
@ 2021-01-06 9:40 ` cvs-commit at gcc dot gnu.org
2021-01-06 9:46 ` [Bug c++/98353] [8/9 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-06 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f3113a85f098df8165624321cc85d20219fb2ada
commit r10-9223-gf3113a85f098df8165624321cc85d20219fb2ada
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 22 00:01:34 2020 +0100
gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]
gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't
a gimple val, verification at the end of gimplification would ICE (or with
release checking some random pass later on would ICE or misbehave).
2020-12-21 Jakub Jelinek <jakub@redhat.com>
PR c++/98353
* gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before
storing it into cref.
* g++.dg/opt/pr98353.C: New test.
(cherry picked from commit a477f1445b3093d01e68cd4c096c5776ad769e11)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (8 preceding siblings ...)
2021-01-06 9:40 ` cvs-commit at gcc dot gnu.org
@ 2021-01-06 9:46 ` jakub at gcc dot gnu.org
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-06 9:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[8/9/10 Regression] ICE in |[8/9 Regression] ICE in
|propagate_necessity, at |propagate_necessity, at
|tree-ssa-dce.c:1053 since |tree-ssa-dce.c:1053 since
|r6-4886-gcda0a029f45d20f4 |r6-4886-gcda0a029f45d20f4
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3+ too.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (9 preceding siblings ...)
2021-01-06 9:46 ` [Bug c++/98353] [8/9 " jakub at gcc dot gnu.org
@ 2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:08 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:202240b05f28681053c64efbf1e6deb07f36e1b8
commit r9-9403-g202240b05f28681053c64efbf1e6deb07f36e1b8
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 22 00:01:34 2020 +0100
gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]
gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't
a gimple val, verification at the end of gimplification would ICE (or with
release checking some random pass later on would ICE or misbehave).
2020-12-21 Jakub Jelinek <jakub@redhat.com>
PR c++/98353
* gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before
storing it into cref.
* g++.dg/opt/pr98353.C: New test.
(cherry picked from commit f3113a85f098df8165624321cc85d20219fb2ada)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (10 preceding siblings ...)
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:08 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-22 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:d8e2170ab33ebd819b8848e43264dc836e344b6b
commit r8-10871-gd8e2170ab33ebd819b8848e43264dc836e344b6b
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Dec 22 00:01:34 2020 +0100
gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]
gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't
a gimple val, verification at the end of gimplification would ICE (or with
release checking some random pass later on would ICE or misbehave).
2020-12-21 Jakub Jelinek <jakub@redhat.com>
PR c++/98353
* gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before
storing it into cref.
* g++.dg/opt/pr98353.C: New test.
(cherry picked from commit f3113a85f098df8165624321cc85d20219fb2ada)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/98353] [8/9 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 since r6-4886-gcda0a029f45d20f4
2020-12-17 16:47 [Bug c++/98353] New: [9/10/11 Regression] ICE in propagate_necessity, at tree-ssa-dce.c:1053 gscfq@t-online.de
` (11 preceding siblings ...)
2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 17:08 ` jakub at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98353
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread