Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
rtti
/
typeid11.C
blob: 384b0f417054e2bca3524345f26fd0dfe900117c [
file
] [
log
] [
blame
]
// { dg-do run }
#include
<typeinfo>
struct
Base
{
virtual
void
foo
()
{}
};
// polymorphic
int
main
()
{
Base
b
;
Base
*
ary
[]
=
{
&
b
,
&
b
,
&
b
};
int
iter
=
0
;
typeid
(*
ary
[
iter
++]);
if
(
iter
!=
1
)
// should be 1
__builtin_abort
();
// but 2
}