Debian Codegraph @

gcc/testsuite/g++.dg/abi/pure-virtual1.C

raw
1 // Test that we don't need libsupc++ just for __cxa_pure_virtual.
2 // { dg-do link }
3 // { dg-require-weak "" }
4 // { dg-additional-options "-fno-rtti -nostdlib++" }
5 // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }
6 // { dg-xfail-if "AIX weak" { powerpc-ibm-aix* } }
7 // { dg-xfail-if PR119369 { amdgcn-*-* } }
8
9 struct A
10 {
11 int i;
12 virtual void f() = 0;
13 A(): i(0) {}
14 };
15
16 struct B: A
17 {
18 virtual void f() {}
19 };
20
21 int main()
22 {
23 B b;
24 }