Re: [PATCH] Do not use tree_to_wide_ref that point to a temporary (PR c++/90587).

2019-05-23 Thread Richard Biener
On Thu, May 23, 2019 at 12:51 PM Martin Liška wrote: > > Hi. > > The PR is about use-after-scope issue where: > wi::tree_to_wide_ref andw = wi::to_wide (val) & wi::to_wide (boundary); > > The RHS1 and RHS2 will become out-of-scope after operator& returns a > reference. > andw.val then points to o

[PATCH] Do not use tree_to_wide_ref that point to a temporary (PR c++/90587).

2019-05-23 Thread Martin Liška
Hi. The PR is about use-after-scope issue where: wi::tree_to_wide_ref andw = wi::to_wide (val) & wi::to_wide (boundary); The RHS1 and RHS2 will become out-of-scope after operator& returns a reference. andw.val then points to one of RHS1 or RHS2. So that we end up with an use-after-scope. Patch