mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 18:06:49 +00:00
71a39f4b6f
automatically. Use -S with llvm-gcc rather than -c, so tests can work when llvm-gcc is really dragonegg (which can output IR with -S but not -c). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120160 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
536 B
C++
28 lines
536 B
C++
// RUN: %llvmgxx -S %s -o - | grep byval | count 2
|
|
// XTARGET: x86
|
|
// PR4242
|
|
// (PR 4242 bug is on 64-bit only, test passes on x86-32 as well)
|
|
|
|
struct S {
|
|
void* data[3];
|
|
};
|
|
|
|
struct T {
|
|
void* data[2];
|
|
};
|
|
|
|
extern "C" S fail(int, int, int, int, T t, void* p) {
|
|
S s;
|
|
s.data[0] = t.data[0];
|
|
s.data[1] = t.data[1];
|
|
s.data[2] = p;
|
|
return s;
|
|
}
|
|
|
|
extern "C" S* succeed(S* sret, int, int, int, int, T t, void* p) {
|
|
sret->data[0] = t.data[0];
|
|
sret->data[1] = t.data[1];
|
|
sret->data[2] = p;
|
|
return sret;
|
|
}
|