This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80411] DCE vs. offloading
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Apr 2017 12:10:19 +0000
- Subject: [Bug middle-end/80411] DCE vs. offloading
- Auto-submitted: auto-generated
- References: <bug-80411-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80411
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, do we want to force output of everything we reference from the offload
tables, like untested:
--- gcc/omp-offload.c.jj 2017-03-29 07:11:21.000000000 +0200
+++ gcc/omp-offload.c 2017-04-18 14:08:25.154650257 +0200
@@ -152,6 +152,11 @@ add_decls_addresses_to_decl_constructor
CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, addr);
if (is_var)
CONSTRUCTOR_APPEND_ELT (v_ctor, NULL_TREE, size);
+
+ if (is_var)
+ varpool_node::get (it)->force_output = 1;
+ else
+ cgraph_node::get (it)->mark_force_output ();
}
}
?
Note I have no idea why the cgraph/symtab code doesn't see those table ctors
and figure this out from those.