[llvm-commits] CVS: llvm/test/C++Frontend/2007-04-10-PackedUnion.cpp

Devang Patel dpatel at apple.com
Tue Apr 10 14:43:24 PDT 2007



Changes in directory llvm/test/C++Frontend:

2007-04-10-PackedUnion.cpp added (r1.1)
---
Log message:

New test case.


---
Diffs of the changes:  (+41 -0)

 2007-04-10-PackedUnion.cpp |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+)


Index: llvm/test/C++Frontend/2007-04-10-PackedUnion.cpp
diff -c /dev/null llvm/test/C++Frontend/2007-04-10-PackedUnion.cpp:1.1
*** /dev/null	Tue Apr 10 16:43:11 2007
--- llvm/test/C++Frontend/2007-04-10-PackedUnion.cpp	Tue Apr 10 16:43:01 2007
***************
*** 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;
+ }






More information about the llvm-commits mailing list