> On Thu, 9 Jun 2016, Alexander Monakov wrote:
> 
> > Hi,
> > 
> > This patch teaches cgraphunit.c:output_in_order to output undefined external
> > variables via assemble_undefined_decl.  At the moment that is only done for
> > -ftoplevel-reorder in varpool.c:symbol_table::output_variables.  This patch
> > makes both behave the same way.  I've also made handling of variables in 
> > both
> > functions look similar to each other.
> 
> Ping.
+  FOR_EACH_VARIABLE (pv)
+    {
+      if (no_reorder && !pv->no_reorder)
+       continue;
+      if (DECL_HARD_REGISTER (pv->decl))
+       continue;
+      if (DECL_HAS_VALUE_EXPR_P (pv->decl))
+       {
+         gcc_checking_assert (lookup_attribute ("omp declare target link",
+                                                DECL_ATTRIBUTES (pv->decl)));
+#ifdef ACCEL_COMPILER
+         continue;
+#endif
+       }
+      i = pv->order;
+      gcc_assert (nodes[i].kind == ORDER_UNDEFINED);
+      nodes[i].kind = pv->definition ? ORDER_VAR : ORDER_VAR_UNDEF;
+      nodes[i].u.v = pv;

order for undefined variables is not computed, so it will be 0. Doesn't think 
overwrite existing
entries of nodes array?

Honza
> 
> Thanks.
> Alexander

Reply via email to