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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc/] [execute/] [function-message-1.m] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
#include <objc/Object.h>
#include <objc/Object.h>
 
 
@interface Foo : Object
@interface Foo : Object
+ bar;
+ bar;
@end
@end
 
 
int foocalled = 0;
int foocalled = 0;
int barcalled = 0;
int barcalled = 0;
 
 
 
 
id foo()
id foo()
{
{
    if (foocalled)
    if (foocalled)
      abort ();
      abort ();
    foocalled = 1;
    foocalled = 1;
    return [Foo class];
    return [Foo class];
}
}
 
 
@implementation Foo
@implementation Foo
+ bar
+ bar
{
{
    if (barcalled)
    if (barcalled)
      abort ();
      abort ();
    barcalled = 1;
    barcalled = 1;
    return self;
    return self;
}
}
@end
@end
 
 
int main(int argc,char **argv)
int main(int argc,char **argv)
{
{
    [foo() bar];
    [foo() bar];
    return 0;
    return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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