* [PATCH] tree-optimization/99793 - testcase for the PR
@ 2021-09-28 10:50 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-09-28 10:50 UTC (permalink / raw)
To: gcc-patches
This adds a testcase for the PR which was fixed with the fix for
PR100112.
Tested on x86_64-unknown-linux-gnu, pushed.
2021-09-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/99793
* gcc.dg/tree-ssa/pr99793.c: New testcase.
---
gcc/testsuite/gcc.dg/tree-ssa/pr99793.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr99793.c
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr99793.c b/gcc/testsuite/gcc.dg/tree-ssa/pr99793.c
new file mode 100644
index 00000000000..912744928e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr99793.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fstrict-aliasing -fdump-tree-optimized" } */
+
+extern void foo(void);
+static int a, *b = &a, c, *d = &c;
+int main()
+{
+ int **e = &d;
+ if (!((unsigned)((*e = d) == 0) - (*b = 1)))
+ foo();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-28 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 10:50 [PATCH] tree-optimization/99793 - testcase for the PR 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).