From eb0063ad8410f6792cd4cccbf6ef2b65f878851c Mon Sep 17 00:00:00 2001 From: hp Date: Sat, 13 Oct 2001 01:54:37 +0000 Subject: [PATCH] * config/cris/cris.c (cris_legitimate_pic_operand): Kludge around missing CONSTANT_P test in core GCC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46239 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/cris/cris.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6de0e377be..9a27a7a0281 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-10-13 Hans-Peter Nilsson + + * config/cris/cris.c (cris_legitimate_pic_operand): Kludge around + missing CONSTANT_P test in core GCC. + 2001-10-12 Neil Booth * cppmain.c (struct printer): New member source. diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 668811ee010..4a9e08d0a9f 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2239,6 +2239,12 @@ int cris_legitimate_pic_operand (x) rtx x; { + /* This test is due to a bug in the core of GCC. See + for the + real fix; we shouldn't need to test CONSTANT_P here. */ + if (! CONSTANT_P (x)) + return 0; + /* The PIC representation of a symbol with a GOT entry will be (for example; relocations differ): sym => [rPIC+sym:GOT] -- 2.11.0