public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5524] Add the testcase for this PR to the testsuite.
@ 2021-11-25 14:03 Andrew Macleod
  0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-11-25 14:03 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1598bd47b2a4a5f12b5a987d16d82634644db4b6

commit r12-5524-g1598bd47b2a4a5f12b5a987d16d82634644db4b6
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Thu Nov 25 08:58:19 2021 -0500

    Add the testcase for this PR to the testsuite.
    
    Various ranger-enabled patches like threading and VRP2 can do this now, so add the testcase for posterity.
    
            gcc/testsuite/
            PR tree-optimization/102648
            * gcc.dg/pr102648.c: New.

Diff:
---
 gcc/testsuite/gcc.dg/pr102648.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/pr102648.c b/gcc/testsuite/gcc.dg/pr102648.c
new file mode 100644
index 00000000000..a0f6386dde3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr102648.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+void foo();
+static char a, c;
+static int d, e;
+static short b(short f, short g) { return f * g; }
+int main() {
+  short h = 4;
+  for (; d;)
+    if (h)
+      if(e) {
+        if (!b(a & 1 | h, 3))
+          c = 0;
+        h = 1;
+      }
+  if (c)
+    foo();
+}
+
+/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-25 14:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 14:03 [gcc r12-5524] Add the testcase for this PR to the testsuite Andrew Macleod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).