URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 307 |
Rev 384 |
/* Contributed by Nicola Pero - Wed Mar 7 17:55:04 CET 2001 */
|
/* Contributed by Nicola Pero - Wed Mar 7 17:55:04 CET 2001 */
|
#include <objc/objc.h>
|
#include <objc/objc.h>
|
|
|
/* Test that +load is automatically called before main is run */
|
/* Test that +load is automatically called before main is run */
|
|
|
static int static_variable = 0;
|
static int static_variable = 0;
|
|
|
@interface TestClass
|
@interface TestClass
|
{
|
{
|
Class isa;
|
Class isa;
|
}
|
}
|
+ (void) load;
|
+ (void) load;
|
@end
|
@end
|
|
|
@implementation TestClass
|
@implementation TestClass
|
+ (void) load
|
+ (void) load
|
{
|
{
|
static_variable = 1;
|
static_variable = 1;
|
}
|
}
|
@end
|
@end
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
if (static_variable != 1)
|
if (static_variable != 1)
|
{
|
{
|
abort ();
|
abort ();
|
}
|
}
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.