cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not looking at DECL_CLONED_FU...
authorMark Mitchell <mark@codesourcery.com>
Wed, 10 Jan 2001 19:55:03 +0000 (19:55 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 10 Jan 2001 19:55:03 +0000 (19:55 +0000)
* cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
looking at DECL_CLONED_FUNCTION for non-functions.

From-SVN: r38876

gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index d431ffee9f49f71f0993136e485f3cfad39d993d..676a21137539e96319158e58ae26caee89f18a68 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-10  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
+       looking at DECL_CLONED_FUNCTION for non-functions.
+
 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
 
        * error.c (dump_template_parameter): Use parm to determine how
index d0784e89ca6d53d22cc34350762059c8f4943c83..5c806ce9aa9a355de436796dc72067df785ac020 100644 (file)
@@ -1959,7 +1959,9 @@ struct lang_decl
 /* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or
    destructor.  */
 #define DECL_CLONED_FUNCTION_P(NODE)           \
-  (DECL_LANG_SPECIFIC (NODE)                   \
+  ((TREE_CODE (NODE) == FUNCTION_DECL          \
+    || TREE_CODE (NODE) == TEMPLATE_DECL)      \
+   && DECL_LANG_SPECIFIC (NODE)                        \
    && DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
 
 /* If DECL_CLONED_FUNCTION_P holds, this is the function that was