1 // { dg-do compile }
2 
3 // Copyright (C) 2004 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 21 Jul 2004 <nathan@codesourcery.com>
5 
6 // { dg-final { scan-assembler "_ZNK1AcviEv" } }
7 // { dg-final { scan-assembler-not "_ZNK1VcviEv" } }
8 
9 struct V
10 {
11   operator int () const;
12 };
13 
14 struct A : virtual V
15 {
16   operator int () const; // this one
17 };
18 
19 struct B1 : A, virtual V
20 {
21 };
22 
23 struct B2 : virtual V, A
24 {
25 };
26 
27 
Foo(B1 const & b)28 int Foo (B1 const &b)
29 {
30   return b;
31 }
Foo(B2 const & b)32 int Foo (B2 const &b)
33 {
34   return b;
35 }
36