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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tls/] [opt-14.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* This testcase generated invalid assembly on ARM Thumb-2.  Two
2
   PIC additions of pc were combined, but the deleted label was still
3
   used.  */
4
/* { dg-do assemble } */
5
/* { dg-options "-O2" } */
6
/* { dg-require-effective-target tls } */
7
 
8
struct __res_state
9
{
10
  int options;
11
};
12
extern __thread struct __res_state *__resp
13
  __attribute__ ((tls_model ("initial-exec")));
14
 
15
void foo (void);
16
 
17
int main(void)
18
{
19
  int count, total = 0;
20
 
21
  for (count = 0; count < 10; count++)
22
    {
23
      if (((*__resp).options & 0x00000001) == 0)
24
        foo ();
25
      (*__resp).options &= ~((0x00000002 | 0x00000200 | 0x00000080));
26
    }
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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