[Bug c++/81314] [6/7/8 Regression] Undefined reference to a function with -fopenmp
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 14 12:40:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81314
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Testcase without STL:
// { dg-do link }
template <int N>
struct S {
S () { s = 0; }
S (const S &x) { s = x.s; }
~S () {}
int s;
};
void
foo (S<2> &x)
{
#pragma omp taskloop
for (int i = 0; i < 100; ++i)
x.s++;
}
int
main ()
{
S<2> s;
#pragma omp parallel
#pragma omp master
foo (s);
}
More information about the Gcc-bugs
mailing list