Fix commit mistake in testcase gcc.dg/tree-ssa/ssa-sink-3.c
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 19 May 2021 07:51:44 +0000 (09:51 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 19 May 2021 07:51:44 +0000 (09:51 +0200)
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.

gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-3.c

index e69de29..ad88ccc 100644 (file)
@@ -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" } } */