aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/objc-fast-1.m
blob: 6db7c38beecf9645ced6faabb18df23bd41e65ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* APPLE LOCAL file ObjC direct dispatch */
/* A compile-only test for insertion of 'bla' comm page jumps. */
/* Developed by Ziemowit Laski  <zlaski@apple.com>  */
/* { dg-do compile { target powerpc*-*-darwin* } } */
/* { dg-options "-fnext-runtime -fobjc-gc -fobjc-direct-dispatch -Wassign-intercept" } */

#include <objc/Object.h>

@interface Derived: Object {
@public
  Object *other;
}
@end

void foo(void) {
  Derived *o = [Derived new];
  o->other = 0;  /* { dg-warning "instance variable assignment has been intercepted" } */
}

/* { dg-final { scan-assembler-not "objc_msgSend" } } */
/* { dg-final { scan-assembler-not "objc_assign_ivar" } } */

/* { dg-final { scan-assembler "bla.*fffeff00" } } */
/* { dg-final { scan-assembler "bla.*fffefec0" } } */