This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PR middle-end/30696 (OpenMP and undefined symbols)
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 5 Feb 2007 01:18:35 +0100
- Subject: PR middle-end/30696 (OpenMP and undefined symbols)
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);