diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-10-24 11:08:56 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-10-24 11:08:56 +0200 |
commit | 848be0946c097a25e63acea3e16eee11fc41e6c9 (patch) | |
tree | 5d960bdbe98ce91b7d6e48d032f6ef7eee82c859 /gcc/tree.c | |
parent | 9106d8d2153532281e2527d997e2a570ac06669b (diff) | |
download | gcc-848be0946c097a25e63acea3e16eee11fc41e6c9.zip gcc-848be0946c097a25e63acea3e16eee11fc41e6c9.tar.gz gcc-848be0946c097a25e63acea3e16eee11fc41e6c9.tar.bz2 |
re PR debug/54828 (ICE in based_loc_descr at dwarf2out.c:10560 with -g -O0)
PR debug/54828
* gimple.h (is_gimple_sizepos): New inline function.
* gimplify.c (gimplify_one_sizepos): Use it. Remove useless
final assignment to expr variable.
* tree.c (RETURN_TRUE_IF_VAR): Return true also if
!TYPE_SIZES_GIMPLIFIED (type) and _t is going to be gimplified
into a local temporary.
* g++.dg/debug/pr54828.C: New test.
From-SVN: r192759
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -8467,14 +8467,19 @@ variably_modified_type_p (tree type, tree fn) tree t; /* Test if T is either variable (if FN is zero) or an expression containing - a variable in FN. */ + a variable in FN. If TYPE isn't gimplified, return true also if + gimplify_one_sizepos would gimplify the expression into a local + variable. */ #define RETURN_TRUE_IF_VAR(T) \ do { tree _t = (T); \ if (_t != NULL_TREE \ && _t != error_mark_node \ && TREE_CODE (_t) != INTEGER_CST \ && TREE_CODE (_t) != PLACEHOLDER_EXPR \ - && (!fn || walk_tree (&_t, find_var_from_fn, fn, NULL))) \ + && (!fn \ + || (!TYPE_SIZES_GIMPLIFIED (type) \ + && !is_gimple_sizepos (_t)) \ + || walk_tree (&_t, find_var_from_fn, fn, NULL))) \ return true; } while (0) if (type == error_mark_node) |