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
/
calloc-1-nov.c
blob
cb755e573910324f7e3fee71e0193d1cc362fba7
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
*)
calloc
(
100
,
sizeof
(
int
));
17
18
rd
(
buf
,
0
);
19
rd
(
buf
,
99
);
20
21
free
(
buf
);
22
23
return
0
;
24
}