Add missing testcase for PR89190
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 16 Jul 2019 12:06:55 +0000 (12:06 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Tue, 16 Jul 2019 12:06:55 +0000 (12:06 +0000)
    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r273524

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr89190.c [new file with mode: 0644]

index 1f04ebb34a992ae14e4685626b86a5b9a8bfda6f..fc0b129814804685fbdf15e3bfcb073ceb845f8e 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-16  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       PR target/89190
+       * gcc.target/arm/pr89190.c: New test.
+
 2019-07-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/91164
diff --git a/gcc/testsuite/gcc.target/arm/pr89190.c b/gcc/testsuite/gcc.target/arm/pr89190.c
new file mode 100644 (file)
index 0000000..e622d70
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8m_base_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_base } */
+
+long long a;
+int b, c;
+int d(int e, int f) { return e << f; }
+void g() {
+  long long h;
+  char i = d(b >= 7, 2);
+  c = i == 0 ?: 1 / i;
+  h = c && a ?: c + a;
+  b = h;
+}