This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] lto error message
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Oct 2015 23:20:20 +0300
- Subject: Re: [gomp4] lto error message
- Authentication-results: sourceware.org; auth=none
- References: <56269C05 dot 6030502 at acm dot org>
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 %<routine%> function %qD", node->decl);
> else
> - gcc_unreachable ();
> + error ("missing OpenACC %<declare%> 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