[llvm-commits] CVS: llvm/test/Regression/CFrontend/2006-05-19-SingleEltReturn.c
Chris Lattner
lattner at cs.uiuc.edu
Fri May 19 12:34:21 PDT 2006
Changes in directory llvm/test/Regression/CFrontend:
2006-05-19-SingleEltReturn.c added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+23 -0)
2006-05-19-SingleEltReturn.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+)
Index: llvm/test/Regression/CFrontend/2006-05-19-SingleEltReturn.c
diff -c /dev/null llvm/test/Regression/CFrontend/2006-05-19-SingleEltReturn.c:1.1
*** /dev/null Fri May 19 14:34:19 2006
--- llvm/test/Regression/CFrontend/2006-05-19-SingleEltReturn.c Fri May 19 14:34:09 2006
***************
*** 0 ****
--- 1,23 ----
+ // Test returning a single element aggregate value containing a double.
+ // RUN: %llvmgcc %s -S -o -
+
+ struct X {
+ double D;
+ };
+
+ struct Y {
+ struct X x;
+ };
+
+ struct Y bar();
+
+ void foo(struct Y *P) {
+ *P = bar();
+ }
+
+ struct Y bar() {
+ struct Y a;
+ a.x.D = 0;
+ return a;
+ }
+
More information about the llvm-commits
mailing list