2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / thunk2.C
blob52fcd74bc11ce36256614b4b4302aa8aa6fab868
1 // PR c++/20206
2 // { dg-do run }
3 // { dg-options "-O0" }
5 void
6 bar (int x)
8   asm ("" : : "g" (x));
11 struct S { S () {}; virtual ~S () {}; };
12 struct T { virtual void foo (int) = 0; };
13 struct U : public S, public T
15   bool a;
16   U () {}
17   virtual ~U () {}
18   virtual void foo (int x)
19   {
20     switch (x)
21       {
22       case 12:
23         break;
24       case 9:
25         bar (7);
26         break;
27       case 10:
28         bar (12);
29         break;
30       case 4:
31         bar (18);
32         break;
33       case 2:
34         bar (26);
35         break;
36       }
37   }
39 U u;
41 int
42 main ()