gcc/

2016-11-06  Jack Howarth  <howarth.at.gcc@gmail.com>

	PR driver/78206
	* incpath.c: (remove_dup(): Also silently ignore EPERM.

Index: gcc/incpath.c
===================================================================
--- gcc/incpath.c	(revision 241884)
+++ gcc/incpath.c	(working copy)
@@ -253,8 +253,9 @@
 
       if (stat (cur->name, &st))
 	{
-	  /* Dirs that don't exist are silently ignored, unless verbose.  */
-	  if (errno != ENOENT)
+	  /* Dirs that don't exist or have denied permissions are 
+	     silently ignored, unless verbose.  */
+	  if ((errno != ENOENT) && (errno != EPERM))
 	    cpp_errno (pfile, CPP_DL_ERROR, cur->name);
 	  else
 	    {
