aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
new file mode 100644
index 000000000..4c1480a6b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+#include <objc/objc.h>
+
+@interface MyRootClass
+{
+ Class isa;
+}
+@end
+
+@interface MySubClass
+{
+ volatile int a; /* This is allowed */
+ extern int b; /* { dg-error "invalid type" } */
+ static int c; /* { dg-error "invalid type" } */
+ inline int d; /* { dg-error "declared as an .inline." } */
+ typedef int e; /* { dg-error "invalid type" } */
+ __thread int f; /* { dg-error "invalid type" } */
+}
+@end