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-le.c] - Blame information for rev 774

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_le __attribute__((tls_model("local-exec"))) = 3;
8
 
9
int get_le (void)
10
{
11
  return tls_le;
12
}
13
 
14
int *get_lep (void)
15
{
16
  return &tls_le;
17
}
18
 
19
int main (void)
20
{
21
  int val;
22
 
23
  val = get_le ();
24
  if (val != 3)
25
    abort ();
26
 
27
  val = *get_lep ();
28
  if (val != 3)
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.