diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/kext10.C')
-rw-r--r-- | gcc/testsuite/g++.dg/kext10.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/kext10.C b/gcc/testsuite/g++.dg/kext10.C new file mode 100644 index 00000000000..74cfa24c96b --- /dev/null +++ b/gcc/testsuite/g++.dg/kext10.C @@ -0,0 +1,23 @@ +// APPLE LOCAL file +// Radar 3988061 +// { dg-do compile { target powerpc*-*-darwin* } } +// { dg-options "-Os -static -fapple-kext" } +// the virtual call to IOHIDElement::free() is normally resolved +// at compile time, but with -fapple-kext we don't want this. +class IOHIDElement +{ +protected: + virtual ~IOHIDElement(); + virtual void free(); +}; +class IOHIDElementPrivate: public IOHIDElement +{ +protected: + virtual void free(); +}; +IOHIDElement::~IOHIDElement() {} +void IOHIDElementPrivate::free() +{ + IOHIDElement::free(); +} +// { dg-final { scan-assembler-times "IOHIDElement4free" 1} } |