blob: efc30034e00259d342ce47df63eab7deab1af187 [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
Stephen Lin93ab6bf2013-08-15 06:47:53 +000013// CHECK-LABEL: define void @bar
Christopher Lamb22c940e2007-12-29 05:02:41 +000014void bar(void) {
15 X = foo().f.f.x;
16}
17
Stephen Lin93ab6bf2013-08-15 06:47:53 +000018// CHECK-LABEL: define void @bun
Christopher Lamb22c940e2007-12-29 05:02:41 +000019void bun(void) {
20 F = foo().f.f;
21}
22
Stephen Lin93ab6bf2013-08-15 06:47:53 +000023// CHECK-LABEL: define void @ban
Christopher Lamb22c940e2007-12-29 05:02:41 +000024void ban(void) {
25 C = foo().f.f.c;
26}