Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / compile / 20060406-1.m
blob62148902ac4d63016627fe7137e79402defe78c2
1 /* This test tests typedefs and protocol qualifiers.  */
3 @protocol O
4 - (unsigned)j;
5 @end
7 @interface T
8 @end
11 /* First test.  */
12 typedef T<O> *S;
14 @interface I
15 + (unsigned char)T:(S[2])p
16                  v:(S)h;
17 @end
19 @implementation I
20 + (unsigned char)T:(S[2])p
21                  v:(S)h
23   p[0] = (S) 0;
24   p[1] = (S) 0;
25   return 0;
27 @end
30 /* Second test.  */
31 typedef T<O> S1;
33 @interface I1
34 + (unsigned char)T1:(S1*[2])p 
35                  v1:(S1*)h;
36 @end
38 @implementation I1
39 + (unsigned char)T1:(S1*[2])p
40                  v1:(S1*)h
42   p[0] = (S1*) 0;
43   p[1] = (S1*) 0;
44   return 0;
46 @end
49 /* Third test.  */
50 typedef T S2;
52 @interface I2
53 + (unsigned char)T1:(S2<O>*[2])p 
54                  v1:(S2<O>*)h;
55 @end
57 @implementation I2
58 + (unsigned char)T1:(S2<O>*[2])p
59                  v1:(S2<O>*)h
61   p[0] = (S2<O>*) 0;
62   p[1] = (S2<O>*) 0;
63   return 0;
65 @end