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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [tls/] [run-ie.c] - Rev 706

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

/* { dg-do run } */
/* { dg-require-effective-target tls_runtime } */
/* { dg-add-options tls } */
 
extern void abort (void);
 
__thread int tls_ie __attribute__((tls_model("initial-exec"))) = 4;
 
int get_ie (void)
{
  return tls_ie;
}
 
int *get_iep (void)
{
  return &tls_ie;
}
 
int main (void)
{
  int val;
 
  val = get_ie ();
  if (val != 4)
    abort ();
 
  val = *get_iep ();
  if (val != 4)
    abort ();
 
  return 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.