Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-26 Thread Eric Botcazou
> * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL > when really creating an initialization statement for it. Quite an interesting can of worms I have opened it seems. :-( So the change apparently causes OMP lowering to create dangling references, I have applied t

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-25 Thread Eric Botcazou
> LGTM. Thanks, but a bit too bold because gimplify_and_add can promote the non-static DECL to static memory and reinstate DECL_INITIAL, so first hunk adjusted. * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL when really creating an initialization statement fo

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-25 Thread Richard Biener
On Tue, 25 May 2021, Eric Botcazou wrote: > > The problem with this patch is that it causes: > > > > FAIL: gnat.dg/opt94.adb scan-tree-dump-times optimized "worker" 1 > > > > which is exactly the testcase from the commit which caused the bug I am > > trying to address. > > Sorry about that, a

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-25 Thread Eric Botcazou
> The problem with this patch is that it causes: > > FAIL: gnat.dg/opt94.adb scan-tree-dump-times optimized "worker" 1 > > which is exactly the testcase from the commit which caused the bug I am > trying to address. Sorry about that, a thinko in the original change, I'm testing this fixlet.

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-25 Thread Richard Biener
On Fri, 21 May 2021, Martin Jambor wrote: > Hi, > > On Mon, May 17 2021, Eric Botcazou wrote: > >> sorry for breaking Ada over the weekend, however... > > > > No problem. > > > >> None of the non-ACATS tests fail for me without doing a bootstrap, but I > >> did manage to reproduce this one (by th

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-21 Thread Martin Jambor
Hi, On Mon, May 17 2021, Eric Botcazou wrote: >> sorry for breaking Ada over the weekend, however... > > No problem. > >> None of the non-ACATS tests fail for me without doing a bootstrap, but I >> did manage to reproduce this one (by the way, there really should be a >> documentation on how to ru

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-17 Thread Eric Botcazou
> sorry for breaking Ada over the weekend, however... No problem. > None of the non-ACATS tests fail for me without doing a bootstrap, but I > did manage to reproduce this one (by the way, there really should be a > documentation on how to run ACATS tests manually, I should not need to > spend an

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-17 Thread Martin Jambor
Hi Eric, sorry for breaking Ada over the weekend, however... On Fri, May 14 2021, Eric Botcazou wrote: >> Looks like this caused: >> >> === acats tests === >> FAIL: c41325a None of the non-ACATS tests fail for me without doing a bootstrap, but I did manage to reproduce this on

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-15 Thread Martin Jambor
Hi, On Fri, May 14 2021, Eric Botcazou wrote: >> Looks like this caused: >> >> === acats tests === >> FAIL: c41325a >> FAIL: c45347d >> FAIL: c74402a >> FAIL: c95085m >> FAIL: cc3601a >> >> === gnat tests === >> >> FAIL: gnat.dg/addr12.adb (test for exc

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-14 Thread Eric Botcazou
> Looks like this caused: > > === acats tests === > FAIL: c41325a > FAIL: c45347d > FAIL: c74402a > FAIL: c95085m > FAIL: cc3601a > > === gnat tests === > > FAIL: gnat.dg/addr12.adb (test for excess errors) > UNRESOLVED: gnat.dg/addr12.adb compilation fa

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-14 Thread Bernd Edlinger
On 5/13/21 5:17 PM, Jeff Law via Gcc-patches wrote: > > On 5/13/2021 6:23 AM, Martin Jambor wrote: >> Hi, >> >> When SRA transforms an assignment where the RHS is an aggregate decl >> that it creates replacements for, the (least efficient) fallback >> method of dealing with them is to store all th

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/13/2021 6:23 AM, Martin Jambor wrote: Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it creates replacements for, the (least efficient) fallback method of dealing with them is to store all the replacements back into the original decl and then let the origina

[PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-13 Thread Martin Jambor
Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it creates replacements for, the (least efficient) fallback method of dealing with them is to store all the replacements back into the original decl and then let the original assignment takes its course. That of course