diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-06-10 11:12:53 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-06-10 11:12:53 +0200 |
commit | 8ffd51d230e0ab7a1c1caaf1486303796862f771 (patch) | |
tree | dec796ae97125a33366e7f80bb12f66109ef31a9 /gcc/testsuite/gcc.dg/tls | |
parent | b20952407935bd6c4638b9bd8fa44f6099c8bdbc (diff) | |
download | gcc-8ffd51d230e0ab7a1c1caaf1486303796862f771.zip gcc-8ffd51d230e0ab7a1c1caaf1486303796862f771.tar.gz gcc-8ffd51d230e0ab7a1c1caaf1486303796862f771.tar.bz2 |
re PR target/66470 (TLS ICE due to ix86_split_long_move)
PR target/66470
* config/i386/i386.c (ix86_split_long_move): For collisions
involving direct tls segment refs, move the UNSPEC_TP possibly
wrapped in ZERO_EXTEND out of the address for lea, to each of
the memory loads.
* gcc.dg/tls/pr66470.c: New test.
* gcc.target/i386/pr66470.c: New test.
From-SVN: r224319
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls')
-rw-r--r-- | gcc/testsuite/gcc.dg/tls/pr66470.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/pr66470.c b/gcc/testsuite/gcc.dg/tls/pr66470.c new file mode 100644 index 0000000..6d78327 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tls/pr66470.c @@ -0,0 +1,29 @@ +/* PR target/66470 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-require-effective-target tls } */ + +extern __thread unsigned long long a[10]; +extern __thread struct S { int a, b; } b[10]; + +unsigned long long +foo (long x) +{ + return a[x]; +} + +struct S +bar (long x) +{ + return b[x]; +} + +#ifdef __SIZEOF_INT128__ +extern __thread unsigned __int128 c[10]; + +unsigned __int128 +baz (long x) +{ + return c[x]; +} +#endif |