blob: 5ceaa8e46214ff16beb2e5d82df2ea9b16269136 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* { dg-do compile } */
/* { dg-require-effective-target mpx } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */
/* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */
extern int arr[];
int test (int i)
{
int res;
if (i >= 0)
res = arr[i];
else
res = -i;
return res;
}
|