This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/48492] [4.7 Regression] LTO bootstrap failure in copy_constant


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48492

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-04-16 08:50:35 UTC ---
> Reachability analysis should never take into account DEBUG stmts, the bug is
> IMNSHO in that we shouldn't ever stream DECL_IN_CONSTANT_POOL with
> error_mark_node as DECL_INITIAL.

The first bug is that we remove the varpool entry for the
DECL_IN_CONSTANT_POOL.

> Even if we don't hit this problem, if DECL_IN_CONSTANT_POOL aren't actually
> handled specially by LTO streamer, the constants won't be merged across
> different CUs, whcih is undesirable.

That's somewhat orthogonal though.  The constants are merged across CUs, see
gcc.dg/lto/const-uniq_[01].c, but the LTO handling of DECL_IN_CONSTANT_POOL is
indeed suboptimal, as explained in lto_output_varpool_node:

  /* Constant pool initializers can be de-unified into individual ltrans units.
     FIXME: Alternatively at -Os we may want to avoid generating for them the
     local labels and share them across LTRANS partitions.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]