This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: A patch for egcs 1.0.3/1.1
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: A patch for egcs 1.0.3/1.1
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 17 Jun 1998 18:53:04 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <m0ym3SO-00026AC@ocean.lucon.org>you write:
> Here is a patch for egcs 1.0.3/1.1.
>
> # gcc -O byte.c
> # a.out
> zsh: 10914 abort ./a.out
>
>
> --
> H.J. Lu (hjl@gnu.org)
> ----
> void foo (unsigned int * p)
> {
> if ((signed char)(*p & 0xFF) == 17 || (signed char)(*p & 0xFF) == 18)
> return;
> else
> abort ();
> }
>
> int main ()
> {
> int i = 0x30011;
> foo(&i);
> return 0;
> }
After a couple minor tweaks, I have installed this testcase.
> Tue Jun 16 07:32:50 1998 H.J. Lu (hjl@gnu.org)
>
> * fold-const.c (make_range): Don't convert a narrower type to
> wider type.
I also tweaked this a little. I think it's better to use
TYPE_PRECISION (...) instead of GET_MODE_SIZE (TYPE_MODE (...) in
this particular part of the compiler.
jeff