From: Doug Evans Date: Mon, 5 Aug 1996 20:53:26 +0000 (+0000) Subject: (layout_record): Correct overflow test for 0 sized fields. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5049cf050b2b2f581c10201683176524fae15c3;p=gcc.git (layout_record): Correct overflow test for 0 sized fields. From-SVN: r12593 --- diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 8a23489b3e0..5aca4838419 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -511,7 +511,7 @@ layout_record (rec) /* Do nothing. */; else if (TREE_CODE (dsize) == INTEGER_CST && TREE_INT_CST_HIGH (dsize) == 0 - && TREE_INT_CST_LOW (dsize) + const_size > const_size) + && TREE_INT_CST_LOW (dsize) + const_size >= const_size) /* Use const_size if there's no overflow. */ const_size += TREE_INT_CST_LOW (dsize); else