Blame SOURCES/gcc12-pr105551.patch

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