tree-optimization/95308 - really avoid forward propagating of &TMR
authorRichard Biener <rguenther@suse.de>
Mon, 25 May 2020 07:44:50 +0000 (09:44 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 25 May 2020 10:41:36 +0000 (12:41 +0200)
commita0c623f58198d3c8f767a181574537720386b468
treedf8d9dac1ba5d74492ac76537322efaa7839e513
parentf73f8bab9f2474f175cc5ca5ba8ebb32808a4cae
tree-optimization/95308 - really avoid forward propagating of &TMR

This fixes a hole that still allowed forwarding of TARGET_MEM_REF
addresses.

2020-05-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/95308
* tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
test for TARGET_MEM_REFs.

* g++.dg/torture/pr95308.C: New testcase.
gcc/testsuite/g++.dg/torture/pr95308.C [new file with mode: 0644]
gcc/tree-ssa-forwprop.c