tst-tls11.c 414 B

123456789101112131415161718192021222324252627
  1. #include "tst-tls10.h"
  2. #define CHECK(N, S) \
  3. p = f##N##a (); \
  4. if (p->a != S || p->b != S + 1 || p->c != S + 2) \
  5. abort ()
  6. int
  7. main (void)
  8. {
  9. #ifdef USE_TLS__THREAD
  10. struct A *p;
  11. check1 ();
  12. check2 ();
  13. CHECK (1, 4);
  14. CHECK (2, 22);
  15. CHECK (3, 10);
  16. CHECK (4, 25);
  17. CHECK (5, 16);
  18. CHECK (6, 19);
  19. CHECK (7, 22);
  20. CHECK (8, 25);
  21. CHECK (9, 28);
  22. CHECK (10, 31);
  23. #endif
  24. exit (0);
  25. }