From: Chris Lattner Date: Fri, 19 May 2006 19:34:09 +0000 (+0000) Subject: new testcase X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=82743daacff6fe9c62a43ecf7f42d2f0d973e0b5;p=oota-llvm.git new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28396 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CFrontend/2006-05-19-SingleEltReturn.c b/test/CFrontend/2006-05-19-SingleEltReturn.c new file mode 100644 index 00000000000..70c94c62052 --- /dev/null +++ b/test/CFrontend/2006-05-19-SingleEltReturn.c @@ -0,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; +} +