mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bae3bd7c19
commit
773fd38553
41
test/C++Frontend/2007-04-10-PackedUnion.cpp
Normal file
41
test/C++Frontend/2007-04-10-PackedUnion.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
// RUN: %llvmgxx -S %s -o /dev/null
|
||||
extern "C" {
|
||||
|
||||
#pragma pack(push, 2)
|
||||
typedef struct ABC* abc;
|
||||
|
||||
struct ABCS {
|
||||
float red;
|
||||
float green;
|
||||
float blue;
|
||||
float alpha;
|
||||
};
|
||||
|
||||
typedef void (*XYZ)();
|
||||
#pragma pack(pop)
|
||||
}
|
||||
|
||||
|
||||
union ABCU {
|
||||
ABCS color;
|
||||
XYZ bg;
|
||||
};
|
||||
|
||||
struct AData {
|
||||
ABCU data;
|
||||
};
|
||||
|
||||
class L {
|
||||
public:
|
||||
L() {}
|
||||
L(const L& other);
|
||||
|
||||
private:
|
||||
AData fdata;
|
||||
};
|
||||
|
||||
|
||||
L::L(const L& other)
|
||||
{
|
||||
fdata = other.fdata;
|
||||
}
|
Loading…
Reference in New Issue
Block a user