testsuite: Add testcase for already fixed PR [PR94686]
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Apr 2020 10:47:46 +0000 (12:47 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 21 Apr 2020 10:47:46 +0000 (12:47 +0200)
This has been fixed by the PR71311 r7-1170-g4618c453205f18
change.

2020-04-21  Jakub Jelinek  <jakub@redhat.com>

PR c/94686
* gcc.c-torture/compile/pr94686.c: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr94686.c [new file with mode: 0644]

index 89178740200958d0647d9c44750da05de9752ebb..372a89f95781c7cbf2df497481bb37b35c5fa7f7 100644 (file)
@@ -1,4 +1,9 @@
-2020-04-21 Iain Sandoe <iain@sandoe.co.uk>
+2020-04-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/94686
+       * gcc.c-torture/compile/pr94686.c: New test.
+
+2020-04-21  Iain Sandoe  <iain@sandoe.co.uk>
 
        PR c++/94661
        * g++.dg/coroutines/ramp-return-a.C: New test.
        PR c++/94336 - template keyword accepted before destructor names.
        * g++.dg/template/template-keyword2.C: New test.
 
-2020-03-27 Iain Sandoe  <iain@sandoe.co.uk>
+2020-03-27  Iain Sandoe  <iain@sandoe.co.uk>
 
        * g++.dg/coroutines/torture/symmetric-transfer-00-basic.C:
        Add <cstdio>.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr94686.c b/gcc/testsuite/gcc.c-torture/compile/pr94686.c
new file mode 100644 (file)
index 0000000..df94413
--- /dev/null
@@ -0,0 +1,9 @@
+/* PR c/94686 */
+
+int a = 0, b = 0;
+
+int
+foo (void)
+{
+  return (int) (long) (b * 0 >= a & b * 0 >= a);
+}