From: Thomas Schwinge Date: Thu, 10 Jul 2014 12:05:27 +0000 (+0200) Subject: Fix --enable-checking=fold failure. X-Git-Tag: releases/gcc-5.1.0~6420 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9abc06c5e9a8b55af730a07f8cd37bb914093c8;p=thirdparty%2Fgcc.git Fix --enable-checking=fold failure. gcc/ * fold-const.c (fold_checksum_tree): Look at DECL_VINDEX only for FUNCTION_DECLs. From-SVN: r212428 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 075aa789171f..d09cba9cd4e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-10 Thomas Schwinge + + * fold-const.c (fold_checksum_tree): Look at DECL_VINDEX only for + FUNCTION_DECLs. + 2014-07-10 Eric Botcazou PR middle-end/53590 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c57ac7bd1a9a..d51bda728012 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); }