public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
@ 2021-07-09 14:00 cnsun at uwaterloo dot ca
2021-07-09 16:43 ` [Bug tree-optimization/101394] " pinskia at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-07-09 14:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Bug ID: 101394
Summary: ICE on valid code with -O2: SSA corruption: Unable to
coalesce ssa_names 10 and 19 which are marked as MUST
COALESCE.
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: cnsun at uwaterloo dot ca
Target Milestone: ---
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.RJV1U21mAq-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210709 (experimental) [master revision
:aa0aefd8a:fdc4d2a516d042bc9a6936fad3f887aff353a296] (GCC)
$ cat mutant.c
a, b, c, d;
e() __attribute__((returns_twice));
f() {
int *g = c;
if (b) {
h();
g--;
if (a)
if (d)
h();
}
if (g++)
e();
c = g;
}
$ gcc-trunk -w -O2 mutant.c
Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
g_10(ab) and g_19(ab)
during RTL pass: expand
mutant.c: In function ‘f’:
mutant.c:3:1: internal compiler error: SSA corruption
3 | f() {
| ^
0x104b21c fail_abnormal_edge_coalesce
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1003
0x104b21c coalesce_partitions
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1425
0x104b21c coalesce_ssa_name(_var_map*)
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-ssa-coalesce.c:1755
0xfe32a9 remove_ssa_form
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-outof-ssa.c:1065
0xfe32a9 rewrite_out_of_ssa(ssaexpand*)
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/tree-outof-ssa.c:1323
0xa6299a execute
/tmp/tmp.RJV1U21mAq-gcc-builder/gcc/gcc/cfgexpand.c:6588
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] 13+ messages in thread
* [Bug tree-optimization/101394] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
@ 2021-07-09 16:43 ` pinskia at gcc dot gnu.org
2021-07-12 7:47 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-09 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think the problem comes from PRE when it does:
# g_25 = PHI <g_19(ab)(5), g_19(ab)(4)>
- g_27 = g_25 + 4;
+ pretmp_28 = g_17(ab);
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
2021-07-09 16:43 ` [Bug tree-optimization/101394] " pinskia at gcc dot gnu.org
@ 2021-07-12 7:47 ` rguenth at gcc dot gnu.org
2021-07-12 9:09 ` marxin at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-07-12
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
2021-07-09 16:43 ` [Bug tree-optimization/101394] " pinskia at gcc dot gnu.org
2021-07-12 7:47 ` rguenth at gcc dot gnu.org
@ 2021-07-12 9:09 ` marxin at gcc dot gnu.org
2021-07-12 10:19 ` cvs-commit at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-07-12 9:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, started with r9-2475-g4864297f7858617a.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (2 preceding siblings ...)
2021-07-12 9:09 ` marxin at gcc dot gnu.org
@ 2021-07-12 10:19 ` cvs-commit at gcc dot gnu.org
2021-07-12 10:20 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-12 10:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:92343e0ba4d47f21ae20ffcb83d736bdbc15dae0
commit r12-2244-g92343e0ba4d47f21ae20ffcb83d736bdbc15dae0
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 12 10:49:03 2021 +0200
tree-optimization/101394 - fix PRE full redundancy wrt abnormals
This avoids adding a copy from an abnormal picked up from PHI
translation much like we'd avoid inserting the translated
expression on pred edges.
2021-07-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/101394
* tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting
copies from abnormals for a full redundancy.
* gcc.dg/torture/pr101394.c: New testcase.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (3 preceding siblings ...)
2021-07-12 10:19 ` cvs-commit at gcc dot gnu.org
@ 2021-07-12 10:20 ` rguenth at gcc dot gnu.org
2021-07-12 17:18 ` [Bug tree-optimization/101394] [9/10/11 Regression] " pinskia at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12 10:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |12.0
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9/10/11 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (4 preceding siblings ...)
2021-07-12 10:20 ` rguenth at gcc dot gnu.org
@ 2021-07-12 17:18 ` pinskia at gcc dot gnu.org
2021-07-12 17:20 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-12 17:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on valid code with -O2: |[9/10/11 Regression] ICE on
|SSA corruption: Unable to |valid code with -O2: SSA
|coalesce ssa_names 10 and |corruption: Unable to
|19 which are marked as MUST |coalesce ssa_names 10 and
|COALESCE. |19 which are marked as MUST
| |COALESCE.
Target Milestone|--- |9.5
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9/10/11 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (5 preceding siblings ...)
2021-07-12 17:18 ` [Bug tree-optimization/101394] [9/10/11 Regression] " pinskia at gcc dot gnu.org
@ 2021-07-12 17:20 ` pinskia at gcc dot gnu.org
2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-12 17:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> Just for the record, started with r9-2475-g4864297f7858617a.
That definitely looks more like it was exposing the issue really as that was to
VRP while the fix in comment #4 is for PRE.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9/10/11 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (6 preceding siblings ...)
2021-07-12 17:20 ` pinskia at gcc dot gnu.org
@ 2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` [Bug tree-optimization/101394] [9/10 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-13 10:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:7d060844c0de1ed65da84374cae6fa1598011f4a
commit r11-8724-g7d060844c0de1ed65da84374cae6fa1598011f4a
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 12 10:49:03 2021 +0200
tree-optimization/101394 - fix PRE full redundancy wrt abnormals
This avoids adding a copy from an abnormal picked up from PHI
translation much like we'd avoid inserting the translated
expression on pred edges.
2021-07-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/101394
* tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting
copies from abnormals for a full redundancy.
* gcc.dg/torture/pr101394.c: New testcase.
(cherry picked from commit 92343e0ba4d47f21ae20ffcb83d736bdbc15dae0)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9/10 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (7 preceding siblings ...)
2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
@ 2021-09-06 10:18 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:20 ` [Bug tree-optimization/101394] [9 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-06 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:424737442fb7cd6ea8f0e63098c26cebdaf82a51
commit r10-10099-g424737442fb7cd6ea8f0e63098c26cebdaf82a51
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 12 10:49:03 2021 +0200
tree-optimization/101394 - fix PRE full redundancy wrt abnormals
This avoids adding a copy from an abnormal picked up from PHI
translation much like we'd avoid inserting the translated
expression on pred edges.
2021-07-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/101394
* tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting
copies from abnormals for a full redundancy.
* gcc.dg/torture/pr101394.c: New testcase.
(cherry picked from commit 92343e0ba4d47f21ae20ffcb83d736bdbc15dae0)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (8 preceding siblings ...)
2021-09-06 10:18 ` [Bug tree-optimization/101394] [9/10 " cvs-commit at gcc dot gnu.org
@ 2021-09-06 10:20 ` rguenth at gcc dot gnu.org
2021-10-13 10:09 ` cvs-commit at gcc dot gnu.org
2021-10-13 10:10 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-06 10:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |10.3.0
Summary|[9/10 Regression] ICE on |[9 Regression] ICE on valid
|valid code with -O2: SSA |code with -O2: SSA
|corruption: Unable to |corruption: Unable to
|coalesce ssa_names 10 and |coalesce ssa_names 10 and
|19 which are marked as MUST |19 which are marked as MUST
|COALESCE. |COALESCE.
Priority|P3 |P2
Known to work| |10.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (9 preceding siblings ...)
2021-09-06 10:20 ` [Bug tree-optimization/101394] [9 " rguenth at gcc dot gnu.org
@ 2021-10-13 10:09 ` cvs-commit at gcc dot gnu.org
2021-10-13 10:10 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-13 10:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:a091e66e510804a29ba2a685b027f5d15aa69f1b
commit r9-9771-ga091e66e510804a29ba2a685b027f5d15aa69f1b
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 12 10:49:03 2021 +0200
tree-optimization/101394 - fix PRE full redundancy wrt abnormals
This avoids adding a copy from an abnormal picked up from PHI
translation much like we'd avoid inserting the translated
expression on pred edges.
2021-07-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/101394
* tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting
copies from abnormals for a full redundancy.
* gcc.dg/torture/pr101394.c: New testcase.
(cherry picked from commit 92343e0ba4d47f21ae20ffcb83d736bdbc15dae0)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/101394] [9 Regression] ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE.
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
` (10 preceding siblings ...)
2021-10-13 10:09 ` cvs-commit at gcc dot gnu.org
@ 2021-10-13 10:10 ` rguenth at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-13 10:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101394
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Known to fail| |9.4.0
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-10-13 10:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 14:00 [Bug tree-optimization/101394] New: ICE on valid code with -O2: SSA corruption: Unable to coalesce ssa_names 10 and 19 which are marked as MUST COALESCE cnsun at uwaterloo dot ca
2021-07-09 16:43 ` [Bug tree-optimization/101394] " pinskia at gcc dot gnu.org
2021-07-12 7:47 ` rguenth at gcc dot gnu.org
2021-07-12 9:09 ` marxin at gcc dot gnu.org
2021-07-12 10:19 ` cvs-commit at gcc dot gnu.org
2021-07-12 10:20 ` rguenth at gcc dot gnu.org
2021-07-12 17:18 ` [Bug tree-optimization/101394] [9/10/11 Regression] " pinskia at gcc dot gnu.org
2021-07-12 17:20 ` pinskia at gcc dot gnu.org
2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` [Bug tree-optimization/101394] [9/10 " cvs-commit at gcc dot gnu.org
2021-09-06 10:20 ` [Bug tree-optimization/101394] [9 " rguenth at gcc dot gnu.org
2021-10-13 10:09 ` cvs-commit at gcc dot gnu.org
2021-10-13 10:10 ` rguenth 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).