OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [tls/] [struct-1.c] - Blame information for rev 437

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

Line No. Rev Author Line
1 298 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-require-effective-target fpic } */
5
/* { dg-options "-O2 -fpic" } */
6
/* { dg-require-effective-target tls } */
7
 
8
struct S {
9
  int s0, s1, s2, s3;
10
};
11
static __thread struct S x;
12
extern void abort (void);
13
extern void exit (int);
14
 
15
void
16
foo (struct S *s)
17
{
18
  s->s2 = 231;
19
}
20
 
21
void
22
bar (void)
23
{
24
  if (x.s0 == 231 || x.s2 != 231)
25
    abort ();
26
}
27
 
28
int
29
main ()
30
{
31
  foo (&x);
32
  bar ();
33
  exit (0);
34
}

powered by: WebSVN 2.1.0

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