[PATCH] Huge struct/union bug correction

Jeffrey A Law law@cygnus.com
Thu Oct 14 03:24:00 GMT 1999

  In message <199906100827.KAA20154@sunchorus.france.sun.com>you write:
  > The patch (for 19990602 snapshot) below solves the two problems.
  > The first one was due to a wrong handling of the overflow of the field
  > bit-size value. The second one was due to the use of size_int instead of
  > bitsize_int to define the DECL_SIZE or DECL_FIELD_BITPOS
  > The patch also includes a new test that can be integrated in
  > gcc.c-torture/execute
  > I've checked the patch on i386-linux. The testsuite produced no new error.
  > Stephane
  >  P.s: First ChangeLog is for gcc/ChangeLog, second one is for 
  >       testsuite/gcc.c-torture/ChangeLog...
  > Wed Jun  9 23:26:04 1999  Stephane Carrez  <stcarrez@worldnet.fr>
  > 	* stor-layout.c (layout_union): Use HOST_WIDE_INT for const_size;
  > 	check for member bit-size overflow and use var_size if it occurs.
  > 	(layout_record): Use bitsize_int() to define the type size in bits.
  > 	Likewise for computation and assignment to DECL_FIELD_BITPOS.
  > 	(layout_decl): Likewise when assigning to DECL_SIZE.
  > Wed Jun  9 23:17:24 1999  Stephane Carrez  <stcarrez@worldnet.fr>
  > 	* execute/990609-1.c: New test.
Thanks.  Installed.  Sorry about the delay.


More information about the Gcc-patches mailing list