aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr63995-1.C
blob: 82e76063ef1893d25878d343010871d14affcd6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target mpx } */
/* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx" } */

int test1 (int i)
{
  extern const int arr[10];
  return arr[i];
}

extern const int arr[10];

int test2 (int i)
{
  return arr[i];
}