diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/const-uniq_0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/const-uniq_0.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/const-uniq_0.c b/gcc/testsuite/gcc.dg/lto/const-uniq_0.c new file mode 100644 index 000000000..1bbc7f45f --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/const-uniq_0.c @@ -0,0 +1,16 @@ +/* The 3 constant initializers should be uniquized. */ + +/* { dg-lto-do run } */ +/* { dg-lto-options {{-Os -flto -flto-partition=none} {-Os -flto -flto-partition=1to1} } } */ + +int lookup1 (int i) +{ + int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; + return a[i]; +} + +int lookup2 (int i) +{ + int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; + return a[i+1]; +} |