This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Avoid one place of frontend calling into targetm
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 08 May 2007 17:40:01 -0400
- Subject: Re: [C++] Avoid one place of frontend calling into targetm
- References: <20070423001523.GJ23507@kam.mff.cuni.cz> <200705060208.l4628QQ30220@makai.watson.ibm.com> <20070508131432.GB10024@kam.mff.cuni.cz>
Well, the patch fixes the simple testcases I tried, but does not
completely return to the original behavior. With the patch, both
_GLOBAL__I_copies and _GLOBAL__I_0_copies are generated, but
_GLOBAL__I_copies no longer is global, so collect2 doesn't see it.
In other words,
.lglobl ._Z41__static_initialization_and_destruction_0ii
._Z41__static_initialization_and_destruction_0ii:
...
.lglobl ._GLOBAL__I_copies
._GLOBAL__I_copies:
bl ._Z41__static_initialization_and_destruction_0ii
.globl ._GLOBAL__I_0_copies
._GLOBAL__I_0_copies:
bl ._GLOBAL__I_copies
_GLOBAL__I_0_copies -> _GLOBAL__I_copies
-> _Z41__static_initialization_and_destruction_0ii
but, at least, the initializer only is called once. Because this change
in behavior does not return to the original assembly before the first
patch, I tend to doubt that this patch fixes the regression correctly.
But closer!
David