diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-11-29 18:11:35 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-11-29 18:11:35 +0000 |
commit | d0f89bfce0ad403ff763b9beb51f5fbb76701639 (patch) | |
tree | eda08ea25cd7c8200a55835fd185e2d8e8c50de0 /gcc/dwarfout.c | |
parent | 37feda7d7656a82a99f0492b4a52b14fe3db10ec (diff) | |
download | gcc-d0f89bfce0ad403ff763b9beb51f5fbb76701639.zip gcc-d0f89bfce0ad403ff763b9beb51f5fbb76701639.tar.gz gcc-d0f89bfce0ad403ff763b9beb51f5fbb76701639.tar.bz2 |
Fix for gcc.c-torture/noncompile/920824-1.c on SH (and mips?)
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.
From-SVN: r30708
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index d8ddfb0..1df09c6 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. */ |