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
/
builtin-bnd-store-ptr-bounds-1-nov.c
blob
9e9ea305ae85354ed73268d53cb3df7ef6625e93
1
/* { dg-do run } */
2
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3
4
5
#include
"mpx-check.h"
6
7
int
buf
[
100
];
8
int
*
p
;
9
10
int
mpx_test
(
int
argc
,
const char
**
argv
)
11
{
12
int
*
p1
=
__bnd_set_ptr_bounds
(
buf
+
10
,
sizeof
(
int
) *
10
);
13
p
=
buf
;
14
__bnd_store_ptr_bounds
((
void
**)&
p
,
p1
-
10
);
15
p
[
10
] =
argc
;
16
p
[
19
] =
argc
;
17
return
0
;
18
}