aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/comp-types-8.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/comp-types-8.m')
-rw-r--r--gcc/testsuite/objc.dg/comp-types-8.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/comp-types-8.m b/gcc/testsuite/objc.dg/comp-types-8.m
new file mode 100644
index 00000000000..7b940a7ba97
--- /dev/null
+++ b/gcc/testsuite/objc.dg/comp-types-8.m
@@ -0,0 +1,25 @@
+/* APPLE LOCAL file Objective-C */
+/* { 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