From 4a7ab00c251229d1c1ebbc21844843e9e23e7618 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 6 Nov 2011 20:43:32 +0100 Subject: [PATCH] tree-cfg.c (gimple_can_merge_blocks_p): For -O0 don't remove any user labels. * tree-cfg.c (gimple_can_merge_blocks_p): For -O0 don't remove any user labels. From-SVN: r181040 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2a033618e47..728edbdd432 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-06 Jakub Jelinek + + * tree-cfg.c (gimple_can_merge_blocks_p): For -O0 don't remove + any user labels. + 2011-11-06 John David Anglin * config/pa/pa.c (pa_hpux_init_libfuncs): Rename to pa_init_libfuncs. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 28aea2f6933..7ec50dbabd4 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1454,8 +1454,8 @@ gimple_can_merge_blocks_p (basic_block a, basic_block b) break; lab = gimple_label_label (stmt); - /* Do not remove user forced labels. */ - if (!DECL_ARTIFICIAL (lab) && FORCED_LABEL (lab)) + /* Do not remove user forced labels or for -O0 any user labels. */ + if (!DECL_ARTIFICIAL (lab) && (!optimize || FORCED_LABEL (lab))) return false; }