From: Alexandre Oliva Date: Tue, 19 Dec 2017 17:50:54 +0000 (+0000) Subject: SFN: don't drop markers for skipping var-tracking X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c9aa2cf8e59317ae73151c53fe84470b30c7ae9;p=gcc.git SFN: don't drop markers for skipping var-tracking Although debug markers are more useful when bind stmts are placed among them, there is value in keeping them even when VTA limits are exceeded. for gcc/ChangeLog PR debug/83422 * var-tracking.c (vt_debug_insns_local): Do not drop markers. (variable_tracking_main_1): Keep markers even when VTA fails. for gcc/testsuite/ChangeLog PR debug/83422 * gcc.dg/pr83422.c: New. From-SVN: r255834 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0552a935af6..328ce281e81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2017-12-19 Alexandre Oliva + PR debug/83422 + * var-tracking.c (vt_debug_insns_local): Do not drop markers. + (variable_tracking_main_1): Keep markers even when VTA fails. + PR bootstrap/83396 * cfgexpand.c (expand_gimple_basic_block): Expand label first, even if there are markers before it. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aabbe566741..81f96c6ce07 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-19 Alexandre Oliva + + PR debug/83422 + * gcc.dg/pr83422.c: New. + 2017-12-19 Jakub Jelinek PR testsuite/83454 diff --git a/gcc/testsuite/gcc.dg/pr83422.c b/gcc/testsuite/gcc.dg/pr83422.c new file mode 100644 index 00000000000..adbf7599d88 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr83422.c @@ -0,0 +1,9 @@ +/* PR debug/83422 */ +/* { dg-do compile } */ +/* { dg-options "-O -g --param=max-vartrack-size=1" } */ + +int +foo(int i, int j, int k) +{ + return i + j + k; +} diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index aa8a605b772..4a96a039d14 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -10338,12 +10338,9 @@ delete_vta_debug_insns (void) handled as well.. */ static void -vt_debug_insns_local (bool skipped) +vt_debug_insns_local (bool skipped ATTRIBUTE_UNUSED) { - /* ??? Just skip it all for now. If we skipped the global pass, - arrange for stmt markers to be dropped as well. */ - if (skipped) - cfun->debug_nonbind_markers = 0; + /* ??? Just skip it all for now. */ delete_vta_debug_insns (); } @@ -10445,8 +10442,6 @@ variable_tracking_main_1 (void) { vt_finalize (); - cfun->debug_nonbind_markers = 0; - delete_vta_debug_insns (); /* This is later restored by our caller. */