blob: 8c55a9671cd05d73bf69ce0651b32f7520c888aa [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
Christopher Lamb22c940e2007-12-29 05:02:41 +00002
3struct frk { float _Complex c; int x; };
4struct faz { struct frk f; };
5struct fuz { struct faz f; };
6
7extern struct fuz foo(void);
8
9int X;
10struct frk F;
11float _Complex C;
12
Daniel Dunbar600d47e2009-11-20 17:23:39 +000013// CHECK: define void @bar
Christopher Lamb22c940e2007-12-29 05:02:41 +000014void bar(void) {
15 X = foo().f.f.x;
16}
17
Daniel Dunbar600d47e2009-11-20 17:23:39 +000018// CHECK: define void @bun
Christopher Lamb22c940e2007-12-29 05:02:41 +000019void bun(void) {
20 F = foo().f.f;
21}
22
Daniel Dunbar600d47e2009-11-20 17:23:39 +000023// CHECK: define void @ban
Christopher Lamb22c940e2007-12-29 05:02:41 +000024void ban(void) {
25 C = foo().f.f.c;
26}