This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix Pascal build failure on s390 and powerpc
- From: Matthias Klose <doko at cs dot tu-berlin dot de>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Mark Mitchell <mark at codesourcery dot com>, Frank Heckenbach <frank at g-n-u dot de>
- Date: Sun, 28 Mar 2004 13:46:34 +0200
- Subject: Re: [PATCH] Fix Pascal build failure on s390 and powerpc
- References: <200403250215.DAA14552@faui1d.informatik.uni-erlangen.de>
Ulrich Weigand writes:
> 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.
fixes the same error for powerpc-linux as well.
> Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
> OK (for 3.3/3.4./3.5)?
I assume for 3.4.1, ok for 3.3.4?
> 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