OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [tlscall.c] - Rev 715

Go to most recent revision | Compare with Previous | Blame | View Log

/* Test non-duplication of tlscall insn */
 
/* { dg-do assemble } */
/* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */
 
typedef struct _IO_FILE FILE;
 
extern int foo(void);
extern int bar(void);
 
void uuid__generate_time()
{
 static int has_init = 0;
 static __thread int state_fd = -2;
 static __thread FILE *state_f;
 
 if (!has_init) {
   foo();
   has_init = 1;
 }
 
 if (state_fd == -2) {
  if (!state_f) {
   state_fd = -1;
  }
 }
 if (state_fd >= 0) {
  while (bar() < 0) {}
 }
 
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.