https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117803
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> --- > The base3 case looks valid, but I don't see it rejected. And it is accepted, sorry. Pilot error. * * * > That testcase looks invalid to me. > Try calling repl1() directly, it will fail the same way, one can only > call it with explicit template parameters, so repl1<int>(); > or repl1<T>(); etc. I think part of my problem is that the OpenMP specification does not clearly spell out how templates are handled. I think my confusion stemmed from the question how the replacement happens, i.e. does one replace #pragma omp dispatch x = base1<int>(); by x = repl1(); // this will fail or x = repl1<int>(); // this will work However, the second variant assumes that the variant function uses the same template arguments (order and/or name). → Thus, I concur that this is invalid. * * * For 'T' as return value, it is in principle supportable (as Clang demonstrates), but one can also argue that the compiler shouldn't. => Close as INVALID.