view gcc/testsuite/gcc.dg/tls/pr45870.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* PR target/45870 */
/* { dg-do compile } */
/* { dg-options "-g -O" } */
/* { dg-require-effective-target tls } */

__thread int v[30];
int bar (void);

int
foo (int x, int y, int z)
{
  int a, b = z, c;
  while (b > 0)
    {
      c = (bar () % 3);
      a = v[x];
      if (x < y)
	for (;;);
      b += a;
    }
}