From 76512af61ce4ac9a4e47b25acb08516d49c36c8c Mon Sep 17 00:00:00 2001 From: steven Date: Thu, 28 Jul 2005 01:24:19 +0000 Subject: [PATCH] PR debug/20161 * passes.c (rest_of_decl_compilation): If decl is a type and we have encountered errors, don't emit debug information. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102452 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/passes.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bc38c2e210..7570c80f46a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ +2005-07-28 Steven Bosscher + + PR debug/20161 + * passes.c (rest_of_decl_compilation): If decl is a type and + we have encountered errors, don't emit debug information. + 2005-07-27 Kenneth Zadeck + * params.def: Fixed comment. 2005-07-27 Bjoern Haase diff --git a/gcc/passes.c b/gcc/passes.c index ee060f5960e..fcbb8df5a36 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); -- 2.11.4.GIT