[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possible bug in GCC 5, need help



On 08/29/2015 08:40 AM, Mike Hommey wrote:
> On Thu, Aug 20, 2015 at 08:17:27PM -0400, Stephen Powell wrote:
>> On Sat, 15 Aug 2015 05:44:42 -0400 (EDT), Mike Hommey wrote:
>>> ...
>>> The current version of Iceweasel in unstable fails to build because of
>>> an internal error in the javascript engine which looks like it could be
>>> caused by some miscompilation.
>>> ...
>>> I was able to narrow it down as follows:
>>> ...
>>> - Building js/src/Parser.o with a #pragma GCC optimize("O0") at the
>>>   beginning fixes it.
>>> - Then I was able to go down at the function level, whereby moving the
>>>   following function at the end of the file and preceding it with the
>>>   pragma above fixes it:
>>>     template <>
>>>     /* static */ bool
>>>     Parser<FullParseHandler>::bindLexical(BindData<FullParseHandler>* data,
>>>                                           HandlePropertyName name,
>>>                                           Parser<FullParseHandler>* parser)
>>>
>>>   (somehow, adding a #pragma GCC optimize("O3") after a O0 one doesn't
>>>    raise optimization level for the rest of the file, what's why I
>>>    double checked by moving the function)
>>>
>>> Could someone with s390x assembly knowledge look at the assembly for
>>> that function and narrow it down further, possibly filing a GCC bug?
>>
>> If you will produce a compiler listing that shows the generated machine
>> language and pseudo-assembly language for the problem piece of code,
>> both for the good case and the failing case, and send me a link to it,
>> I'll take a look at it.  I can't promise you success, but I'll look at it.
> 
> Sorry, I missed the answer because I'm not subscribed and forgot to check
> the ML.
> 
> I'm not sure how useful this is going to be, but here you are:
> https://people.debian.org/~glandium/Parser.o.tar.gz

I've bisected the problem. It occurred first with:

commit 90f3e775d6b7bec70e883579beb49b456c135a09
Author: wmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Jan 22 17:59:23 2015 +0000

    2015-01-22  Wei Mi  <wmi@google.com>

            PR rtl-optimization/64557
            * dse.c (record_store): Call get_addr for mem_addr.
            (check_mem_read_rtx): Likewise.

With this patch an stc (store character) is dropped by the DSE pass (dead store elimination). I'm
currently auto-reducing the testcase to start debugging. I'll open a GCC BZ with the reduced testcase.

Bye,

-Andreas-


Reply to: