https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101664
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:7616ed6307c90b5bbf1bf53550d33cc674ab4b6f commit r12-2598-g7616ed6307c90b5bbf1bf53550d33cc674ab4b6f Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Mon Jul 26 19:34:33 2021 +0200 d: Return the correct value for C++ constructor calls (PR101664) C++ constructors return void, even though the front-end semantic treats them as implicitly returning `this'. To handle this correctly, the object reference is cached and used as the result of the expression. PR d/101664 gcc/d/ChangeLog: * expr.cc (ExprVisitor::visit (CallExp *)): Use object expression as result for C++ constructor calls. gcc/testsuite/ChangeLog: * gdc.dg/extern-c++/extern-c++.exp: New. * gdc.dg/extern-c++/pr101664.d: New test. * gdc.dg/extern-c++/pr101664_1.cc: New test.