20100108_0.c: New.
2010-01-10 Rafael Avila de Espindola <espindola@google.com> * 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. From-SVN: r155800
This commit is contained in:
parent
bd2638ac9f
commit
06bfe1d0e2
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1973,12 +1973,15 @@ output_unreferenced_globals (cgraph_node_set set)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
9
gcc/testsuite/gcc.dg/lto/20100108_0.c
Normal file
9
gcc/testsuite/gcc.dg/lto/20100108_0.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* { 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;
|
Loading…
Reference in New Issue
Block a user