d: Fix alias protection being ignored if used before declaration.
Fixes a symbol resolver bug where a private alias becomes public if used
before its declaration.
gcc/d/ChangeLog:
2020-10-12 Iain Buclaw <ibuclaw@gdcproject.org>
* dmd/declaration.c (AliasDeclaration::aliasSemantic): Apply storage
class and protection attributes.
gcc/testsuite/ChangeLog:
2020-10-12 Iain Buclaw <ibuclaw@gdcproject.org>
* gdc.test/fail_compilation/fail21001.d: New test.
* gdc.test/fail_compilation/imports/fail21001b.d: New test.
* gdc.test/fail_compilation/imports/issue21295ast_node.d: New test.
* gdc.test/fail_compilation/imports/issue21295astcodegen.d: New test.
* gdc.test/fail_compilation/imports/issue21295dtemplate.d: New test.
* gdc.test/fail_compilation/imports/issue21295visitor.d: New test.
* gdc.test/fail_compilation/issue21295.d: New test.
(cherry picked from commit
c3249210b0108b5fc2dc403e558ab63882293be4)