From: Jakub Jelinek Date: Wed, 13 Feb 2019 08:45:37 +0000 (+0100) Subject: re PR target/89290 (ICE in change_address_1, at emit-rtl.c:2286) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e7f831c2a312ce3c8b0a60417a896203dcbbf56;p=gcc.git re PR target/89290 (ICE in change_address_1, at emit-rtl.c:2286) PR target/89290 * config/i386/predicates.md (x86_64_immediate_operand): Allow TLS UNSPECs offsetted by signed 32-bit CONST_INT even with -mcmodel=large. * gcc.target/i386/pr89290.c: New test. From-SVN: r268837 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 533ab59b6bb..832f1a3bb7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-02-13 Jakub Jelinek + + PR target/89290 + * config/i386/predicates.md (x86_64_immediate_operand): Allow + TLS UNSPECs offsetted by signed 32-bit CONST_INT even with + -mcmodel=large. + 2019-02-13 Martin Liska PR lto/88858 diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 807883e75d2..865947debcc 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -182,7 +182,7 @@ rtx op1 = XEXP (XEXP (op, 0), 0); rtx op2 = XEXP (XEXP (op, 0), 1); - if (ix86_cmodel == CM_LARGE) + if (ix86_cmodel == CM_LARGE && GET_CODE (op1) != UNSPEC) return false; if (!CONST_INT_P (op2)) return false; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 43d84f68b49..bf9d01cc978 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-13 Jakub Jelinek + + PR target/89290 + * gcc.target/i386/pr89290.c: New test. + 2019-01-23 Xiong Hu Luo * gcc.target/powerpc/crypto-builtin-1.c diff --git a/gcc/testsuite/gcc.target/i386/pr89290.c b/gcc/testsuite/gcc.target/i386/pr89290.c new file mode 100644 index 00000000000..89b26f2013a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89290.c @@ -0,0 +1,19 @@ +/* PR target/89290 */ +/* { dg-do compile { target { tls && lp64 } } } */ +/* { dg-options "-O0 -mcmodel=large" } */ + +struct S { long int a, b; } e; +__thread struct S s; +__thread struct S t[2]; + +void +foo (void) +{ + s = e; +} + +void +bar (void) +{ + t[1] = e; +}