PR middle-end/30696 (OpenMP and undefined symbols)
Jan Hubicka
jh@suse.cz
Mon Feb 5 00:18:00 GMT 2007
Hi,
the problem is that early inliner is bit too active on removing offline copy of
function foo that is also accessed by unanalyzed yet openmp function.
bootstrapped/regtested the patch on i686-linux and comitted. I will
commit the testcase shortly too - in the first round of testing I
misplaced it and it didn't pass but I wanted thonight c++ tester to take
the patch.
inline void foo() {}
int main()
{
foo();
#pragma omp parallel for
for ( int i=0; i<1; ++i )
foo();
return 0;
}
PR middle-end/30696
* ipa-inline.c (cgraph_clone_inlined_nodes): When there are unanalyzed
nodes in cgraph, don't remove offline copy of the function.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 121572)
+++ ipa-inline.c (working copy)
@@ -204,6 +205,7 @@ cgraph_clone_inlined_nodes (struct cgrap
In that case just go ahead and re-use it. */
if (!e->callee->callers->next_caller
&& !e->callee->needed
+ && !cgraph_new_nodes
&& flag_unit_at_a_time)
{
gcc_assert (!e->callee->global.inlined_to);
More information about the Gcc-patches
mailing list