repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
objc
/
execute
/
static-1.m
blob
460f64cc1864a4a75f7664efde44bb6c0c13736f
1
/* Contributed by Nicola Pero - Fri Mar 9 19:39:15 CET 2001 */
2
#include <objc/objc.h>
3
4
/* Test defining a static variable *inside* a class implementation */
5
6
@interface Test
7
{
8
Class isa;
9
}
10
+ (int) test;
11
@end
12
13
@implementation Test
14
15
static int test = 1;
16
17
+ (int) test
18
{
19
return test;
20
}
21
22
+ initialize { return self; }
23
@end
24
25
int main (void)
26
{
27
if ([Test test] != 1)
28
{
29
abort ();
30
}
31
32
return 0;
33
}
34
35