* obj-c++.dg/bitfield-[1-5].mm: New. * obj-c++.dg/class-protocol-1.mm: New. * obj-c++.dg/comp-types-1[0-1].mm: New. * obj-c++.dg/comp-types-[2-9].mm: New. * obj-c++.dg/encode-[4-8].mm: New. * obj-c++.dg/layout-1.mm: New. * obj-c++.dg/method-1[0-9].mm: New. * obj-c++.dg/method-2[0-1].mm: New. * obj-c++.dg/method-[8-9].mm: New. * obj-c++.dg/objc-gc-3.mm: New. * obj-c++.dg/try-catch-10.mm: New. * objc.dg/bitfield-5.m: New. * objc.dg/comp-types-10.m: New. * objc.dg/comp-types-9.m: New. * objc.dg/layout-1.m: New. * objc.dg/objc-gc-4.m: New. * objc.dg/try-catch-9.m: New. * objc.dg/class-protocol-1.m: Tweak diagnostics. * objc.dg/comp-types-1.m: Likewise. * objc.dg/comp-types-[5-6].m: Likewise. * objc.dg/method-9.m: Likewise. From-SVN: r100121
26 lines
808 B
Plaintext
26 lines
808 B
Plaintext
/* Check if class references (generated for the NeXT runtime) are appropriately
|
|
folded. This test is safe to run on all targets. */
|
|
/* Author: Ziemowit Laski <zlaski@apple.com>. */
|
|
/* { dg-options "-fnext-runtime" } */
|
|
/* { dg-do compile } */
|
|
|
|
#include <objc/Object.h>
|
|
|
|
typedef Object ObjectTypedef1;
|
|
typedef ObjectTypedef1 ObjectTypedef2;
|
|
@compatibility_alias ObjectAlias1 ObjectTypedef2;
|
|
@compatibility_alias ObjectAlias2 ObjectAlias1;
|
|
typedef ObjectAlias2 ObjectTypedef3;
|
|
|
|
void foo(void) {
|
|
id obj = [Object new];
|
|
obj = [ObjectTypedef1 new];
|
|
obj = [ObjectTypedef2 new];
|
|
obj = [ObjectTypedef3 new];
|
|
obj = [ObjectAlias1 new];
|
|
obj = [ObjectAlias2 new];
|
|
}
|
|
|
|
/* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
|
|
/* { dg-final { scan-assembler-not "_OBJC_CLASS_REFERENCES_1" } } */
|