The fact that LinkObj is initialized with LinkVar does not seem to be
preserved when using -flto:

extern const char LinkVar;
__attribute__((used)) static const char *const LinkObj = LinkVar;


-- 
           Summary: DECL_PRESERVE_P static globals not completely preserved
                    with -flto
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: baldrick at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to