This is the mail archive of the 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]

Fix gcc.dg/lto/20090218-1.c

gcc.dg/lto/20090218-1.c contains cross module call into always_inline function.
At -O0 -flto we used to report nothing since optimize_inline_calls was not called.  With
my change we report it as error.

I am not sure what is desired behaviour, but for now I am restoring the previous
situation that is consistent with non-lto build. I suppose it is good thing to do
given that we promise always inlines to be always inline only within given module.

I am testing the patch on x86_64-linux and will commit it if testing passes.


	* ipa-inline-transform.c (inline_transform): Do not optimize inline
	calls when not optimizing.
Index: ipa-inline-transform.c
--- ipa-inline-transform.c	(revision 202182)
+++ ipa-inline-transform.c	(working copy)
@@ -432,7 +432,7 @@ inline_transform (struct cgraph_node *no
   ipa_remove_all_references (&node->symbol.ref_list);
   timevar_push (TV_INTEGRATION);
-  if (node->callees)
+  if (node->callees && optimize)
     todo = optimize_inline_calls (current_function_decl);
   timevar_pop (TV_INTEGRATION);

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