diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2011-11-18 10:54:02 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2011-11-18 10:54:02 +0100 |
commit | fff6a306aee2145d44a8c252df82ec4891344a0f (patch) | |
tree | a1543a95253440faf21b7d14a33454e28da0c4c0 /gcc/fold-const.c | |
parent | f11656db095c4245faa0b4e61c6039dbbd35e332 (diff) | |
download | gcc-fff6a306aee2145d44a8c252df82ec4891344a0f.zip gcc-fff6a306aee2145d44a8c252df82ec4891344a0f.tar.gz gcc-fff6a306aee2145d44a8c252df82ec4891344a0f.tar.bz2 |
re PR tree-optimization/51118 (ICE: tree check: expected tree that contains ‘typed’ structure, have ‘block’ in fold_checksum_tree, at fold-const.c:14160)
PR tree-optimization/51118
* fold-const.c (fold_checksum_tree): Check for TS_TYPED structure
before using TREE_TYPE accessor on expr.
From-SVN: r181468
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 167573b..e590377 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -14157,7 +14157,8 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, htab_t ht) } } md5_process_bytes (expr, tree_size (expr), ctx); - fold_checksum_tree (TREE_TYPE (expr), ctx, ht); + if (CODE_CONTAINS_STRUCT (code, TS_TYPED)) + fold_checksum_tree (TREE_TYPE (expr), ctx, ht); if (TREE_CODE_CLASS (code) != tcc_type && TREE_CODE_CLASS (code) != tcc_declaration && code != TREE_LIST |