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-ubv.cpp
blob
0a874fabb0951a428924bcf26473506f2db575f6
1
/* { dg-do run } */
2
/* { dg-shouldfail "bounds violation" } */
3
/* { dg-options "-fcheck-pointer-bounds -mmpx" } */
4
5
6
#define SHOULDFAIL
7
8
#include
"mpx-check.h"
9
10
int
buf
[
100
];
11
int
buf1
[
10
];
12
13
int
rd
(
int
(&
p
)[
100
],
int
i
)
14
{
15
int
res
=
p
[
i
];
16
printf
(
"%d
\n
"
,
res
);
17
return
res
;
18
}
19
20
int
mpx_test
(
int
argc
,
const char
**
argv
)
21
{
22
int
*
p
;
23
24
rd
(
buf
,
100
);
25
26
return
0
;
27
}