31 lines · c
1// Test returning a single element aggregate value containing a double.2// RUN: %clang_cc1 -triple i686-linux %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_323// RUN: %clang_cc1 %s -emit-llvm -o -4 5struct X {6 double D;7};8 9struct Y {10 struct X x;11};12 13struct Y bar(void);14 15void foo(struct Y *P) {16 *P = bar();17}18 19struct Y bar(void) {20 struct Y a;21 a.x.D = 0;22 return a;23}24 25 26// X86_32: define{{.*}} void @foo(ptr noundef %P)27// X86_32: call void @bar(ptr dead_on_unwind writable sret(%struct.Y) align 4 %{{[^),]*}})28 29// X86_32: define{{.*}} void @bar(ptr dead_on_unwind noalias writable sret(%struct.Y) align 4 %{{[^,)]*}})30// X86_32: ret void31