summaryrefslogtreecommitdiff
path: root/test/CodeGen/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/decl.c')
-rw-r--r--test/CodeGen/decl.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c
index 7ffb7006b05b..7a9971ee1812 100644
--- a/test/CodeGen/decl.c
+++ b/test/CodeGen/decl.c
@@ -89,3 +89,31 @@ struct test7s { int a; int b; } test7[] = {
struct test8s { int f0; char f1; } test8g = {};
+// PR7519
+
+struct S {
+ void (*x) (struct S *);
+};
+
+extern struct S *global_dc;
+void cp_diagnostic_starter(struct S *);
+
+void init_error(void) {
+ global_dc->x = cp_diagnostic_starter;
+}
+
+
+
+// rdar://8147692 - ABI crash in recursive struct-through-function-pointer.
+typedef struct {
+ int x5a;
+} x5;
+
+typedef struct x2 *x0;
+typedef long (*x1)(x0 x0a, x5 x6);
+struct x2 {
+ x1 x4;
+};
+long x3(x0 x0a, x5 a) {
+ return x0a->x4(x0a, a);
+}