Commit e0b382b1 by Richard Stallman

(layout_record): Handle NULL dsize.

From-SVN: r1592
parent 6cb72a7d
...@@ -430,7 +430,12 @@ layout_record (rec) ...@@ -430,7 +430,12 @@ layout_record (rec)
{ {
register tree dsize = DECL_SIZE (field); 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); const_size += TREE_INT_CST_LOW (dsize);
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment