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