[Bug tree-optimization/108684] [12 Regression] ICE: verify_ssa failed

2023-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108684

Andrew Pinski  changed:

   What|Removed |Added

 CC||141242068 at smail dot 
nju.edu.cn

--- Comment #17 from Andrew Pinski  ---
*** Bug 109842 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/108684] [12 Regression] ICE: verify_ssa failed

2023-03-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108684

Andrew Pinski  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from Andrew Pinski  ---
Fixed.

[Bug tree-optimization/108684] [12 Regression] ICE: verify_ssa failed

2023-03-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108684

--- Comment #15 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Andrew Pinski
:

https://gcc.gnu.org/g:657e1e89d34b114ca47fe1f2c5366927c5850af7

commit r12-9239-g657e1e89d34b114ca47fe1f2c5366927c5850af7
Author: Andrew Pinski 
Date:   Tue Feb 7 23:09:40 2023 +

tree-optimization: [PR108684] ICE in verify_ssa due to
simple_dce_from_worklist

In simple_dce_from_worklist, we were removing an inline-asm which had a
vdef.
We should not be removing inline-asm which have a vdef as this code
does not check to the store.
This fixes that oversight. This was a latent bug exposed recently
by both VRP and removal of stores to static starting to use
simple_dce_from_worklist.

Backported after bootstrapped and tested on x86_64-linux-gnu with no
regressions.

PR tree-optimization/108684

gcc/ChangeLog:

* tree-ssa-dce.cc (simple_dce_from_worklist):
Check all ssa names and not just non-vdef ones
before accepting the inline-asm.
Call unlink_stmt_vdef on the statement before
removing it.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/dce-inline-asm-1.c: New test.
* gcc.c-torture/compile/dce-inline-asm-2.c: New test.
* gcc.dg/tree-ssa/pr108684-1.c: New test.

co-authored-by: Andrew Macleod  
(cherry picked from commit 6a5cb782d1486b378d70857c8efae558da0eb2cc)

[Bug tree-optimization/108684] [12 Regression] ICE: verify_ssa failed

2023-02-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108684

Andrew Pinski  changed:

   What|Removed |Added

Summary|[12/13 Regression] ICE: |[12 Regression] ICE:
   |verify_ssa failed   |verify_ssa failed
  Known to work||13.0

--- Comment #14 from Andrew Pinski  ---
Fixed on the trunk so far.