tree-optimization/104825 - guard modref query
authorRichard Biener <rguenther@suse.de>
Tue, 8 Mar 2022 07:42:58 +0000 (08:42 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 8 Mar 2022 08:55:58 +0000 (09:55 +0100)
commitdc46350d44c2949ec38deb028960f8040f8e8e5d
tree47eb4d40c94b2b72fbed41f8d582a3d3da7ec6bf
parentb1a741a03041782b34effcb820fbe19ba41a3b8f
tree-optimization/104825 - guard modref query

The following makes sure to guard the modref query in VN on a
pointer typed argument.

2022-03-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104825
* tree-ssa-sccvn.cc (visit_reference_op_call): Properly
guard modref get_ao_ref on a pointer typed argument.

* gcc.dg/torture/pr104825.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr104825.c [new file with mode: 0644]
gcc/tree-ssa-sccvn.cc