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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [obj-c++.dg/] [method-11.mm] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Check if class references (generated for the NeXT runtime) are appropriately
2
   folded.  This test is safe to run on all targets.  */
3
/* Author: Ziemowit Laski .  */
4
/* { dg-options "-fnext-runtime" } */
5
/* { dg-do compile } */
6
 
7
#include 
8
 
9
typedef Object ObjectTypedef1;
10
typedef ObjectTypedef1 ObjectTypedef2;
11
@compatibility_alias ObjectAlias1 ObjectTypedef2;
12
@compatibility_alias ObjectAlias2 ObjectAlias1;
13
typedef ObjectAlias2 ObjectTypedef3;
14
 
15
void foo(void) {
16
  id obj = [Object new];
17
  obj = [ObjectTypedef1 new];
18
  obj = [ObjectTypedef2 new];
19
  obj = [ObjectTypedef3 new];
20
  obj = [ObjectAlias1 new];
21
  obj = [ObjectAlias2 new];
22
}
23
 
24
/* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
25
/* { dg-final { scan-assembler-not "_OBJC_CLASS_REFERENCES_1" } } */

powered by: WebSVN 2.1.0

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