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/gimplify.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/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 14e7007..0919d9f 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8147,15 +8147,12 @@ gimplify_one_sizepos (tree *expr_p, gimple_seq *stmt_p) a VAR_DECL. If it's a VAR_DECL from another function, the gimplifier will want to replace it with a new variable, but that will cause problems if this type is from outside the function. It's OK to have that here. */ - if (expr == NULL_TREE || TREE_CONSTANT (expr) - || TREE_CODE (expr) == VAR_DECL - || CONTAINS_PLACEHOLDER_P (expr)) + if (is_gimple_sizepos (expr)) return; *expr_p = unshare_expr (expr); gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue); - expr = *expr_p; } /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND node |