summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c
blob: 83773d0d90c3b59ff58f43e663f2137001c736a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */


#include "mpx-check.h"

__attribute__((fastcall)) int rd (int *p1, int *p2, int i)
{
  int res = p2[i];
  printf ("%d\n", res);
  return res;
}

int buf[100];
int buf1[10];

int mpx_test (int argc, const char **argv)
{
  rd (buf, buf1, 0);
  rd (buf, buf1, 9);

  return 0;
}