Hi, Due recent regression test-runs for x86_64-w64-mingw32, I noticed that some tests actual were failing due internal-compiler error for code-paths using split_double functions on PCREL symbols. The cause for this is that this unspec didn't allowed constant-interger displacements. This patch fixes that.
One of the testcases failing was 'testsuite/c-c++-common/dfp/convert-bfp-fold.c -O2'. ChangeLog 2012-02-16 Kai Tietz <kti...@redhat.com> * config/i386/predicates.md (x86_64_immediate_operand): Allow offset memory references for UNSPEC_PCREL. * config/i386/i386.c (legitimate_pic_address_disp_p): Allow interger-constant displacement for UNSPEC_PCREL. Tested for x86_64-w64-mingw32, and x86_64-unkown-linux-gnu for all languages. Ok for apply? Regards, Kai Index: config/i386/predicates.md =================================================================== --- config/i386/predicates.md (revision 184304) +++ config/i386/predicates.md (working copy) @@ -165,6 +165,7 @@ switch (XINT (XEXP (op, 0), 1)) { case UNSPEC_GOTPCREL: + case UNSPEC_PCREL: case UNSPEC_DTPOFF: case UNSPEC_GOTNTPOFF: case UNSPEC_NTPOFF: Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 184304) +++ config/i386/i386.c (working copy) @@ -11823,6 +11823,13 @@ break; if (GET_CODE (op0) == LABEL_REF) return true; + if (GET_CODE (op0) == CONST + && GET_CODE (XEXP (op0, 0)) == UNSPEC + && XINT (XEXP (op0, 0), 1) == UNSPEC_PCREL) + return true; + if (GET_CODE (op0) == UNSPEC + && XINT (op0, 1) == UNSPEC_PCREL) + return true; if (GET_CODE (op0) != SYMBOL_REF) break; /* FALLTHRU */