This is the mail archive of the
mailing list for the GCC project.
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Sep 2013 20:05:01 +0200
- Subject: Fix gcc.dg/lto/20090218-1.c
- Authentication-results: sourceware.org; auth=none
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.
--- ipa-inline-transform.c (revision 202182)
+++ ipa-inline-transform.c (working copy)
@@ -432,7 +432,7 @@ inline_transform (struct cgraph_node *no
- if (node->callees)
+ if (node->callees && optimize)
todo = optimize_inline_calls (current_function_decl);