Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-4.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O2 -fdump-tree-sink-stats" } */ | |
3 extern int foo (int *, int *); | |
4 extern int foo2 (int); | |
5 int | |
6 main (int argc) | |
7 { | |
8 int a, b, c; | |
9 b = argc + 1; | |
10 c = argc + 2; | |
11 a = b + c; | |
12 if (argc) | |
13 { | |
14 foo (&b, &c); | |
15 a = b + c; | |
16 } | |
17 foo2 (a); | |
18 } | |
19 /* We should sink the first a = b + c calculation into the else branch */ | |
20 /* { dg-final { scan-tree-dump-times "Sunk statements: 1" 1 "sink" } } */ |