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-2-nov.c
blob
2a685036ca0a5ca483f3505f3d2a3020ef09feb8
1
/* { dg-do run } */
2
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3
4
/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */
5
6
#include
"mpx-check.h"
7
8
struct
S
{
9
int
a
;
10
int
b
[
100
];
11
int
c
;
12
}
S
;
13
14
int
foo
(
int
*
i
,
int
k
)
15
{
16
printf
(
"%d
\n
"
,
i
[
k
]);
17
return
i
[
k
];
18
}
19
20
int
mpx_test
(
int
argc
,
const char
**
argv
)
21
{
22
struct
S s
;
23
24
foo
(&
s
.
a
,
0
);
25
26
return
0
;
27
}