brintos

brintos / llvm-project-archived public Read only

0
0
Text · 526 B · c7c25fc Raw
36 lines · c
1// RUN: %libomp-compile-and-run2#include <stdio.h>3#include <omp.h>4#include "omp_my_sleep.h"5 6/*7 * This test creates tasks that themselves create a new task.8 * The runtime has to take care that they are correctly freed.9 */10 11int main()12{13  #pragma omp task14  {15    #pragma omp task16    {17      my_sleep( 0.1 );18    }19  }20 21  #pragma omp parallel num_threads(2)22  {23    #pragma omp single24    #pragma omp task25    {26      #pragma omp task27      {28        my_sleep( 0.1 );29      }30    }31  }32 33  printf("pass\n");34  return 0;35}36