https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64412
--- Comment #19 from iverbin at gcc dot gnu.org --- (In reply to iverbin from comment #18) > It seems that the problem with offload is that -fPIC option is passed to the > offload compiler, but not passed to the host compiler. If I add -fPIC to the > host compiler as well, everything is ok. > > I don't know how -fPIC option affects IR before streaming out, > -fdump-tree-optimized are identical for pic/nonpic cases, but > .gnu.offload_lto_.decls sections are different. However debug_tree > (vnode->decl) for "G" in ipa_write_summaries are identical for pic/nonpic > cases. > > So, the question is, how to figure out what is different in G's declaration > in IR, and how it can affect further expansion? The regression is caused by LTO streaming of TARGET_OPTIMIZE_NODE: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00376.html