aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/comp-types-9.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/comp-types-9.mm')
-rw-r--r--gcc/testsuite/obj-c++.dg/comp-types-9.mm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/comp-types-9.mm b/gcc/testsuite/obj-c++.dg/comp-types-9.mm
new file mode 100644
index 00000000000..9c9b3dfe70f
--- /dev/null
+++ b/gcc/testsuite/obj-c++.dg/comp-types-9.mm
@@ -0,0 +1,25 @@
+/* APPLE LOCAL file mainline */
+/* { dg-do compile } */
+/* Another gimplifier ICE... */
+
+#include <objc/Object.h>
+
+@interface MyView: Object {
+ int _frame;
+}
+- (void)_finalize;
+@end
+
+@interface MyViewTemplate: MyView {
+ void *_className;
+}
+- (id)createRealObject;
+@end
+
+@implementation MyViewTemplate
+- (id)createRealObject {
+ id realObj;
+ *(MyView *)realObj = *(MyView *)self;
+ return realObj;
+}
+@end