Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / ipa-icf-4.C
blobb552ef4cb13e5e2bccbbc8844ccd081cd187d16c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf -fno-inline" } */
4 namespace {
5 struct A
7   virtual void foo(void) {}
8 };
9 struct B: virtual A
11   virtual void foo(void) {}
13 struct C: virtual A
15   virtual void bar(void) {}
17 struct D: virtual A
19   virtual void sparta(void) {}
21 struct E: B,C,D
23   virtual void foo(void) {}
24   virtual void barbar(void) {}
26 } // anonymous namespace
28 int main()
30   struct A a;
31   struct B b;
32   struct C c;
33   struct D d;
34   struct E e;
36   a.foo();
37   b.foo();
38   c.bar();
39   d.foo();
40   d.sparta();
41   e.barbar();
43   return 123;
46 /* { dg-final { scan-ipa-dump "\(Unified; Variable alias has been created\)|\(Symbol aliases are not supported by target\)" "icf"  } } */
47 /* { dg-final { scan-ipa-dump "Equal symbols: \[67\]" "icf"  } } */