Samuel Thibault лет назад: 9
Родитель
Сommit
3dd99bf440
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/util/openmp_runtime_support.c

+ 4 - 1
src/util/openmp_runtime_support.c

@@ -1560,7 +1560,10 @@ void starpu_omp_task_region(const struct starpu_omp_task_region_attr *attr)
 			/* TODO: backup current ICVs and setup new ICVs for the included task */
 			/* TODO: backup current ICVs and setup new ICVs for the included task */
 		}
 		}
 		int i;
 		int i;
-		void *data_interfaces[attr->cl.nbuffers];
+		unsigned n = attr->cl.nbuffers;
+		if (n == 0)
+			n = 1;
+		void *data_interfaces[n];
 		for (i = 0; i < attr->cl.nbuffers; i++)
 		for (i = 0; i < attr->cl.nbuffers; i++)
 		{
 		{
 			starpu_data_handle_t handle = attr->handles[i];
 			starpu_data_handle_t handle = attr->handles[i];