public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] tree-optimization/108357 - add testcase
@ 2023-03-27 12:23 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-03-27 12:23 UTC (permalink / raw)
  To: gcc-patches

The following adds the testcase for the bug which was recently
fixed.

Pushed.

	PR tree-optimization/108357
	* gcc.dg/tree-ssa/pr108357.c: New testcase.
---
 gcc/testsuite/gcc.dg/tree-ssa/pr108357.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr108357.c

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
new file mode 100644
index 00000000000..44c457b7a97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-threadfull1" } */
+
+static char b;
+static unsigned c;
+void foo();
+short(a)(short d, short e) { return d * e; }
+static short f(short d) {
+  b = 0;
+  if ((d && 0 >= c < d) ^ d)
+    ;
+  else
+    foo();
+  return d;
+}
+int main()
+{
+  short g = a(5, b ^ 9854);
+  f(g);
+}
+
+/* { dg-final { scan-tree-dump-not "foo" "threadfull1" } } */
-- 
2.35.3

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

only message in thread, other threads:[~2023-03-27 12:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 12:23 [PATCH] tree-optimization/108357 - add testcase Richard Biener

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).