From 82743daacff6fe9c62a43ecf7f42d2f0d973e0b5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 May 2006 19:34:09 +0000 Subject: [PATCH] new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28396 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CFrontend/2006-05-19-SingleEltReturn.c | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/CFrontend/2006-05-19-SingleEltReturn.c 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; +} +