mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
32 lines
579 B
C
32 lines
579 B
C
// #target: macos-x64
|
|
|
|
struct Abc {
|
|
long a;
|
|
long b;
|
|
long c;
|
|
long d;
|
|
long e;
|
|
}
|
|
|
|
extern fn Abc foo1();
|
|
extern fn Abc foo2();
|
|
|
|
fn void bar() {
|
|
Abc dummy1 = foo1();
|
|
Abc dummy2 = foo2();
|
|
}
|
|
|
|
// Cleanup for this result, since it's creating an unnecessary sret.
|
|
|
|
// #expect: test_sret.ll
|
|
|
|
declare void @foo1(%Abc* noalias sret(%Abc) align 8)
|
|
|
|
declare void @foo2(%Abc* noalias sret(%Abc) align 8)
|
|
|
|
%dummy1 = alloca %Abc, align 8
|
|
%dummy2 = alloca %Abc, align 8
|
|
call void @foo1(%Abc* sret(%Abc) align 8 %dummy1)
|
|
call void @foo2(%Abc* sret(%Abc) align 8 %dummy2)
|
|
ret void
|