IMA corner case with forward declarations of statics

Mark Mitchell mark@codesourcery.com
Thu Jun 24 03:18:00 GMT 2004


Geoff Keating wrote:

>
> On 23/06/2004, at 7:58 PM, Mark Mitchell wrote:
>
>> Zack Weinberg wrote:
>>
>>> Now, GCC 3.4's IMA doesn't do the right thing with this either; no
>>> matter which order the files are given in, you get
>>>
>>> Assembler messages:
>>> Error: symbol `foo' is already defined
>>>
>>> No one has noticed, which leads me to believe that this will not be a
>>> problem in real life.  So I propose to detect the case where we would
>>> generate incorrect code, and call sorry() instead.
>>>
>> I think that's fine; it's certainly a progression.
>>
>> If IMA were implemented as in other compilers (i.e., parse entire 
>> translation units in isolation, and then have a separate merge step) 
>> things would not get confused.
>
>
> By a strange coincidence, that's what the original implementation did.

So, in Zack's test case we just failed to rename the things apart before 
emitting assembly?

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc mailing list