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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tls/] [struct-1.c] - Blame information for rev 856

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

Line No. Rev Author Line
1 149 jeremybenn
/* This testcase ICEd on IA-32 because the backend was inconsistent whether
2
   to allow addends for @dtpoff relocs or not.  */
3
/* { dg-do compile } */
4
/* { dg-options "-O2 -fpic" } */
5
/* { dg-require-effective-target tls } */
6
 
7
struct S {
8
  int s0, s1, s2, s3;
9
};
10
static __thread struct S x;
11
extern void abort (void);
12
extern void exit (int);
13
 
14
void
15
foo (struct S *s)
16
{
17
  s->s2 = 231;
18
}
19
 
20
void
21
bar (void)
22
{
23
  if (x.s0 == 231 || x.s2 != 231)
24
    abort ();
25
}
26
 
27
int
28
main ()
29
{
30
  foo (&x);
31
  bar ();
32
  exit (0);
33
}

powered by: WebSVN 2.1.0

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