Blame SOURCES/gcc12-pr105551.patch

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