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

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 15 22:52:00 GMT 2011


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

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-04-15 22:52:08 UTC ---
The scenario is as follows:
  1. during LTO stage, copy-prop eliminates a DECL_IN_CONSTANT_POOL variable
from the GIMPLE IR, except for a reference in a GIMPLE_DEBUG statement
(ADDR_EXPR of the variable is the debug value),
  2. the variable is streamed out in the object file, as well as its associated
varpool entry,
  3. during WPA stage, both are streamed in, then reachability analysis is run
and computes that the variable is unreachable so removes the varpool entry.
As a consequence, when the variable is streamed out again, its initializer gets
replaced with ERROR_MARK.
  4. during LTRANS stage, the variable is again streamed in, with ERROR_MARK as
initializer and this blows up when the GIMPLE_DEBUG statement is processed.

So ISTM that the problem is in the reachability analysis during the WPA stage.



More information about the Gcc-bugs mailing list