(layout_record): Handle NULL dsize.

From-SVN: r1592
This commit is contained in:
Richard Stallman 1992-07-15 18:39:27 +00:00
parent 6cb72a7d5c
commit e0b382b17a
1 changed files with 6 additions and 1 deletions

View File

@ -430,7 +430,12 @@ layout_record (rec)
{
register tree dsize = DECL_SIZE (field);
if (TREE_CODE (dsize) == INTEGER_CST)
/* This can happen when we have an invalid nested struct definition,
such as struct j { struct j { int i; } }. The error message is
printed in finish_struct. */
if (dsize == 0)
/* Do nothing. */;
else if (TREE_CODE (dsize) == INTEGER_CST)
const_size += TREE_INT_CST_LOW (dsize);
else
{