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.


-- 
           Summary: [4.3 regression] Linker failure with OpenMP and inline
                    function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: link-failure, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30696

Reply via email to