(layout_record): Avoid overflow in const_size by adding into var_size instead.
From-SVN: r3007
This commit is contained in:
parent
cdc5a032d9
commit
370f6918c2
|
@ -451,7 +451,10 @@ layout_record (rec)
|
|||
printed in finish_struct. */
|
||||
if (dsize == 0)
|
||||
/* Do nothing. */;
|
||||
else if (TREE_CODE (dsize) == INTEGER_CST)
|
||||
else if (TREE_CODE (dsize) == INTEGER_CST
|
||||
&& TREE_INT_CST_HIGH (dsize) == 0
|
||||
&& 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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue