Re: [gomp4] lto error message

2015-10-20 Thread Ilya Verbin
On Tue, Oct 20, 2015 at 15:54:45 -0400, Nathan Sidwell wrote:
> @@ -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 % function %qD", node->decl);
>else
> - gcc_unreachable ();
> + error ("missing OpenACC % variable %qD", node->decl);
>  }
>  }

There might be a situation when some func or var is lost during regular LTO,
even if flag_openacc is present.  In this case "missing OpenACC ..." message
would be wrong.  And if flag_openacc is absent, gcc_assert (flag_openacc) is a
bit confusing.  We disscussed this with Cesar here:
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02076.html

  -- Ilya


Re: [gomp4] lto error message

2015-10-20 Thread Nathan Sidwell

On 10/20/15 16:20, Ilya Verbin wrote:

On Tue, Oct 20, 2015 at 15:54:45 -0400, Nathan Sidwell wrote:



There might be a situation when some func or var is lost during regular LTO,
even if flag_openacc is present.  In this case "missing OpenACC ..." message
would be wrong.  And if flag_openacc is absent, gcc_assert (flag_openacc) is a
bit confusing.  We disscussed this with Cesar here:
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02076.html


Ok. During porting I fell over the error and noticed it could be simplified.  As 
it happens, I don't  need this patch for the stuff I'm moving at the moment.



nathan