This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48869] New: OpenMP task construct fails to instantiate copy constructor(same as Bug 36523)
- From: "bbenin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 4 May 2011 13:04:30 +0000
- Subject: [Bug c++/48869] New: OpenMP task construct fails to instantiate copy constructor(same as Bug 36523)
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: bbenin@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)