summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/func-return-member.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/func-return-member.c')
-rw-r--r--test/CodeGen/func-return-member.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/func-return-member.c b/test/CodeGen/func-return-member.c
new file mode 100644
index 0000000..e6fc562
--- /dev/null
+++ b/test/CodeGen/func-return-member.c
@@ -0,0 +1,23 @@
+// RUN: clang-cc -emit-llvm < %s 2>&1 | not grep 'cannot codegen this l-value expression yet'
+
+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;
+
+void bar(void) {
+ X = foo().f.f.x;
+}
+
+void bun(void) {
+ F = foo().f.f;
+}
+
+void ban(void) {
+ C = foo().f.f.c;
+}
OpenPOWER on IntegriCloud