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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [bad-receiver-type-2.m] - Blame information for rev 716

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

Line No. Rev Author Line
1 704 jeremybenn
/* { dg-do compile } */
2
/* Contributed by Alexander Malmberg: PR18456 */
3
 
4
@interface Foo
5
-(void) foo;
6
@end
7
 
8
void *ip;
9
 
10
void (*func1)(void);
11
 
12
struct
13
{
14
    int a:2;
15
} struct1,struct2[2];
16
 
17
union
18
{
19
    int a:2;
20
} union1,union2[2];
21
 
22
Foo **f;
23
 
24
int main(int argc,char **argv)
25
{
26
  [(struct {int a;} *)ip foo];  /* { dg-warning "invalid receiver type" } */
27
  [func1 foo];                  /* { dg-warning "invalid receiver type" } */
28
  [struct1.a foo];              /* { dg-warning "invalid receiver type" } */
29
                                /* { dg-warning "cast to pointer from integer" "" { target *-*-* } 28 } */
30
  [union1.a foo];               /* { dg-warning "invalid receiver type" } */
31
                                /* { dg-warning "cast to pointer from integer" "" { target *-*-* } 30 } */
32
  [struct1 foo];                /* { dg-warning "invalid receiver type" } */
33
                                /* { dg-error "cannot convert" "" { target *-*-* } 32 } */
34
  [union1 foo];                 /* { dg-warning "invalid receiver type" } */
35
                                /* { dg-error "cannot convert" "" { target *-*-* } 34 } */
36
  [struct2 foo];                /* { dg-warning "invalid receiver type" } */
37
                                /* { dg-error "cannot convert" "" { target *-*-* } 36 } */
38
  [union2 foo];                 /* { dg-warning "invalid receiver type" } */
39
                                /* { dg-error "cannot convert" "" { target *-*-* } 38 } */
40
  [f foo];                      /* { dg-warning "invalid receiver type" } */
41
}

powered by: WebSVN 2.1.0

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