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
/
malloc-1-nov.c
blob
56f26e964d844dd13391a4aa5c8a48339e035010
1
/* { dg-do run } */
2
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3
4
5
#include
"mpx-check.h"
6
7
int
rd
(
int
*
p
,
int
i
)
8
{
9
int
res
=
p
[
i
];
10
printf
(
"%d
\n
"
,
res
);
11
return
res
;
12
}
13
14
int
mpx_test
(
int
argc
,
const char
**
argv
)
15
{
16
int
*
buf
= (
int
*)
malloc
(
100
*
sizeof
(
int
));
17
18
rd
(
buf
,
0
);
19
rd
(
buf
,
99
);
20
21
free
(
buf
);
22
23
return
0
;
24
}