* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / objc.dg / ivar-visibility-4.m
blobadfeb449e55b3bf660887b3ac098f60d6c7cc5b9
1 /* Test instance variable visibility.  */
2 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>.  */
3 /* { dg-do compile } */
4 /* { dg-additional-options "-fivar-visibility=public" } */
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   /* someivar is public so we shouldn't get any errors here. */
33   
34   a = object->someivar;
36 @end