On May 26, 2020 3:55:01 PM GMT+02:00, Tobias Burnus <tob...@codesourcery.com> 
wrote:
>LTO stream out not only happens with LTO (-flto) but also for
>the offloaded functions with OpenMP/OpenACC.
>
>Without using -flto, this leads to an ICE as a recent patch
>(r11-525-g03d90a20a1afcbb9c30da8d4adf4922b0685061f) added the
>check to DFS::DFS (lto-streamer-out.c:639):
>    if (ob->local_trees && local_tree_p (expr))
>where local_tree_p calls odr_type_t.
>
>And the latter that contains the following assert, which fails:
>
> /* We do not have this information when not in LTO, but we do not need
>      to care, since it is used only for type merging.  */
>   gcc_checking_assert (in_lto_p || flag_lto);
>
>Adding 'in_lto_p &&' before the 'odr_type_t (t) &&' in local_tree_p
>works for offloading but this causes an ICE:
>FAIL: g++.dg/asan/pr85774.C   -O2 -flto -fno-use-linker-plugin
>-flto-partition=none  (internal compiler error)
>lto1: internal compiler error: in unify_scc, at lto/lto-common.c:1678
>
>Hence, the simple solution is to add flag_generate_offload to the
>assert, which this patch does.
>
>OK for the trunk?

OK. 

Richard. 

>Tobias
>
>-----------------
>Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München /
>Germany
>Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung,
>Alexander Walter

Reply via email to