diff options
author | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-06 19:16:52 +0000 |
---|---|---|
committer | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-06 19:16:52 +0000 |
commit | 7b99b94015606db491e5fbc005cce6bdef279b4c (patch) | |
tree | 8b2d9e12d548c13baa467517eb09b704cc92086a /gcc/dwarf2out.c | |
parent | 23b0ef5ef26e8e330d19c66e3299a0b531a96528 (diff) | |
download | gcc-7b99b94015606db491e5fbc005cce6bdef279b4c.tar.gz |
* dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be
zero if there was an error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0a8846999fa..4f8227c76a9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -6695,6 +6695,14 @@ field_byte_offset (decl) bitpos_tree = DECL_FIELD_BITPOS (decl); field_size_tree = DECL_SIZE (decl); + /* If there was an error, the size could be zero. */ + if (! field_size_tree) + { + if (errorcount) + return 0; + abort (); + } + /* We cannot yet cope with fields whose positions are variable, so for now, when we see such things, we simply return 0. Someday, we may be able to handle such cases, but it will be damn difficult. */ |