[PATCH] Fix Pascal build failure on s390

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Thu Mar 25 02:15:00 GMT 2004


Hello,

building the Pascal front end for gcc 3.3 on s390 fails due to
an unrecognized insn.  This turns out to be the fault of
store_constructor which generates a CONST_INT that doesn't
fit in the appropriate mode, because it isn't properly sign-
extended.

This patch fixes the problem by using gen_int_mode.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
OK (for 3.3/3.4./3.5)?

Bye,
Ulrich

ChangeLog:

	* expr.c (store_constructor): Use gen_int_mode to correctly
	sign-extend CONST_INT value.


*** src/gcc/expr.c.orig	Tue Mar 23 18:17:35 2004
--- src/gcc/expr.c	Tue Mar 23 18:15:46 2004
*************** store_constructor (exp, target, cleared,
*** 5359,5365 ****
  		{
  		  if (word != 0 || ! cleared)
  		    {
! 		      rtx datum = GEN_INT (word);
  		      rtx to_rtx;
  
  		      /* The assumption here is that it is safe to use
--- 5359,5365 ----
  		{
  		  if (word != 0 || ! cleared)
  		    {
! 		      rtx datum = gen_int_mode (word, mode);
  		      rtx to_rtx;
  
  		      /* The assumption here is that it is safe to use
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc-patches mailing list