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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
and GOMP_task (fn1, data1, fn2, ...) performs:
if (somecond)
  {
    if (fn2 == 0)
      fn1 (data1);
    else
      {
        void *buf = alloca (...); // Takes care also about alignment
        fn2 (buf, data1);
        fn1 (buf);
      }
  }
else
  {
    void *buf = malloc (...); // Takes care also about alignment
    if (fn2 == 0)
      memcpy (buf, data1, ...);
    else
      fn2 (buf, data1);
    // Arrange for fn1 (buf); to be called at some point later (like C++
futures)
  }
The purpose of fn2 is to run copy constructors of the vars, for vars that will
be residing within the buf.

Reply via email to