aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2014-07-10 14:05:27 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2014-07-10 14:05:27 +0200
commitf9abc06c5e9a8b55af730a07f8cd37bb914093c8 (patch)
treef80b2891f317fac6d516f3f95a228834386ba4d5 /gcc
parentd764963b54885cdf3604e54717b1a137492d7415 (diff)
downloadgcc-f9abc06c5e9a8b55af730a07f8cd37bb914093c8.zip
gcc-f9abc06c5e9a8b55af730a07f8cd37bb914093c8.tar.gz
gcc-f9abc06c5e9a8b55af730a07f8cd37bb914093c8.tar.bz2
Fix --enable-checking=fold failure.
gcc/ * fold-const.c (fold_checksum_tree): Look at DECL_VINDEX only for FUNCTION_DECLs. From-SVN: r212428
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 075aa78..d09cba9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * fold-const.c (fold_checksum_tree): Look at DECL_VINDEX only for
+ FUNCTION_DECLs.
+
2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/53590
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c57ac7b..d51bda7 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -14858,7 +14858,8 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
{
- fold_checksum_tree (DECL_VINDEX (expr), ctx, ht);
+ if (TREE_CODE (expr) == FUNCTION_DECL)
+ fold_checksum_tree (DECL_VINDEX (expr), ctx, ht);
fold_checksum_tree (DECL_RESULT_FLD (expr), ctx, ht);
fold_checksum_tree (DECL_ARGUMENT_FLD (expr), ctx, ht);
}