aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@cygnus.com>1999-12-06 19:16:52 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1999-12-06 14:16:52 -0500
commit50352c9c62fd4b48e237d809ecf1a1e25de3fe30 (patch)
tree8b2d9e12d548c13baa467517eb09b704cc92086a /gcc
parentdcee55a29da429af962100d8f384770a945a98be (diff)
downloadgcc-50352c9c62fd4b48e237d809ecf1a1e25de3fe30.zip
gcc-50352c9c62fd4b48e237d809ecf1a1e25de3fe30.tar.gz
gcc-50352c9c62fd4b48e237d809ecf1a1e25de3fe30.tar.bz2
dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be zero if there was an error.
* dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be zero if there was an error. From-SVN: r30804
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4880f03..67a0376 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+1999-12-06 Brendan Kehoe <brendan@cygnus.com>
+
+ * dwarf2out.c (field_byte_offset): As with dwarfout.c, size can be
+ zero if there was an error.
+
1999-12-06 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.md (return_losum_di): Fix typo in asm
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0a88469..4f8227c 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. */