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
2015-12-30  Nathan Sidwell  <nat...@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 ");

Reply via email to