2012-05-10 05:21:49 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
|
2007-12-29 13:02:41 +08: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;
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @bar
|
2007-12-29 13:02:41 +08:00
|
|
|
void bar(void) {
|
|
|
|
X = foo().f.f.x;
|
|
|
|
}
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @bun
|
2007-12-29 13:02:41 +08:00
|
|
|
void bun(void) {
|
|
|
|
F = foo().f.f;
|
|
|
|
}
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @ban
|
2007-12-29 13:02:41 +08:00
|
|
|
void ban(void) {
|
|
|
|
C = foo().f.f.c;
|
|
|
|
}
|