Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
virtual2.C
blob: ffdd71c13afd85ce72485aac1c4fdf4468e23389 [
file
] [
log
] [
blame
]
// { dg-do run }
struct
A
{
virtual
A
*
f
()
{
return
this
;
}
};
struct
B
:
public
A
{
virtual
B
*
f
()
{
return
0
;
}
};
int
main
()
{
A
*
ap
=
new
B
;
return
(
ap
->
f
()
!=
0
);
}