This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Enable experimental TSAN support for Ada
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Fri, 9 Jan 2015 13:44:17 +0100
- Subject: RE: [PATCH] Enable experimental TSAN support for Ada
- Authentication-results: sourceware.org; auth=none
- References: <DUB118-W45B65843D93119073A62C3E45A0 at phx dot gbl>,<54AAED52 dot 5040506 at redhat dot com>,<CAFiYyc0+Cmcqe=HUgasuj0Rw0rDsxZsvXkqLCNzOWEgCmVLymw at mail dot gmail dot com>,<DUB118-W394645D994F91AA2BC1DC6E4440 at phx dot gbl>,<CAFiYyc2wBvgVUysRtLS5jommxdjASAVb_v4N1=8p-yGdukQ=ag at mail dot gmail dot com>,<DUB118-W17E1B62259A1454C8A3E64E4440 at phx dot gbl>,<20150109123045 dot GY1405 at tucnak dot redhat dot com>
On Fri, 9 Jan 2015 13:30:45, Jakub Jelinke wrote:
>
> On Fri, Jan 09, 2015 at 01:12:09PM +0100, Bernd Edlinger wrote:
>>>> should be equivalent to
>>>>
>>>> if (DECL_P (base) && !may_be_aliased (base))
>>>> return false;
>>>>
>>>> is that right?
>>>
>>> Yes, well, not exactly, but I wonder if its worth doing the extra check
>>> if you only check decl accesses anyway and not indirect accesses.
>>>
>>
>>
>> I think Jakub, you wrote that initially, any comments on that?
>
> I think it was still from Dmitry's code. If you can make it work by taking
> address of base and offsetting it, it works for me. Just note that I think
> base doesn't have to be always addressable, so you probably should punt if
> it is not rather than assert it is. If something is not addressable, then
> it can't be accessed by multiple threads.
>
Thanks.
FYI: the VIEW_CONVERT_EXPR did not fail in the
gcc_checking_assert (is_gimple_addressable (base))
but much later, somewhere in tree-cfg.c it dropped out.
Maybe that assert does not check exactly what is
needed for a valid argument of ADDR_EXPR ?
I mean I can somehow fold an ADDR_EXPR of a bit field member,
This won't crash at all, but I can't fold ADDR_EXPR(VIEW_CONVERT_EXPR).
Bernd.