re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR)
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 17 Jul 2017 19:12:11 +0000 (19:12 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Mon, 17 Jul 2017 19:12:11 +0000 (19:12 +0000)
2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/81162
* gcc.dg/pr81162.c: Move this to...
* gcc.dg/ubsan/pr81162.c: ...here.

From-SVN: r250284

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr81162.c [deleted file]
gcc/testsuite/gcc.dg/ubsan/pr81162.c [new file with mode: 0644]

index ebd6eaf1ff1a989c3a00d07b4f8255c924dab6d5..156e78e2e22738922d2d6ea8fd00385717cbca5b 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR tree-optimization/81162
+       * gcc.dg/pr81162.c: Move this to...
+       * gcc.dg/ubsan/pr81162.c: ...here.
+
 2017-07-17  Volker Reichelt  <v.reichelt@netcologne.de>
 
        * 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 (file)
index 9ce98af..0000000
+++ /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 (file)
index 0000000..9ce98af
--- /dev/null
@@ -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;
+  }
+}