tree-mudflap.c (mx_register_decls): Tolerate decl trees resulting from source code...
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 17 May 2004 20:35:52 +0000 (20:35 +0000)
committerFrank Ch. Eigler <fche@gcc.gnu.org>
Mon, 17 May 2004 20:35:52 +0000 (20:35 +0000)
2004-05-17  Frank Ch. Eigler  <fche@redhat.com>

* tree-mudflap.c (mx_register_decls): Tolerate decl trees resulting
from source code with errors.

From-SVN: r81945

gcc/ChangeLog
gcc/tree-mudflap.c

index cdbfa2fdd75c6888b693f9042731a8740eb1f5e2..db93d50c46dd7f890ba6bc3a6ceb293c2fd33c51 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-17  Frank Ch. Eigler  <fche@redhat.com>
+
+       * tree-mudflap.c (mx_register_decls): Tolerate decl trees resulting
+       from source code with errors.
+
 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
 
        Enable tree browser for all front ends.
index 1d4acc8b020f9c99b0082c55936110bd3b2b2a89..ea5548fb0e694c7ebc25771ebe065df0650faaf6 100644 (file)
@@ -743,6 +743,7 @@ mx_register_decls (tree decl, tree *stmt_list)
       if ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL) &&
           (! TREE_STATIC (decl)) && /* auto variable */
           (! DECL_EXTERNAL (decl)) && /* not extern variable */
+          (TREE_TYPE (decl) != error_mark_node) && /* not decl with error */
           (COMPLETE_OR_VOID_TYPE_P (TREE_TYPE (decl))) && /* complete type */
           (! mf_marked_p (decl)) && /* not already processed */
           (TREE_ADDRESSABLE (decl))) /* has address taken */