gcc.target/cris/pr93372-3.c, -4.c...-35.c: New tests.
[gcc.git] / gcc / testsuite / objc.dg / ivar-scope-1.m
1 /* Test instance variable scope. */
2 /* Author: Dimitris Papavasiliou <dpapavas@gmail.com>. */
3 /* { dg-do compile } */
4 #include <objc/objc.h>
5
6 @interface MyClass
7 {
8 int someivar;
9 }
10 - (void) test;
11 @end
12
13 @implementation MyClass
14 - (void) test
15 {
16 int a;
17
18 /* Make sure instance variables do have local scope when
19 -fno-local-ivar isn't specified. */
20
21 a = self->someivar; /* No warning or error. */
22 a = someivar; /* No error. */
23 }
24 @end