Commit 785ca514 by Rafael Avila de Espindola Committed by Rafael Espindola

20100104_0.c: New.

2010-01-04  Rafael Avila de Espindola  <espindola@google.com>

	* gcc.dg/lto/20100104_0.c: New.

2010-01-04  Rafael Avila de Espindola  <espindola@google.com>

	* lto-streamer-out.c (output_unreferenced_globals): Output the full
	tree of an unreferenced global var.

From-SVN: r155619
parent 22554cf9
2010-01-04 Rafael Avila de Espindola <espindola@google.com>
* lto-streamer-out.c (output_unreferenced_globals): Output the full
tree of an unreferenced global var.
2010-01-04 H.J. Lu <hongjiu.lu@intel.com> 2010-01-04 H.J. Lu <hongjiu.lu@intel.com>
PR target/42542 PR target/42542
......
...@@ -1974,7 +1974,12 @@ output_unreferenced_globals (cgraph_node_set set) ...@@ -1974,7 +1974,12 @@ output_unreferenced_globals (cgraph_node_set set)
tree var = vnode->decl; tree var = vnode->decl;
if (TREE_CODE (var) == VAR_DECL && TREE_PUBLIC (var)) if (TREE_CODE (var) == VAR_DECL && TREE_PUBLIC (var))
lto_output_tree_ref (ob, var); {
/* Outputting just the reference will not output the object itself
or references it might have.*/
lto_output_tree (ob, var, true);
lto_output_tree_ref (ob, var);
}
} }
output_zero (ob); output_zero (ob);
......
2010-01-04 Rafael Avila de Espindola <espindola@google.com>
* gcc.dg/lto/20100104_0.c: New.
2010-01-04 H.J. Lu <hongjiu.lu@intel.com> 2010-01-04 H.J. Lu <hongjiu.lu@intel.com>
PR target/42542 PR target/42542
......
/* { dg-lto-do assemble } */
/* The problem with this testcase is that we were missing an undefined
reference to c_common_attribute_table. This can be tested with
GNUTARGET=plugin nm --plugin liblto_plugin.so 20100104_0.o
but we don't have support in the testsuite for doing it. */
extern int c_common_attribute_table[];
void *foobar = c_common_attribute_table;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment