OSDN Git Service

Uniquization of constants at the Tree level
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / const-uniq-1.c
1 /* Verify that the 2 constant initializers are uniquized.  */
2
3 /* { dg-do compile } */
4 /* { dg-options "-Os -fdump-tree-gimple" } */
5
6 int lookup1 (int i)
7 {
8   int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
9   return a[i];
10 }
11
12 int lookup2 (int i)
13 {
14   int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
15   return a[i+1];
16 }
17
18 /* { dg-final { scan-tree-dump-times "LC0" 2 "gimple" } } */
19 /* { dg-final { cleanup-tree-dump "gimple" } } */