[Bug c++/86669] [7/8/9 regression] Complete object constructor clone omits length for a c++11 braced initialiser
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 27 20:13:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86669
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 45105 [details]
> gcc9-pr86669.patch
>
> Indeed, it does. clone_body has code to unshare DECL_INITIAL, but it does
> so only for FOR_EACH_LOCAL_DECL decls, the artificial temporary for
> std::initializer_list in this case isn't tracked among those.
>
> The following patch fixes it at least when looking at the testcase using a
> cross-compiler, but I have no way to 1) test it on darwin 2) check whether
> the testcase in the patch actually fails at runtime without the patch and is
> fixed with it.
> I'll bootstrap/regtest the patch on x86_64-linux and i686-linux, can
> somebody please do the 1) and 2)? Thanks.
thanks for the patch, I will do 1 and 2
More information about the Gcc-bugs
mailing list