[llvm-commits] CVS: llvm/test/CFrontend/2007-05-29-UnionCopy.c

Chris Lattner sabre at nondot.org
Tue May 29 22:37:40 PDT 2007



Changes in directory llvm/test/CFrontend:

2007-05-29-UnionCopy.c added (r1.1)
---
Log message:

new testcase for PR1421: http://llvm.org/PR1421 


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

 2007-05-29-UnionCopy.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)


Index: llvm/test/CFrontend/2007-05-29-UnionCopy.c
diff -c /dev/null llvm/test/CFrontend/2007-05-29-UnionCopy.c:1.1
*** /dev/null	Wed May 30 00:37:28 2007
--- llvm/test/CFrontend/2007-05-29-UnionCopy.c	Wed May 30 00:37:18 2007
***************
*** 0 ****
--- 1,18 ----
+ // RUN: %llvmgcc -S -o - -emit-llvm %s | grep memcpy
+ // PR1421
+ 
+ struct A {
+   char c;
+   int i;
+ };
+ 
+ struct B {
+   int c;
+   unsigned char x;
+ };
+ 
+ union U { struct A a; struct B b; };
+ 
+ void check(union U *u, union U *v) {
+   *u = *v;
+ }






More information about the llvm-commits mailing list