This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Do not generate stack usage files with -flto


They are empty.  Tested on x86-64/Linux, applied on the mainline as obvious.


2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>

	* toplev.c (output_stack_usage): Turn test on flag_stack_usage into
	test on stack_usage_file.
	(lang_dependent_init): Do not open the su file if generating LTO.

-- 
Eric Botcazou
Index: toplev.c
===================================================================
--- toplev.c	(revision 266029)
+++ toplev.c	(working copy)
@@ -989,7 +989,7 @@ output_stack_usage (void)
       stack_usage += current_function_dynamic_stack_size;
     }
 
-  if (flag_stack_usage)
+  if (stack_usage_file)
     {
       expanded_location loc
 	= expand_location (DECL_SOURCE_LOCATION (current_function_decl));
@@ -1934,7 +1934,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 && !flag_generate_lto)
 	stack_usage_file = open_auxiliary_file ("su");
     }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]