diff options
author | Nick Clifton <nickc@cygnus.com> | 1998-10-05 10:12:39 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 1998-10-05 10:12:39 +0000 |
commit | b75ab88ba3b591f07692be10df267f0bddecc055 (patch) | |
tree | 2710f4ced6b9d73f33ca9be3a34387d415662bff /gcc/dwarf2out.c | |
parent | 6a99221410423745185084b26eeb5fd79860a4aa (diff) | |
download | gcc-b75ab88ba3b591f07692be10df267f0bddecc055.zip gcc-b75ab88ba3b591f07692be10df267f0bddecc055.tar.gz gcc-b75ab88ba3b591f07692be10df267f0bddecc055.tar.bz2 |
If errorcount nonzero, don't call abort if the function is already defined.
From-SVN: r22836
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 21367bb..3314b9f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8179,7 +8179,17 @@ gen_subprogram_die (decl, context_die) = lookup_filename (DECL_SOURCE_FILE (decl)); if (get_AT_flag (old_die, DW_AT_declaration) != 1) - abort (); + { + /* ??? This can happen if there is a bug in the program, for + instance, if it has duplicate function definitions. Ideally, + we should detect this case and ignore it. For now, if we have + already reported an error, any error at all, then assume that + we got here because of a input error, not a dwarf2 bug. */ + extern int errorcount; + if (errorcount) + return; + abort (); + } /* If the definition comes from the same place as the declaration, maybe use the old DIE. We always want the DIE for this function |