Ticket #18348: foo.c

File foo.c, 234 bytes (added by bhaible, 13 months ago)

test case

Line 
1#include <threads.h>
2#include <stdlib.h>
3
4static once_flag a_once = ONCE_FLAG_INIT;
5
6static int a;
7
8static void
9a_init (void)
10{
11 a = 42;
12}
13
14int
15main ()
16{
17 call_once (&a_once, a_init);
18
19 if (!(a == 42))
20 abort ();
21
22 return 0;
23}