On 4/21/20 4:33 PM, Iain Sandoe wrote:
Hi,

As reported by MichaƂ Dominiak, we are generating incorrect code
for structured binding of local vars.  Somewhere in the machinations
associated with lambda captures, I messed up the code handling
DECL_VALUE_EXPRs.

tested so far on x86_64-darwin16,
OK for master if it passes regstrap on x86-64-Linux?
thanks
Iain

====

Structured binding makes use of the DECL_VALUE_EXPR fields
in local variables.  We need to recognise these and only amend
the expression values, retaining the 'alias' value intact.

gcc/cp/ChangeLog:

2020-04-21  Iain Sandoe  <i...@sandoe.co.uk>

        PR c++/94701
        * coroutines.cc (struct local_var_info): Add fields for static
        variables and those with DECL_VALUE_EXPR redirection.
        (transform_local_var_uses):  Skip past typedefs and static vars
        and then account for redirected variables.
        (register_local_var_uses): Likewise.


ok



--
Nathan Sidwell

Reply via email to