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

           Summary: OpenMP task construct fails to instantiate copy
                    constructor(same as Bug 36523)
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bbe...@gmail.com


The same bug like in gcc 4.4.0 Bug 36523.
The following test case fails with a linker error. It compiles okay with the
pragma omp task line removed.

$ cat task.cpp 
template<typename T>
struct A
{
  A() { }
  A(const A&) { }
  void foo() { }
};

int main()
{
  A<int> a;
  #pragma omp task
    a.foo();
  return 0;
}

$ g++ -fopenmp -Wall task.cpp 
/tmp/cc5epalM.o: In function `main.omp_cpyfn.1':
task.cpp:(.text+0x73): undefined reference to `A<int>::A(A<int> const&)'
collect2: ld returned 1 exit status

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
.......
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Reply via email to