aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-12-21 15:51:19 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-12-21 15:51:19 +0100
commitbccc50d44c8b79ecb6b0237912e96369e5625d17 (patch)
tree2b7fe3b05edf700cf89f2391169f78c73ef31628 /gcc/tree-inline.c
parent2091795abd48effcbfe9407b7954021473175b0a (diff)
downloadgcc-bccc50d44c8b79ecb6b0237912e96369e5625d17.zip
gcc-bccc50d44c8b79ecb6b0237912e96369e5625d17.tar.gz
gcc-bccc50d44c8b79ecb6b0237912e96369e5625d17.tar.bz2
re PR middle-end/51644 (va_list vs. warning: ‘noreturn’ function does return is not fixable)
PR middle-end/51644 PR middle-end/51647 * tree-eh.c (decide_copy_try_finally): At -O0, return true even when ndests is not 1, if there are only gimple_clobber_p (or debug) stmts in the finally sequence. * tree-inline.c (estimate_num_insns): Return 0 for gimple_clobber_p stmts. * gcc.dg/pr51644.c: New test. * g++.dg/warn/Wreturn-4.C: New test. From-SVN: r182589
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 13ad815..9d111d2 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -3482,6 +3482,9 @@ estimate_num_insns (gimple stmt, eni_weights *weights)
likely be a real store, so the cost of the GIMPLE_ASSIGN is the cost
of moving something into "a", which we compute using the function
estimate_move_cost. */
+ if (gimple_clobber_p (stmt))
+ return 0; /* ={v} {CLOBBER} stmt expands to nothing. */
+
lhs = gimple_assign_lhs (stmt);
rhs = gimple_assign_rhs1 (stmt);