Re: [C++ PATCH] Fix decomp handling of fields with reference type (PR c++/78931)

2017-01-05 Thread Jason Merrill
OK. On Wed, Jan 4, 2017 at 5:06 PM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 04:27:42PM -0500, Jason Merrill wrote: >> On Thu, Dec 29, 2016 at 10:11 AM, Jakub Jelinek wrote: >> > probe = TREE_OPERAND (probe, 0); >> > TREE_TYPE

Re: [C++ PATCH] Fix decomp handling of fields with reference type (PR c++/78931)

2017-01-04 Thread Jakub Jelinek
On Wed, Jan 04, 2017 at 04:27:42PM -0500, Jason Merrill wrote: > On Thu, Dec 29, 2016 at 10:11 AM, Jakub Jelinek wrote: > > probe = TREE_OPERAND (probe, 0); > > TREE_TYPE (v[i]) = TREE_TYPE (probe); > > layout_decl (v[i], 0); > > -

Re: [C++ PATCH] Fix decomp handling of fields with reference type (PR c++/78931)

2017-01-04 Thread Jason Merrill
On Thu, Dec 29, 2016 at 10:11 AM, Jakub Jelinek wrote: > probe = TREE_OPERAND (probe, 0); > TREE_TYPE (v[i]) = TREE_TYPE (probe); > layout_decl (v[i], 0); > - SET_DECL_VALUE_EXPR (v[i], tt); > + SET_DECL_VALUE_EXPR (v[i],

[C++ PATCH] Fix decomp handling of fields with reference type (PR c++/78931)

2016-12-29 Thread Jakub Jelinek
Hi! When a field has reference type, we correctly used the reference type as the type of the var with value expr, but the DECL_VALUE_EXPR had the type/value after convert_from_reference, which leads to invalid IL. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for