URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [obj-c++.dg/] [comp-types-6.mm] - Rev 839
Go to most recent revision | Compare with Previous | Blame | View Log
/* Test assignments and comparisons involving `one-off' protocols. */
/* Author: Nicola Pero <nicola@brainstorm.co.uk>. */
/* { dg-do compile } */
#include <objc/objc.h>
@protocol MyProtocol
- (void) method;
@end
@interface MyClass
@end
int main()
{
id obj = nil;
id <MyProtocol> obj_p = nil;
MyClass<MyProtocol> *obj_cp = nil;
obj_cp = obj; /* Ok */
obj = obj_cp; /* Ok */
obj_cp = obj_p; /* Ok */
obj_p = obj_cp; /* Ok */
if (obj_cp == obj) ; /* Ok */
if (obj == obj_cp) ; /* Ok */
if (obj_cp == obj_p) ; /* Ok */
if (obj_p == obj_cp) ; /* Ok */
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log