]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/114624 - fix use-after-free in SCCP
authorRichard Biener <rguenther@suse.de>
Mon, 8 Apr 2024 08:38:49 +0000 (10:38 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 8 Apr 2024 09:37:25 +0000 (11:37 +0200)
commit97d5cd8740384dbce5a83080916388f80d8976dd
treec538933a5a1026275ea75e299058c167dda37b41
parent7d051f7d45789e1442d26c07bfc5e7fb77433b87
tree-optimization/114624 - fix use-after-free in SCCP

We're inspecting the replaced PHI node after releasing it.

PR tree-optimization/114624
* tree-scalar-evolution.cc (final_value_replacement_loop):
Get at the PHI arg location before releasing the PHI node.

* gcc.dg/torture/pr114624.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr114624.c [new file with mode: 0644]
gcc/tree-scalar-evolution.cc