Blame SOURCES/gcc12-pr105551.patch

53dace
2022-05-11  Richard Biener  <rguenther@suse.de>
53dace
53dace
	PR bootstrap/105551
53dace
	* opts.cc (finish_options): Also disable var-tracking if
53dace
	!DWARF2_DEBUGGING_INFO.
53dace
53dace
--- gcc/opts.cc
53dace
+++ gcc/opts.cc
53dace
@@ -1334,11 +1334,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
53dace
 	      || opts->x_flag_selective_scheduling2));
53dace
 
53dace
   /* We know which debug output will be used so we can set flag_var_tracking
53dace
-     and flag_var_tracking_uninit if the user has not specified them.  Note
53dace
-     we have not yet initialized debug_hooks so we might uselessly run
53dace
-     var-tracking on targets without var_location debug hook support.  */
53dace
+     and flag_var_tracking_uninit if the user has not specified them.  */
53dace
   if (opts->x_debug_info_level < DINFO_LEVEL_NORMAL
53dace
-      || !dwarf_debuginfo_p (opts))
53dace
+      || !dwarf_debuginfo_p (opts)
53dace
+      /* We have not yet initialized debug hooks so match that to check
53dace
+	 whether we're only doing DWARF2_LINENO_DEBUGGING_INFO.  */
53dace
+#ifndef DWARF2_DEBUGGING_INFO
53dace
+      || true
53dace
+#endif
53dace
+     )
53dace
     {
53dace
       if ((opts_set->x_flag_var_tracking && opts->x_flag_var_tracking == 1)
53dace
 	  || (opts_set->x_flag_var_tracking_uninit