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
/
reference-3-nov.cpp
blob
9a5519318a4ac1676d18f4158142cd67ee7f5fa4
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
buf1
[
10
];
9
10
int
rd
(
int
(&
p
)[
100
],
int
i
)
11
{
12
int
res
=
p
[
i
];
13
printf
(
"%d
\n
"
,
res
);
14
return
res
;
15
}
16
17
int
mpx_test
(
int
argc
,
const char
**
argv
)
18
{
19
int
*
p
;
20
21
rd
(
buf
,
0
);
22
rd
(
buf
,
99
);
23
24
return
0
;
25
}