]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c
70b8b38dc2856b900f619ddb6ebbfe60d067d8e0
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / chkp-lifetime-1.c
1 /* { dg-do compile { target { ! x32 } } } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */
3 /* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */
4
5 extern int arr[];
6
7 int test (int i)
8 {
9 int res;
10 if (i >= 0)
11 res = arr[i];
12 else
13 res = -i;
14 return res;
15 }