blob: 14ecac5d6bbb1672e4e628fd19adcdffb7377c8b [file] [log] [blame]
Nuno Lopes060ddb02012-05-09 21:21:49 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -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}