mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
New test case.
llvm-svn: 35868
This commit is contained in:
parent
60f3ece40f
commit
6d8b1e984b
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