* gcc.dg/lto/20100108_0.c: New.
2010-01-10 Rafael Avila de Espindola <espindola@google.com>
* lto-streamer-out.c (output_unreferenced_globals): Output static
variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155800
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-01-10 Rafael Avila de Espindola <espindola@google.com>
+
+ * lto-streamer-out.c (output_unreferenced_globals): Output static
+ variables.
+
2010-01-10 Steven Bosscher <steven@gcc.gnu.org>
PR rtl-optimization/42621
{
tree var = vnode->decl;
- if (TREE_CODE (var) == VAR_DECL && TREE_PUBLIC (var))
+ if (TREE_CODE (var) == VAR_DECL)
{
- /* Outputting just the reference will not output the object itself
- or references it might have.*/
+ /* Output the object in order to output references used in the
+ initialization. */
lto_output_tree (ob, var, true);
- lto_output_tree_ref (ob, var);
+
+ /* If it is public we also need a reference to the object itself. */
+ if (TREE_PUBLIC (var))
+ lto_output_tree_ref (ob, var);
}
}
+2010-01-10 Rafael Avila de Espindola <espindola@google.com>
+
+ * gcc.dg/lto/20100108_0.c: New.
+
2010-01-10 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/graphite/pr40281.c (dg-options): Add -w.
--- /dev/null
+/* { dg-lto-do assemble } */
+/* The problem with this testcase is that we were missing an undefined
+ reference to flag_exceptions. This can be tested with
+ GNUTARGET=plugin nm --plugin liblto_plugin.so 20100108_0.o
+ but we don't have support in the testsuite for doing it. */
+
+extern int flag_exceptions;
+static int *foo = &flag_exceptions;
+int **bar = &foo;