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
2008-04-02 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git]
/
libmudflap
/
testsuite
/
libmudflap.c++
/
pass28-frag.cxx
blob
75e14ba1460069e79a5f0e26313e5b25c0b9d00e
1
class
foo
{
2
char
z
[
10
];
3
public
:
4
virtual
char
*
get_z
() {
return
&
this
->
z
[
0
]; }
5
};
6
7
class
bar
:
public
foo
{
8
char
q
[
20
];
9
public
:
10
char
*
get_z
() {
return
&
this
->
q
[
0
]; }
11
};
12
13
int
main
() {
14
foo
*
x
=
new
bar
();
15
16
x
->
get_z
()[
9
] =
'a'
;
17
18
delete
x
;
19
return
0
;
20
}