Ver código fonte

gcc: opencl: Correctly honor `-fplugin-arg-starpu-opencl-include-dir'.

* gcc-plugin/src/starpu.c (build_variable_from_file_contents): Don't
  break out of the loop when ERR is zero.  Regression introduced in
  r6712 ("gcc: Fix handling of `opencl_include_dirs' on GCC 4.7+.").
Ludovic Courtès 13 anos atrás
pai
commit
6c0cabc847
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      gcc-plugin/src/starpu.c

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

@@ -1100,10 +1100,10 @@ build_variable_from_file_contents (location_t loc,
 	  err = fstatat (dir_fd, file, &st, 0);
 	  if (err != 0)
 	    close (dir_fd);
-
-	  /* Leave DIRS unchanged so it can be referred to in diagnostics
-	     below.  */
-	  break;
+	  else
+	    /* Leave DIRS unchanged so it can be referred to in diagnostics
+	       below.  */
+	    break;
 	}
     }