freebsd-dev/test/CodeGen/func-return-member.c

27 lines
421 B
C
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2009-06-02 17:58:47 +00:00
struct frk { float _Complex c; int x; };
struct faz { struct frk f; };
struct fuz { struct faz f; };
extern struct fuz foo(void);
int X;
struct frk F;
float _Complex C;
2009-12-01 11:08:04 +00:00
// CHECK: define void @bar
2009-06-02 17:58:47 +00:00
void bar(void) {
X = foo().f.f.x;
}
2009-12-01 11:08:04 +00:00
// CHECK: define void @bun
2009-06-02 17:58:47 +00:00
void bun(void) {
F = foo().f.f;
}
2009-12-01 11:08:04 +00:00
// CHECK: define void @ban
2009-06-02 17:58:47 +00:00
void ban(void) {
C = foo().f.f.c;
}