]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c
Daily bump.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-arg-10-nov.c
CommitLineData
ee8f136a
IE
1/* { dg-do run } */
2/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3
4
5#include "mpx-check.h"
6
7struct s1
8{
9 int *p;
10} s1;
11
12int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i)
13{
14 int res = s.p[i];
15 printf ("%d\n", res);
16 return res;
17}
18
19int buf[100];
20int buf1[10];
21
22int mpx_test (int argc, const char **argv)
23{
24 struct s1 s;
25 s.p = buf;
26
27 rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 0);
28 rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 99);
29
30 return 0;
31}