2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / lto / pr52605_0.C
blob22540abf9e46ed3004121d948833ec07aca109a6
1 // { dg-lto-do link }
2 // { dg-lto-options {{-flto -g}} }
4 extern "C" void abort (void);
6 class A
8 public:
9   virtual int foo (int i);
12 int A::foo (int i)
14   return i + 1;
17 int __attribute__ ((noinline,noclone)) get_input(void)
19   return 1;
22 int main (int argc, char *argv[])
25   class B : public A
26   {
27   public:
28     int bar (int i)
29     {
30       return foo (i) + 2;
31     }
32   };
33   class B b;
35   if (b.bar (get_input ()) != 4)
36     abort ();
37   return 0;