+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.
+
2019-06-07 Martin Liska <mliska@suse.cz>
* cselib.c (cselib_init): Disable hash table
+2019-06-07 Richard Biener <rguenther@suse.de>
+
+ PR debug/90574
+ * gcc.misc-tests/gcov-pr90574-1.c: New testcase.
+ * gcc.misc-tests/gcov-pr90574-2.c: Likewise.
+
2019-06-07 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/lto/alias-access-path-2.0.c: New testcase.
--- /dev/null
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+int main(int argc, char **argv)
+{
+ if (argc == 0)
+ {
+ int *ptr;
+label: /* count(#####) */
+ {
+ }
+ }
+ if (argc == 1)
+ {
+ __builtin_printf("hello\n");
+ }
+ return 0;
+}
+
+/* { dg-final { run-gcov gcov-pr90574-1.c } } */
--- /dev/null
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+int main(int argc, char **argv)
+{
+ switch (argc)
+ {
+ case 0:
+ foo: /* count(#####) */
+ case 1:;
+ }
+ return 0;
+}
+
+/* { dg-final { run-gcov gcov-pr90574-2.c } } */
|| 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++;