repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
opt
/
covariant1.C
blob
e57cf4c6be040ee61412cb67ea732d9405b42919
1
// PR c++/20206
2
// { dg-do run }
3
// { dg-options "-O0" }
4
5
void
6
bar (int x)
7
{
8
asm ("" : : "g" (x));
9
}
10
11
struct S { S () {}; virtual ~S () {}; };
12
struct T { virtual T *foo (int) {}; };
13
struct V : virtual S, virtual T {};
14
struct V v;
15
struct U : public S, public T
16
{
17
bool a;
18
U () {}
19
virtual ~U () {}
20
virtual V *foo (int x)
21
{
22
switch (x)
23
{
24
case 12:
25
break;
26
case 9:
27
bar (7);
28
break;
29
case 10:
30
bar (12);
31
break;
32
case 4:
33
bar (18);
34
break;
35
case 2:
36
bar (26);
37
break;
38
}
39
return &v;
40
}
41
};
42
U u;
43
44
int
45
main ()
46
{
47
}