[Bug c++/60198] ICE with _Cilk_spawn in expression within template function

hvdieren at elis dot ugent.be gcc-bugzilla@gcc.gnu.org
Fri May 1 08:37:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198

Hans Vandierendonck <hvdieren at elis dot ugent.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hvdieren at elis dot ugent.be

--- Comment #7 from Hans Vandierendonck <hvdieren at elis dot ugent.be> ---
The following code snippet
===========================================
template<typename T> int foo()
{
  int i = (_Cilk_spawn foo<T>()) + 0;
  return i;
}

template int foo<int>();
===========================================

is invalid. You are not allowed to use the result of a spawned function until
after a _Cilk_sync; statement.

But that is no excuse for an ICE.



More information about the Gcc-bugs mailing list