OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR tree-optimization/51799
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
ssa-ccp-16.c
1
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-ccp1" } */
3
4
static const int x;
5
6
int test1 (void)
7
{
8
char *p = "hello";
9
int i = x;
10
i = i + 5;
11
return p[i];
12
}
13
14
int test2 (void)
15
{
16
int i = x;
17
i = i + 5;
18
return "hello"[i];
19
}
20
21
/* { dg-final { scan-tree-dump-times "return 0;" 2 "ccp1" } } */
22
/* { dg-final { cleanup-tree-dump "ccp1" } } */