2012/1/23 Richard Guenther <richard.guent...@gmail.com>:
> On Mon, Jan 23, 2012 at 12:19 PM, Kai Tietz <ktiet...@googlemail.com> wrote:
>> 2012/1/23 Richard Guenther <richard.guent...@gmail.com>:
>>> On Sun, Jan 22, 2012 at 8:05 PM, Kai Tietz <ktiet...@googlemail.com> wrote:
>>>> Hello,
>>>>
>>>> this patch fixes reported issue in PR about common-symbols and fix
>>>> behavior about -fcommon/-fno-common.  Additionally it adds proper
>>>> support for weakref, local-variant of weaks, and tries to handle
>>>> resolution-file information for PE-COFF.
>>>>
>>>> I did regression tests of all standard-languages for
>>>> x86_64-w64-mingw32 and i686-w64-mingw32.  Dave would you mind to test
>>>> it for cygwin, too?  I assume it will fit for cygwin, but just to make
>>>> sure.  Also I did a regression test for x86_64-unknown-linux-gnu.
>>>>
>>>> Patch ok for apply?
>>>
>>> As said in the PR your binds_local_p target hook should end with calling
>>> default_binds_local_p[_1].  No need to duplicate all code in your hook
>>> (it will quickly get out-of-date).
>>>
>>> Richard.
>>
>> Well, issue here is the following block in default_binds_local_p_1:
>>
>> ...
>>  /* Variables defined outside this object might not be local.  */
>>  else if (DECL_EXTERNAL (exp) && !resolved_locally)
>>    local_p = false;
>> ...
>>
>> This condition is only true for PE-coff, if dllimport attribute was 
>> specified.
>
> That would be a missed-optimization fix, please just fix the wrong-code
> regression at this stage.
>
> Richard.

Hmm, 'missed-optimization'?  If I would call current variant directly
without checking for externals, I would introduce wrong code
generation, as it would introduce via the back-door use of GOT-tables
for x86_64 PE+, which aren't present.

>> I will try to adjust patch for this, but some redudant checkings are
>> necessary here for sure.
>
> Thta
>
>> Kai

Reply via email to