https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96250
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:ee11a23b334d5fea08b80c2d87874388ed51d08e commit r10-8649-gee11a23b334d5fea08b80c2d87874388ed51d08e Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Tue Jul 21 19:32:54 2020 +0200 d: Field access in parentheses causes error: need 'this' for 'field' of type 'type' 1. Fixes an ICE in the front-end if a struct symbol were to appear twice in the compilation unit. 2. Fixes a rejects-valid bug in the front-end where `(symbol)' was being resolved as a `var' expression, instead of `this.var'. gcc/d/ChangeLog: PR d/96250 * dmd/dstruct.c (StructDeclaration::semantic): Error if redefinition of struct exists in compilation. * dmd/expressionsem.c (ExpressionSemanticVisitor::visit(TypeExp)): Rewrite resolved field variables as 'this.var' before semantic. * dmd/parse.c (Parser::parseUnaryExp): Mark '(type) una_exp' as a parenthesized expression. gcc/testsuite/ChangeLog: PR d/96250 * gdc.test/fail_compilation/fail17492.d: New test. * gdc.test/compilable/b9490.d: New test. * gdc.test/compilable/ice14739.d: New test. * gdc.test/fail_compilation/ice21060.d: New test. * gdc.test/fail_compilation/imports/ice21060a/package.d: New file. * gdc.test/fail_compilation/imports/ice21060b/package.d: New file. * gdc.test/fail_compilation/imports/ice21060c/package.d: New file. * gdc.test/fail_compilation/imports/ice21060d/package.d: New file. * gdc.test/runnable/b16278.d: New test.