From 51cfa55431c38f3c29c7b72833337ad8a2da5c06 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Wed, 19 May 2021 09:51:44 +0200 Subject: [PATCH] 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 * gcc.dg/tree-ssa/ssa-sink-3.c: Fix test case. --- 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 e69de29bb2d1..ad88ccc4f5bf 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" } } */ -- 2.47.2