diff mbox

[PTX] avoid constant pool bug

Message ID 5683FE43.4010404@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Dec. 30, 2015, 3:54 p.m. UTC
I've committed this to workaround the middle-end problem  with the  varpool 
thinking (some) cpool objects are undefined.  Still  looking at a proper fix for 
that, but  as attempt one fell over ppc problems, I've applied this  in the 
meanwhile.

nathan
diff mbox

Patch

2015-12-30  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_assemble_undefined_decl): Check
	it's not a constant pool object.

Index: config/nvptx/nvptx.c
===================================================================
--- config/nvptx/nvptx.c	(revision 232002)
+++ config/nvptx/nvptx.c	(working copy)
@@ -1718,6 +1718,11 @@  nvptx_globalize_label (FILE *, const cha
 static void
 nvptx_assemble_undefined_decl (FILE *file, const char *name, const_tree decl)
 {
+  /* The middle end can place constant pool decls into the varpool as
+     undefined.  Until that is fixed, catch the problem here.  */
+  if (DECL_IN_CONSTANT_POOL (decl))
+    return;
+
   write_var_marker (file, false, TREE_PUBLIC (decl), name);
 
   fprintf (file, "\t.extern ");