https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98922

--- Comment #3 from Visda <Visda.vokhshoori at microchip dot com> ---
I looked at GCC 11 release notes, and found the fix
https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546494.html
Please correct me if I am wrong.

Given where we are in our release cycle, we decided to postpone pulling in this
patch.  For now, I fixed this in our local branch.  

We will get the new behaviour when we move up to GCC 11+.

Thanks.

FYI:
My local fix is:
diff --git a/gcc/toplev.c b/gcc/toplev.c
index bdf021e828a..e476c109cb4 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1050,7 +1050,10 @@ open_auxiliary_file (const char *ext)
   char *filename;
   FILE *file;

-  filename = concat (aux_base_name, ".", ext, NULL);
+#ifdef _BUILD_AVR3
+  if (strcmp (ext, "su") == 0 && flag_stack_usage)
+    filename = concat (lbasename(aux_base_name), ".", ext, NULL);
+  else
+#endif
+    filename = concat (aux_base_name, ".", ext, NULL);
   file = fopen (filename, "w");
   if (!file)
     fatal_error (input_location, "can%'t open %s for writing: %m", filename);
@@ -1898,7 +1901,7 @@ lang_dependent_init (const char *name)
       init_asm_output (name);

       /* If stack usage information is desired, open the output file.  */
-      if (flag_stack_usage)
+      if (flag_stack_usage 
+#ifdef _BUILD_AVR3
           && !flag_generate_lto
+#endif)
        stack_usage_file = open_auxiliary_file ("su");
     }

Reply via email to