// RUN: %libomp-compile-and-run
#include <stdio.h>
#include <omp.h>
#include "omp_my_sleep.h"

/*
 * This test creates tasks that themselves create a new task.
 * The runtime has to take care that they are correctly freed.
 */

int main()
{
  #pragma omp task
  {
    #pragma omp task
    {
      my_sleep( 0.1 );
    }
  }

  #pragma omp parallel num_threads(2)
  {
    #pragma omp single
    #pragma omp task
    {
      #pragma omp task
      {
        my_sleep( 0.1 );
      }
    }
  }

  printf("pass\n");
  return 0;
}

Add test case for nested creation of tasks
Add test case for nested creation of tasks

For discussion in D23115

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@277730 91177308-0d34-0410-b5e6-96231b3b80d8
