i386: Allow all register_operand SUBREGs in x86_ternlog_idx.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-16.c
blobd24746d0e94c608bae905ab52e4e18041bdfb46c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
4 static const int x;
6 int test1 (void)
8 char *p = "hello";
9 int i = x;
10 i = i + 5;
11 return p[i];
14 int test2 (void)
16 int i = x;
17 i = i + 5;
18 return "hello"[i];
21 /* { dg-final { scan-tree-dump-times "return 0;" 2 "ccp1" } } */