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
PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
rtti
/
typeid11.C
blob
384b0f417054e2bca3524345f26fd0dfe900117c
1
// { dg-do run }
2
3
#include <typeinfo>
4
5
struct Base { virtual void foo() {} }; // polymorphic
6
7
int main()
8
{
9
Base b;
10
Base *ary[] = { &b, &b, &b};
11
12
int iter = 0;
13
typeid(*ary[iter++]);
14
if (iter != 1) // should be 1
15
__builtin_abort(); // but 2
16
}