aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/kext7.C
blob: 564e1219599896fe193ff53075559d5bc48af332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* APPLE LOCAL file KEXT double destructor --bowdidge */
/* Radar 3943783  kernel extensions built with gcc-4.0 can't be loaded */
/* { dg-do compile { target powerpc*-apple-darwin* } } */
/* { dg-options "-S -fapple-kext" } */

struct Base {
  virtual ~Base();
} __attribute__((apple_kext_compatibility));

struct Derived : Base {
  void operator delete(void *) { }
  Derived();
};

void foo() {
  Derived d1;			// ok
}
/* An implicit in-charge destructor shouldn't be created when -fapple-kext
   is declared. */
/* { dg-final { scan-assembler-not "_ZN7DerivedD1Ev" } } */