Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.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 "-O -fdump-tree-ccp1" } */ | |
3 | |
4 static const int x; | |
5 int foo() | |
6 { | |
7 const int *p = &x; | |
8 int y = *p; | |
9 return y + 1; | |
10 } | |
11 | |
12 static const int x2[3] = { 1, 0, 2 }; | |
13 int bar() | |
14 { | |
15 int i = 1; | |
16 const int *p = &x2[i]; | |
17 int y = *p; | |
18 return y + 1; | |
19 } | |
20 | |
21 /* { dg-final { scan-tree-dump-times "return 1;" 2 "ccp1" } } */ | |
22 |