A patch for egcs 1.0.3/1.1

Jeffrey A Law law@cygnus.com
Wed Jun 17 18:34:00 GMT 1998


  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



More information about the Gcc-patches mailing list