https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105537
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
That -1 setting was originally added by as
@@ -1977,6 +1989,15 @@ process_options (void)
if (flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
+ if (flag_var_tracking_assignments == AUTODETECT_VALUE)
+ flag_var_tracking_assignments = 0;
+
+ if (flag_var_tracking_assignments_toggle)
+ flag_var_tracking_assignments = !flag_var_tracking_assignments;
+
+ if (flag_var_tracking_assignments && !flag_var_tracking)
+ flag_var_tracking = flag_var_tracking_assignments = -1;
+
if (flag_tree_cselim == AUTODETECT_VALUE)
#ifdef HAVE_conditional_move
flag_tree_cselim = 1;
the flags documentation at that point said (it's no longer there)
+/* Positive if we should track variables, negative if we should run
+ the var-tracking pass only to discard debug annotations, zero if
+ we're not to run it. When flag_var_tracking == AUTODETECT_VALUE it
+ will be set according to optimize, debug_info_level and debug_hooks
+ in process_options (). */
int flag_var_tracking = AUTODETECT_VALUE;
+/* Positive if we should track variables at assignments, negative if
+ we should run the var-tracking pass only to discard debug
+ annotations. When flag_var_tracking_assignments ==
+ AUTODETECT_VALUE it will be set according to flag_var_tracking. */
+int flag_var_tracking_assignments = AUTODETECT_VALUE;
+
+/* Nonzero if we should toggle flag_var_tracking_assignments after
+ processing options and computing its default. */
+int flag_var_tracking_assignments_toggle = 0;
I'm unsure how the -1 setting was supposed to materialize with the
debuginfo level check, but I _think_ that eventually the desire was
to have -fvar-tracking-assignments work in "dummy" mode even with -g0
(but not really tied to flag_var_tracking?).
I will try to make it work that way again by removing the = 0 setting
from toplev.cc but keeping the diagnostic only.