repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
objc
/
execute
/
load.m
blob
fad662384d6cb1a71e9104a7ce7e7e7b1b2a921b
1
/* Contributed by Nicola Pero - Wed Mar 7 17:55:04 CET 2001 */
2
#include <objc/objc.h>
3
4
/* Test that +load is automatically called before main is run */
5
6
static int static_variable = 0;
7
8
@interface TestClass
9
{
10
Class isa;
11
}
12
+ (void) load;
13
@end
14
15
@implementation TestClass
16
+ (void) load
17
{
18
static_variable = 1;
19
}
20
@end
21
22
int main (void)
23
{
24
if (static_variable != 1)
25
{
26
abort ();
27
}
28
29
return 0;
30
}