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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tls/] [pr47715-4.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O0" } */
3
/* { dg-require-effective-target tls } */
4
 
5
struct gomp_team_state
6
{
7
  struct gomp_team_state *prev_ts;
8
  unsigned team_id;
9
  unsigned level;
10
};
11
struct gomp_thread
12
{
13
  void *data;
14
  struct gomp_team_state ts;
15
};
16
extern __thread struct gomp_thread gomp_tls_data;
17
int
18
foo (int level)
19
{
20
  struct gomp_team_state *ts = &gomp_tls_data.ts;
21
  if (level < 0 || level > ts->level)
22
    return -1;
23
  return ts->team_id;
24
}

powered by: WebSVN 2.1.0

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