summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-29 18:11:35 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-29 18:11:35 +0000
commit1373dc94fbacca7767e4794f7d1bf7ca36178f6b (patch)
treeeda08ea25cd7c8200a55835fd185e2d8e8c50de0
parent952bd79bfd0bb57dc42d7f7805cacbf445c61382 (diff)
downloadppe42-gcc-1373dc94fbacca7767e4794f7d1bf7ca36178f6b.tar.gz
ppe42-gcc-1373dc94fbacca7767e4794f7d1bf7ca36178f6b.zip
Fix for gcc.c-torture/noncompile/920824-1.c on SH (and mips?)
* dwarfout.c (field_byte_offset): Size can be zero if there was an error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30708 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarfout.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 07811cbb6c9..afd4fc99bee 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov 29 18:09:39 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * dwarfout.c (field_byte_offset): Size can be zero if there was
+ an error.
+
1999-11-29 Bernd Schmidt <bernds@cygnus.co.uk>
* fold-const.c (split_tree): Delete unused vars ORIG_IN and TYPE.
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index d8ddfb09939..1df09c60ee1 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -2024,6 +2024,15 @@ 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 or sizes 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. */
OpenPOWER on IntegriCloud