This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/48492] [4.7 Regression] LTO bootstrap failure in copy_constant
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 16 Apr 2011 08:51:24 +0000
- Subject: [Bug lto/48492] [4.7 Regression] LTO bootstrap failure in copy_constant
- Auto-submitted: auto-generated
- References: <bug-48492-4@http.gcc.gnu.org/bugzilla/>
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. */