aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-01-10 19:55:03 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-01-10 19:55:03 +0000
commit31d95fc6e6a7b9a020e6cc4ab2aa737a515e41b1 (patch)
tree5f7a3a49b6932ed79098a36d137a29e4958ed185 /gcc
parent23d4e4cc4acd1dbf796a8e9c9073e7392e5c36b8 (diff)
downloadgcc-31d95fc6e6a7b9a020e6cc4ab2aa737a515e41b1.zip
gcc-31d95fc6e6a7b9a020e6cc4ab2aa737a515e41b1.tar.gz
gcc-31d95fc6e6a7b9a020e6cc4ab2aa737a515e41b1.tar.bz2
cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not looking at DECL_CLONED_FUNCTION for non-functions.
* cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not looking at DECL_CLONED_FUNCTION for non-functions. From-SVN: r38876
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d431ffe..676a211 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index d0784e8..5c806ce 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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