Revise -mdisable-fpregs option and add new -msoft-mult option
[official-gcc.git] / gcc / testsuite / objc.dg / ivar-visibility-2.m
blob6ddcb5b46652cc4d9ebc31d8357481da56190029
1 /* Test instance variable visibility.  */
2 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
3 /* { dg-do compile } */
4 /* { dg-additional-options "-fivar-visibility=protected -Wno-objc-root-class" } */
5 #include <objc/objc.h>
7 @interface MySuperClass
9     int someivar;
11 @end
13 @implementation MySuperClass
14 @end
17 @interface MyClass : MySuperClass 
18 @end
20 @implementation MyClass
21 @end
23 @interface MyOtherClass
24 - (void) test: (MyClass *) object;
25 @end
27 @implementation MyOtherClass
28 - (void) test: (MyClass *) object
30   int a;
32   a = object->someivar;   /* { dg-error "instance variable .someivar. is declared protected" } */
34 @end