]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add test case for PR 110405
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 24 Oct 2025 21:32:32 +0000 (17:32 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 24 Oct 2025 21:36:29 +0000 (17:36 -0400)
PR was fixed bu one of the other patches.

* gcc.dg/pr110405.c: New.

gcc/testsuite/gcc.dg/pr110405.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/pr110405.c b/gcc/testsuite/gcc.dg/pr110405.c
new file mode 100644 (file)
index 0000000..549cc7b
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void foo (unsigned long);
+void
+f (unsigned long i)
+{
+  if ((i & 7) == 6)
+    if(i & 1)
+      foo (0);
+}
+
+/* { dg-final { scan-tree-dump-not "foo"  "optimized" } } */
+