OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [duplicate-class-1.m] - Blame information for rev 713

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
2
/* { dg-do compile } */
3
 
4
/* Test that a duplicated @implementation for the same class does not
5
   crash the compiler.  */
6
 
7
@interface Test
8
{
9
  Class isa;
10
}
11
- (int) test;
12
@end
13
 
14
@implementation Test
15
- (int) test
16
{
17
  return 4;
18
}
19
@end
20
 
21
/* The most likely cause is that the programmer meant this to be a
22
   category, so check what happens if we have some different methods
23
   in there.  */
24
@implementation Test
25
- (int) test2  /* { dg-error "reimplementation of class .Test." } */
26
{
27
  return [self test];
28
}
29
@end
30
/* { dg-warning "incomplete implementation" "" { target *-*-* } 29 } */
31
/* { dg-warning "not found" "" { target *-*-* } 29 } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.