Explorar o código

gcc: Really honor STARPU_NMAXBUFS.

* gcc-plugin/src/starpu.c
  (build_codelet_initializer)[access_mode_array]: Stop when INDEX >=
  STARPU_NMAXBUFS, to avoid "confused by earlier errors".
Ludovic Courtès %!s(int64=13) %!d(string=hai) anos
pai
achega
c7db6adbca
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      gcc-plugin/src/starpu.c

+ 1 - 1
gcc-plugin/src/starpu.c

@@ -1527,7 +1527,7 @@ build_codelet_initializer (tree task_decl)
 
     for (type = task_pointer_parameter_types (task_decl),
 	   modes = NULL_TREE, index = 0;
-	 type != NULL_TREE;
+	 type != NULL_TREE && index < STARPU_NMAXBUFS;
 	 type = TREE_CHAIN (type), index++)
       {
 	tree value = build_int_cst (integer_type_node,