public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] Add testcase from PR103845
@ 2022-02-23 8:26 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-02-23 8:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3493f4d27c705fa1baa0544ad51f36dd7b6779ac
commit 3493f4d27c705fa1baa0544ad51f36dd7b6779ac
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Feb 23 05:00:07 2022 -0300
Add testcase from PR103845
This problem was already fixed as part of PR104263: the abnormal edge
that remained from before inlining didn't make sense after inlining.
So this patch adds only the testcase.
for gcc/testsuite/ChangeLog
PR tree-optimization/103845
PR tree-optimization/104263
* gcc.dg/pr103845.c: New.
Diff:
---
gcc/testsuite/gcc.dg/pr103845.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/pr103845.c b/gcc/testsuite/gcc.dg/pr103845.c
new file mode 100644
index 00000000000..45ab518d07c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103845.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fharden-compares -fno-ipa-pure-const" } */
+
+int
+baz (void);
+
+__attribute__ ((returns_twice)) void
+bar (void)
+{
+}
+
+int
+quux (int y, int z)
+{
+ return (y || z >= 0) ? y : z;
+}
+
+int
+foo (int x)
+{
+ int a = 0, b = x == a;
+
+ bar ();
+
+ if (!!baz () < quux (b, a))
+ ++x;
+
+ return x;
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] Add testcase from PR103845
@ 2022-02-23 19:40 Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2022-02-23 19:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:7fac0e45ee9c9fc33622705e5d4d62279c1e45fb
commit 7fac0e45ee9c9fc33622705e5d4d62279c1e45fb
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Feb 23 05:00:07 2022 -0300
Add testcase from PR103845
This problem was already fixed as part of PR104263: the abnormal edge
that remained from before inlining didn't make sense after inlining.
So this patch adds only the testcase.
for gcc/testsuite/ChangeLog
PR tree-optimization/103845
PR tree-optimization/104263
* gcc.dg/pr103845.c: New.
Diff:
---
gcc/testsuite/gcc.dg/pr103845.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/pr103845.c b/gcc/testsuite/gcc.dg/pr103845.c
new file mode 100644
index 00000000000..45ab518d07c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr103845.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fharden-compares -fno-ipa-pure-const" } */
+
+int
+baz (void);
+
+__attribute__ ((returns_twice)) void
+bar (void)
+{
+}
+
+int
+quux (int y, int z)
+{
+ return (y || z >= 0) ? y : z;
+}
+
+int
+foo (int x)
+{
+ int a = 0, b = x == a;
+
+ bar ();
+
+ if (!!baz () < quux (b, a))
+ ++x;
+
+ return x;
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-23 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 8:26 [gcc(refs/users/aoliva/heads/testme)] Add testcase from PR103845 Alexandre Oliva
2022-02-23 19:40 Alexandre Oliva
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).