aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-06-07 12:14:55 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-06-07 12:14:55 +0000
commite733243a3693142bd9c9486451c38d2dc20270ac (patch)
tree641a164df2c05ca90667f647528cb4ba412eee57 /gcc/tree-cfg.c
parent510c9192493b6af5c4c70b14390fe340bca8ecaa (diff)
downloadgcc-e733243a3693142bd9c9486451c38d2dc20270ac.zip
gcc-e733243a3693142bd9c9486451c38d2dc20270ac.tar.gz
gcc-e733243a3693142bd9c9486451c38d2dc20270ac.tar.bz2
re PR debug/90574 ([gdb] gdb wrongly stopped at a breakpoint in an unexecuted line of code)
2019-06-07 Richard Biener <rguenther@suse.de> PR debug/90574 * tree-cfg.c (stmt_starts_bb_p): Split blocks at labels that appear after user labels. * gcc.misc-tests/gcov-pr90574-1.c: New testcase. * gcc.misc-tests/gcov-pr90574-2.c: Likewise. From-SVN: r272040
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 94b2584..a585efe 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2722,10 +2722,10 @@ stmt_starts_bb_p (gimple *stmt, gimple *prev_stmt)
|| FORCED_LABEL (gimple_label_label (label_stmt)))
return true;
- if (prev_stmt && gimple_code (prev_stmt) == GIMPLE_LABEL)
+ if (glabel *plabel = safe_dyn_cast <glabel *> (prev_stmt))
{
- if (DECL_NONLOCAL (gimple_label_label (
- as_a <glabel *> (prev_stmt))))
+ if (DECL_NONLOCAL (gimple_label_label (plabel))
+ || !DECL_ARTIFICIAL (gimple_label_label (plabel)))
return true;
cfg_stats.num_merged_labels++;