summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/property/synthesize-5.mm
blob: 0871b63ee2195610dcf205b69d0b9662a00b11ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
/* { dg-do compile } */

/* Test that @synthesize does not ICE if asked to use a non-existing
   ivar.  */

#include <objc/objc.h>

@interface Test
@property int v1;
@end

@implementation Test
@synthesize v1;       /* { dg-error "must be an existing ivar" } */
@end
/* { dg-warning "incomplete implementation" "" { target *-*-* } 15 } */
/* { dg-warning "method definition for .-setV1:. not found" "" { target *-*-* } 15 } */
/* { dg-warning "method definition for .-v1. not found" "" { target *-*-* } 15 } */