mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 01:54:50 +00:00
bitcasts in this test rather than getelementptr instructions; llvm-gcc produces two bitcasts, clang produces one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136349 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
281 B
C++
16 lines
281 B
C++
// PR1602
|
|
// RUN: %llvmgxx -S %s -o - -O3 | not grep ptrtoint
|
|
// RUN: %llvmgxx -S %s -o - -O3 | not grep getelementptr
|
|
// RUN: %llvmgxx -S %s -o - -O3 | grep bitcast
|
|
|
|
|
|
struct S { virtual void f(); };
|
|
|
|
typedef void (S::*P)(void);
|
|
|
|
const P p = &S::f;
|
|
|
|
void g(S s) {
|
|
(s.*p)();
|
|
}
|