summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/appendix-a/a.22.1.c
blob: e3586838a34086ff082afbdf439fcdc0674beacb (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-require-effective-target tls } */

int counter = 0;
#pragma omp threadprivate(counter)
int
increment_counter ()
{
  counter++;
  return (counter);
}