public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-903] Fix commit mistake in testcase gcc.dg/tree-ssa/ssa-sink-3.c
@ 2021-05-19 7:57 Bernd Edlinger
0 siblings, 0 replies; only message in thread
From: Bernd Edlinger @ 2021-05-19 7:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:51cfa55431c38f3c29c7b72833337ad8a2da5c06
commit r12-903-g51cfa55431c38f3c29c7b72833337ad8a2da5c06
Author: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Wed May 19 09:51:44 2021 +0200
Fix commit mistake in testcase gcc.dg/tree-ssa/ssa-sink-3.c
the test case was accidenally changed to empty file.
2021-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.dg/tree-ssa/ssa-sink-3.c: Fix test case.
Diff:
---
gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c
index e69de29bb2d..ad88ccc4f5b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-sink-stats" } */
+extern void foo(int a);
+int
+main (int argc)
+{
+ int a;
+ a = argc + 1;
+ if (argc + 3)
+ {
+ foo (a);
+ }
+}
+/* We should sink the a = argc + 1 calculation into the if branch */
+/* { dg-final { scan-tree-dump-times "Sunk statements: 1" 1 "sink1" } } */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-19 7:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 7:57 [gcc r12-903] Fix commit mistake in testcase gcc.dg/tree-ssa/ssa-sink-3.c Bernd Edlinger
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).