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] - Blame information for rev 706

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target tls_runtime } */
3
/* { dg-add-options tls } */
4
 
5
extern void abort (void);
6
 
7
__thread int tls_ie __attribute__((tls_model("initial-exec"))) = 4;
8
 
9
int get_ie (void)
10
{
11
  return tls_ie;
12
}
13
 
14
int *get_iep (void)
15
{
16
  return &tls_ie;
17
}
18
 
19
int main (void)
20
{
21
  int val;
22
 
23
  val = get_ie ();
24
  if (val != 4)
25
    abort ();
26
 
27
  val = *get_iep ();
28
  if (val != 4)
29
    abort ();
30
 
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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