------- Additional Comments From steven at gcc dot gnu dot org 2005-04-10 17:52 ------- My RTL-fu is way below par, so perhaps this doesn't make sense at all, but... It seems that emit_move_insn must always produce valid move insns. So it should check that an immediate is a valid PIC operand if -fPIC. In this case I'd say LEGITIMATE_CONSTANT_P is the wrong target macro to use. So you would have this instead: Index: expr.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/expr.c,v retrieving revision 1.783 diff -u -3 -p -r1.783 expr.c --- expr.c 30 Mar 2005 21:34:23 -0000 1.783 +++ expr.c 10 Apr 2005 17:51:01 -0000 @@ -3093,7 +3093,8 @@ emit_move_insn (rtx x, rtx y) y_cst = y; - if (!LEGITIMATE_CONSTANT_P (y)) + if ((!flag_pic && !LEGITIMATE_CONSTANT_P (y)) + || (flag_pic && !LEGITIMATE_PIC_OPERAND_P (y))) { y = force_const_mem (mode, y);
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20928