Another small cleanup I noticed.  We can use %qD to print a decl name.

Applied to gomp4 branch.

nathan
2015-10-20  Nathan Sidwell  <nat...@codesourcery.com>

	* lto-cgraph.c (input_overwrite_node): Cleanup openacc diagnostic
	emission.

Index: gcc/lto-cgraph.c
===================================================================
--- gcc/lto-cgraph.c	(revision 229094)
+++ gcc/lto-cgraph.c	(working copy)
@@ -1209,16 +1209,11 @@ input_overwrite_node (struct lto_file_de
 
   if (!success)
     {
-      if (flag_openacc)
-	{
-	  if (TREE_CODE (node->decl) == FUNCTION_DECL)
-	    error ("Missing routine function %<%s%>", node->name ());
-	  else
-	    error ("Missing declared variable %<%s%>", node->name ());
-	}
-
+      gcc_assert (flag_openacc);
+      if (TREE_CODE (node->decl) == FUNCTION_DECL)
+	error ("missing OpenACC %<routine%> function %qD", node->decl);
       else
-	gcc_unreachable ();
+	error ("missing OpenACC %<declare%> variable %qD", node->decl);
     }
 }
 

Reply via email to