This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for egcs 1.0.3/1.1



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]