The following program causes a linker failure on mainline when compiled with "gcc -fopenmp -O -std=c99": ==================================== inline void foo() {} int main() { foo(); #pragma omp parallel for for ( int i=0; i<1; ++i ) foo(); return 0; } ==================================== /tmp/ccoKlB2q.o(.text+0x47): In function `main.omp_fn.0': : undefined reference to `foo' collect2: ld returned 1 exit status The 4.2 branch is not affected.
Even shorter testcase: ==================================== inline void foo() {} int main() { #pragma omp parallel foo(); foo(); return 0; } ====================================
Confirmed.
Subject: Bug 30696 Author: hubicka Date: Sun Feb 4 23:40:58 2007 New Revision: 121582 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121582 Log: 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. Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-inline.c
Fixed on the trunk, thanks.