llvm-6502/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp

15 lines
217 B
C++
Raw Normal View History

// RUN: %llvmgxx -xc++ %s -c -o - | opt -die | llvm-dis | grep -v llvm.noinline | not grep cast
void foo(int*);
struct FOO {
int X;
};
struct BAR : virtual FOO { BAR(); };
int testfn() {
BAR B;
foo(&B.X);
}