doc: Remove i?86-*-linux* installation note from 2003
[official-gcc.git] / gcc / testsuite / obj-c++.dg / duplicate-class-1.mm
blob77e52c6893f3da10a13c5c4267cfda51d9c2c6aa
1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
2 /* { dg-do compile } */
3 // { dg-additional-options "-Wno-objc-root-class" }
5 /* Test that a duplicated @implementation for the same class does not
6    crash the compiler.  */
8 @interface Test
10   Class isa;
12 - (int) test;
13 @end
15 @implementation Test
16 - (int) test
18   return 4;
20 @end
22 /* The most likely cause is that the programmer meant this to be a
23    category, so check what happens if we have some different methods
24    in there.  */
25 @implementation Test /* { dg-error "reimplementation of class .Test." } */
26 - (int) test2
28   return [self test];
30 @end
31 /* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
32 /* { dg-warning "not found" "" { target *-*-* } .-2 } */