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: Mark Mitchell <mark at codesourcery dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 06 May 2007 10:02:56 -0700
- Subject: Re: [C++] Avoid one place of frontend calling into targetm
- References: <20070423001523.GJ23507@kam.mff.cuni.cz> <200705060208.l4628QQ30220@makai.watson.ibm.com> <20070506100526.GA3086@atrey.karlin.mff.cuni.cz>
Jan Hubicka wrote:
>> The difference in assembly for init/copy3.C is an additional
>> global constructor that calls the first global constructor
>>
>> _Z41__static_initialization_and_destruction_0ii:
>> ...
>>
>> _GLOBAL__I_copies:
>> ...
>> bl ._Z41__static_initialization_and_destruction_0ii
>>
>> _GLOBAL__I_0_copies:
>> ...
>> bl ._GLOBAL__I_copies
>
> Looks like C++ frontend is keeping DECL_STATIC_CONSTRUCTOR on bit too
> many functions, but I am not at all sure why. Would be possible to have
> a testcase + diff of what is going wrong so I can throw it into a cross?
Isn't David's information sufficient? I would g++.dg/init/copy3.C is
not a complex test case, and the diff above shows how the assembly has
changed. I would think that it would be possible to debug this with an
AIX cross-compiler?
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713