Blame SOURCES/gcc12-pr105551.patch

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