aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/struct.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-10 03:47:27 +0000
committerChris Lattner <sabre@nondot.org>2011-07-10 03:47:27 +0000
commitf0a8679b6e6635117533b89894646f1450cea25b (patch)
tree0524a1b5ef9d8052c6bc846d6614c8c187fa05c6 /test/CodeGen/struct.c
parent12569fb55db2a8181711ac134b7479155db4f838 (diff)
Fix the clang bootstrap and Jay's testcase from llvm-dev by being completely
conservative when converting a functiontype to IR when in a "pointer within a struct" context. This has the unfortunate sideeffect of compiling all function pointers inside of structs into "{}*" which, though correct, is ugly. This has the positive side effect of being correct, and it is pretty straight-forward to improve on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/struct.c')
-rw-r--r--test/CodeGen/struct.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/struct.c b/test/CodeGen/struct.c
index 25477a052e..e1739314d7 100644
--- a/test/CodeGen/struct.c
+++ b/test/CodeGen/struct.c
@@ -181,3 +181,16 @@ range f18() {
rangepair rp;
return (rp = f18_ext()).range1;
}
+
+
+
+// Complex forward reference of struct.
+struct f19S;
+extern struct f19T {
+ struct f19S (*p)(void);
+} t;
+struct f19S { int i; };
+void f19(void) {
+ t.p();
+}
+