This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto][patch] Emit common variables
>
> Why not just change the previous loop to do FOR_EACH_STATIC_VARIABLE?
Looks like that works too. Is the attached patch OK if it bootstraps
and has no regressions?
>
> Diego.
>
Cheers,
--
Rafael Avila de Espindola
Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland
Registered in Dublin, Ireland
Registration Number: 368047
diff --git a/gcc/lto-function-out.c b/gcc/lto-function-out.c
index 8b8a94c..38376cb 100644
--- a/gcc/lto-function-out.c
+++ b/gcc/lto-function-out.c
@@ -2305,7 +2305,7 @@ output_constructors_and_inits (void)
/* Process the global static vars that have initializers or
constructors. */
- FOR_EACH_STATIC_INITIALIZER (vnode)
+ FOR_EACH_STATIC_VARIABLE (vnode)
{
tree var = vnode->decl;
tree context = DECL_CONTEXT (var);