re PR c++/26789 (ICE on incomplete struct with -fmudflap)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Thu, 20 Apr 2006 16:19:21 +0000 (16:19 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Thu, 20 Apr 2006 16:19:21 +0000 (16:19 +0000)
PR mudflap/26789
* tree-mudflap.c (mudflap_finish_file): Skip function when there
were errors.  Remove check for erroneous objects.

From-SVN: r113121

gcc/ChangeLog
gcc/tree-mudflap.c

index 8241b9882e17de5f76311f6c12d3b1b52b2bcce4..164b3e34be9f5726e34e991a761a91109999b23a 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR mudflap/26789
+       * tree-mudflap.c (mudflap_finish_file): Skip function when there
+       were errors.  Remove check for erroneous objects.
+
 2006-04-20  Jeff Law  <law@redhat.com>
 
        PR tree-optimization/26854
index 1a62859e6f10b4a5c1e78f4de7df9b760179395d..ed5ef4867da4af9975398bc1dce1e130f3798b5b 100644 (file)
@@ -1232,6 +1232,10 @@ mudflap_finish_file (void)
 {
   tree ctor_statements = NULL_TREE;
 
+  /* No need to continue when there were errors.  */
+  if (errorcount != 0 || sorrycount != 0)
+    return;
+
   /* Insert a call to __mf_init.  */
   {
     tree call2_stmt = build_function_call_expr (mf_init_fndecl, NULL_TREE);
@@ -1256,9 +1260,6 @@ mudflap_finish_file (void)
         {
           gcc_assert (DECL_P (obj));
 
-          if (TREE_TYPE (obj) == error_mark_node)
-           continue;
-
           if (mf_marked_p (obj))
             continue;