From: Bill Schmidt Date: Mon, 17 Jul 2017 19:12:11 +0000 (+0000) Subject: re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f64893261343c3c620b426d6b19fa1a8754d591d;p=gcc.git re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR) 2017-07-17 Bill Schmidt PR tree-optimization/81162 * gcc.dg/pr81162.c: Move this to... * gcc.dg/ubsan/pr81162.c: ...here. From-SVN: r250284 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ebd6eaf1ff1..156e78e2e22 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-07-17 Bill Schmidt + + PR tree-optimization/81162 + * gcc.dg/pr81162.c: Move this to... + * gcc.dg/ubsan/pr81162.c: ...here. + 2017-07-17 Volker Reichelt * g++.dg/diagnostic/friend1.C: New test. diff --git a/gcc/testsuite/gcc.dg/pr81162.c b/gcc/testsuite/gcc.dg/pr81162.c deleted file mode 100644 index 9ce98afa367..00000000000 --- a/gcc/testsuite/gcc.dg/pr81162.c +++ /dev/null @@ -1,17 +0,0 @@ -/* PR tree-optimization/81162 */ -/* { dg-do run } */ -/* { dg-options "-fsanitize=undefined -O2" } */ - -short s; -int i1 = 1; -int i2 = 1; -unsigned char uc = 147; - -int main() { - s = (-uc + 2147483647) << 0; - if (9031239389974324562ULL >= (-((i1 && i2) + uc) ^ -21096) ) { - return 0; - } else { - return -1; - } -} diff --git a/gcc/testsuite/gcc.dg/ubsan/pr81162.c b/gcc/testsuite/gcc.dg/ubsan/pr81162.c new file mode 100644 index 00000000000..9ce98afa367 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ubsan/pr81162.c @@ -0,0 +1,17 @@ +/* PR tree-optimization/81162 */ +/* { dg-do run } */ +/* { dg-options "-fsanitize=undefined -O2" } */ + +short s; +int i1 = 1; +int i2 = 1; +unsigned char uc = 147; + +int main() { + s = (-uc + 2147483647) << 0; + if (9031239389974324562ULL >= (-((i1 && i2) + uc) ^ -21096) ) { + return 0; + } else { + return -1; + } +}