Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-29 Thread Richard Biener
On Fri, 29 Apr 2016, Eric Botcazou wrote: > > The following works (for the testcase): > > > > Index: gcc/cp/decl.c > > === > > --- gcc/cp/decl.c (revision 235547) > > +++ gcc/cp/decl.c (working copy) > > @@ -10393,8 +1039

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-29 Thread Eric Botcazou
> The following works (for the testcase): > > Index: gcc/cp/decl.c > === > --- gcc/cp/decl.c (revision 235547) > +++ gcc/cp/decl.c (working copy) > @@ -10393,8 +10393,11 @@ grokdeclarator (const cp_declarator *dec >

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-28 Thread Richard Biener
On Thu, 28 Apr 2016, Richard Biener wrote: > On Thu, 28 Apr 2016, Eric Botcazou wrote: > > > > Aww, I was hoping for sth that would not require me to fix all > > > frontends ... > > > > I don't really see how this can work without DECL_EXPR though. You need to > > define when the variable-size

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-28 Thread Richard Biener
On Thu, 28 Apr 2016, Eric Botcazou wrote: > > Aww, I was hoping for sth that would not require me to fix all > > frontends ... > > I don't really see how this can work without DECL_EXPR though. You need to > define when the variable-sized expressions are evaluated to lay out the type, > otherw

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-28 Thread Eric Botcazou
> Aww, I was hoping for sth that would not require me to fix all > frontends ... I don't really see how this can work without DECL_EXPR though. You need to define when the variable-sized expressions are evaluated to lay out the type, otherwise it will be laid out on the first use, which may see

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-27 Thread Richard Biener
On Wed, 27 Apr 2016, Eric Botcazou wrote: > > Gimplification is done in-place and thus relies on all processed > > trees being unshared. This is achieved by unshare_body which > > in the end uses walk_tree to get at all interesting trees that possibly > > need unsharing. > > > > Unfortunately it

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-27 Thread Eric Botcazou
> Gimplification is done in-place and thus relies on all processed > trees being unshared. This is achieved by unshare_body which > in the end uses walk_tree to get at all interesting trees that possibly > need unsharing. > > Unfortunately it doesn't really work because walk_tree only walks > typ