repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
mpx
/
field-addr-5-nov.c
blob
b69895e1d2060a23c39b607510dff905112cff21
1
/* { dg-do run } */
2
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3
4
5
#include
"mpx-check.h"
6
7
struct
S
{
8
int
a
;
9
int
b
[
100
];
10
int
c
;
11
}
S
;
12
13
struct
S1
{
14
int
x
;
15
struct
S a
[
10
];
16
struct
S b
;
17
}
S1
;
18
19
int
foo
(
int
*
p
,
int
i
)
20
{
21
printf
(
"%d
\n
"
,
p
[
i
]);
22
return
p
[
i
];
23
}
24
25
struct
S1 s1
;
26
27
int
mpx_test
(
int
argc
,
const char
**
argv
)
28
{
29
foo
(&
s1
.
b
.
b
[
0
],
0
);
30
foo
(&
s1
.
b
.
b
[
0
],
99
);
31
32
return
0
;
33
}