aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2005-07-28 01:24:19 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-07-28 01:24:19 +0000
commitef11c839021813328b21d164772fb7f956d40d04 (patch)
treef85d036174db9ab0845ac271072fae6143bef335 /gcc/passes.c
parent1eb68dca8cecf8ed4873552a041214e0cd5c742a (diff)
downloadgcc-ef11c839021813328b21d164772fb7f956d40d04.zip
gcc-ef11c839021813328b21d164772fb7f956d40d04.tar.gz
gcc-ef11c839021813328b21d164772fb7f956d40d04.tar.bz2
re PR debug/20161 (ICE with dwarf for incomplete element type argument)
PR debug/20161 * passes.c (rest_of_decl_compilation): If decl is a type and we have encountered errors, don't emit debug information. From-SVN: r102452
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index ee060f5..fcbb8df 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -175,7 +175,10 @@ rest_of_decl_compilation (tree decl,
timevar_pop (TV_VARCONST);
}
- else if (TREE_CODE (decl) == TYPE_DECL)
+ else if (TREE_CODE (decl) == TYPE_DECL
+ /* Like in rest_of_type_compilation, avoid confusing the debug
+ information machinery when there are errors. */
+ && !(sorrycount || errorcount))
{
timevar_push (TV_SYMOUT);
debug_hooks->type_decl (decl, !top_level);