* gcc.dg/tls/struct-1.c: New test.

From-SVN: r57367
This commit is contained in:
Jakub Jelinek 2002-09-20 22:03:40 +02:00 committed by Jakub Jelinek
parent 56941bf2e3
commit 6ba085e708
2 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-09-20 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/tls/struct-1.c: New test.
2002-09-20 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/tr-warn2.c: Update.

View File

@ -0,0 +1,32 @@
/* This testcase ICEd on IA-32 because the backend was inconsistent whether
to allow addends for @dtpoff relocs or not. */
/* { dg-do compile } */
/* { dg-options "-O2 -fpic" } */
struct S {
int s0, s1, s2, s3;
};
static __thread struct S x;
extern void abort (void);
extern void exit (int);
void
foo (struct S *s)
{
s->s2 = 231;
}
void
bar (void)
{
if (x.s0 == 231 || x.s2 != 231)
abort ();
}
int
main ()
{
foo (&x);
bar ();
exit (0);
}