aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-10-11 22:20:43 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-10-12 12:14:47 +0200
commit893f9543bff19aa3be07fff05bf1abf6a0b8dd56 (patch)
treea135603beb9eeb81b83fc89da164a22bdf0ba2aa /gcc/d/dmd
parent19f6b41a3a12c67ccbc51c5b729954c4ccaf1176 (diff)
downloadgcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.zip
gcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.tar.gz
gcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.tar.bz2
d: Merge upstream dmd 70aabfb51
Fixes a symbol resolver bug where a private alias becomes public if used before its declaration. Reviewed-on: https://github.com/dlang/dmd/pull/11831 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 70aabfb51
Diffstat (limited to 'gcc/d/dmd')
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/declaration.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index 8a59cbd..5f6193f 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-3a979052509fff8170ba80e48817377a60e78eb3
+70aabfb511d55f2bfbdccbac7868519d9d4b63da
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/declaration.c b/gcc/d/dmd/declaration.c
index 08b2950..f490cc5 100644
--- a/gcc/d/dmd/declaration.c
+++ b/gcc/d/dmd/declaration.c
@@ -340,6 +340,13 @@ void AliasDeclaration::semantic(Scope *sc)
void AliasDeclaration::aliasSemantic(Scope *sc)
{
//printf("AliasDeclaration::semantic() %s\n", toChars());
+
+ // as AliasDeclaration::semantic, in case we're called first.
+ // see https://issues.dlang.org/show_bug.cgi?id=21001
+ storage_class |= sc->stc & STCdeprecated;
+ protection = sc->protection;
+ userAttribDecl = sc->userAttribDecl;
+
// TypeTraits needs to know if it's located in an AliasDeclaration
sc->flags |= SCOPEalias;