1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <stdlib.h> #include <stdio.h> extern int foo (void); extern __thread int yyy; __thread int zzz = 20; int main (void) { if (foo () != zzz) abort (); if (yyy != 100) abort (); printf ("PASS\n"); return 0; }