Nuno Lopes | 060ddb0 | 2012-05-09 21:21:49 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s |
Christopher Lamb | 22c940e | 2007-12-29 05:02:41 +0000 | [diff] [blame] | 2 | |
| 3 | struct frk { float _Complex c; int x; }; |
| 4 | struct faz { struct frk f; }; |
| 5 | struct fuz { struct faz f; }; |
| 6 | |
| 7 | extern struct fuz foo(void); |
| 8 | |
| 9 | int X; |
| 10 | struct frk F; |
| 11 | float _Complex C; |
| 12 | |
Stephen Lin | 93ab6bf | 2013-08-15 06:47:53 +0000 | [diff] [blame] | 13 | // CHECK-LABEL: define void @bar |
Christopher Lamb | 22c940e | 2007-12-29 05:02:41 +0000 | [diff] [blame] | 14 | void bar(void) { |
| 15 | X = foo().f.f.x; |
| 16 | } |
| 17 | |
Stephen Lin | 93ab6bf | 2013-08-15 06:47:53 +0000 | [diff] [blame] | 18 | // CHECK-LABEL: define void @bun |
Christopher Lamb | 22c940e | 2007-12-29 05:02:41 +0000 | [diff] [blame] | 19 | void bun(void) { |
| 20 | F = foo().f.f; |
| 21 | } |
| 22 | |
Stephen Lin | 93ab6bf | 2013-08-15 06:47:53 +0000 | [diff] [blame] | 23 | // CHECK-LABEL: define void @ban |
Christopher Lamb | 22c940e | 2007-12-29 05:02:41 +0000 | [diff] [blame] | 24 | void ban(void) { |
| 25 | C = foo().f.f.c; |
| 26 | } |