This is the mail archive of the gcc-patches@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]

Re: [C++ PATCH] Fix -frepo (PR c++/36364)


Jakub Jelinek wrote:

No.  The problem is const static data member, for which:
      /* Const static data members initialized by constant expressions must
         be processed where needed so that their definitions are
         available.  */
      if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
          && DECL_CLASS_SCOPE_P (decl))
        return 2;
Returning 2 from repo_emit_p means thatg it is handled as in -fno-repo
compilation - it never makes it into the *.rpo file, neither
as O _Z...terminal, nor as C _Z...terminal.  But as -frepo implies
-fno-implicit-templates, in this case it works as in -fno-implicit-templates
compilation - which means explicit instantiation is required.

Right, that is why I suggested using both the DECL_REPO_AVAILABLE and the IDENTIFIER_REPO_CHOSEN logic. Of course, you have to use DECL_REPO_AVAILABLE to let collect2 know about it. But, once you do that, it should assign it to an object file, and then IDENTIFIER_REPO_CHOSEN will tell you to write it out by returning 1 from that function.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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