re PR debug/20161 (ICE with dwarf for incomplete element type argument)
authorSteven Bosscher <stevenb@suse.de>
Thu, 28 Jul 2005 01:24:19 +0000 (01:24 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Thu, 28 Jul 2005 01:24:19 +0000 (01:24 +0000)
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

gcc/ChangeLog
gcc/passes.c

index 4bc38c2e210163a675fcdbd8bbb31f879f30d7ee..7570c80f46acaafb10e072b10dcf061a724a93a6 100644 (file)
@@ -1,4 +1,11 @@
+2005-07-28  Steven Bosscher  <stevenb@suse.de>
+
+       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 <zadeck@naturalbridge.com>
+
        * params.def: Fixed comment.
        
 2005-07-27  Bjoern Haase  <bjoern.m.haase@web.de>
index ee060f5960e3e0671f9ac5522399cb400391db37..fcbb8df5a365fdf62a283129fb8812a06923eb48 100644 (file)
@@ -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);