aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-12-06 20:22:06 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-12-06 20:22:06 +0100
commitd7f44d4d00640240af8731911eed207eca5ac4d0 (patch)
treeb4e1816175ba649a8f594b1c017f750ae055d13a /gcc/tree-ssa-phiopt.c
parent9c1caf50e16b50903364709d774244928c719b35 (diff)
downloadgcc-d7f44d4d00640240af8731911eed207eca5ac4d0.zip
gcc-d7f44d4d00640240af8731911eed207eca5ac4d0.tar.gz
gcc-d7f44d4d00640240af8731911eed207eca5ac4d0.tar.bz2
re PR sanitizer/81281 (UBSAN: false positive, dropped promotion to long type.)
PR sanitizer/81281 * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate simplify for plus with :c added, and pointer_plus without that. ((T)P - (T)(P + A) -> -(T) A): Likewise. If type is integral with undefined overflow and the conversion is not widening, perform negation in utype and only convert to type afterwards. ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate simplify for plus with :c added, and pointer_plus without that. If type is integral with undefined overflow and the conversion is not widening, perform minus in utype and only convert to type afterwards. Move the last pointer_diff_expr simplify into the two outermost ifs. * gcc.c-torture/execute/pr81281.c: New test. * gcc.dg/pr81281-1.c: New test. * gcc.dg/pr81281-2.c: New test. * g++.dg/ubsan/pr81281.C: New test. * g++.dg/ubsan/pr81281-aux.cc: New test. From-SVN: r255449
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
0 files changed, 0 insertions, 0 deletions