]>
Commit | Line | Data |
---|---|---|
ee8f136a IE |
1 | /* { dg-do run } */ |
2 | /* { dg-options "-fcheck-pointer-bounds -mmpx" } */ | |
3 | ||
4 | ||
5 | #include "mpx-check.h" | |
6 | ||
7 | struct s1 | |
8 | { | |
9 | int *p; | |
10 | } s1; | |
11 | ||
12 | int 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 | ||
19 | int buf[100]; | |
20 | int buf1[10]; | |
21 | ||
22 | int 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 | } |