summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/VERSION2
-rw-r--r--gcc/d/dmd/cparse.d10
-rw-r--r--gcc/d/dmd/declaration.h3
-rw-r--r--gcc/d/dmd/dinterpret.d17
-rw-r--r--gcc/d/dmd/dmangle.d6
-rw-r--r--gcc/d/dmd/func.d18
-rw-r--r--gcc/d/dmd/semantic3.d2
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/core/simd.d2
-rw-r--r--libphobos/src/MERGE2
11 files changed, 56 insertions, 10 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index d18119193d4..984e375479b 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-313d28b3db7523e67880ae3baf8ef28ce9abe9bd
+081d61e157f0064dc93c757d61cd998d3cb5288f
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/VERSION b/gcc/d/dmd/VERSION
index 2450fd55ef8..0ad60f92b8f 100644
--- a/gcc/d/dmd/VERSION
+++ b/gcc/d/dmd/VERSION
@@ -1 +1 @@
-v2.100.0-beta.1
+v2.100.0-rc.1
diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d
index 2b2046f3da3..56447869c36 100644
--- a/gcc/d/dmd/cparse.d
+++ b/gcc/d/dmd/cparse.d
@@ -1662,6 +1662,14 @@ final class CParser(AST) : Parser!AST
return;
}
+ if (!tspec)
+ {
+ error("no type for declarator before `%s`", token.toChars());
+ panic();
+ nextToken();
+ return;
+ }
+
if (tspec && specifier.mod & MOD.xconst)
{
tspec = toConst(tspec);
@@ -2498,7 +2506,7 @@ final class CParser(AST) : Parser!AST
private AST.Type cparseDeclarator(DTR declarator, AST.Type t,
out Identifier pident, ref Specifier specifier)
{
- //printf("cparseDeclarator(%d)\n", declarator);
+ //printf("cparseDeclarator(%d, %p)\n", declarator, t);
AST.Types constTypes; // all the Types that will need `const` applied to them
constTypes.setDim(0);
diff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h
index 441a966cf4d..7e51b057dc1 100644
--- a/gcc/d/dmd/declaration.h
+++ b/gcc/d/dmd/declaration.h
@@ -655,6 +655,7 @@ public:
bool isNRVO() const;
void isNRVO(bool v);
bool isNaked() const;
+ void isNaked(bool v);
bool isGenerated() const;
void isGenerated(bool v);
bool isIntroducing() const;
@@ -664,7 +665,9 @@ public:
bool hasDualContext() const;
bool hasAlwaysInlines() const;
bool isCrtCtor() const;
+ void isCrtCtor(bool v);
bool isCrtDtor() const;
+ void isCrtDtor(bool v);
virtual bool isNested() const;
AggregateDeclaration *isThis();
diff --git a/gcc/d/dmd/dinterpret.d b/gcc/d/dmd/dinterpret.d
index 3cfc07ab910..e96f1806982 100644
--- a/gcc/d/dmd/dinterpret.d
+++ b/gcc/d/dmd/dinterpret.d
@@ -674,8 +674,20 @@ private Expression interpretFunction(UnionExp* pue, FuncDeclaration fd, InterSta
}
}
// If fell off the end of a void function, return void
- if (!e && tf.next.ty == Tvoid)
- e = CTFEExp.voidexp;
+ if (!e)
+ {
+ if (tf.next.ty == Tvoid)
+ e = CTFEExp.voidexp;
+ else
+ {
+ /* missing a return statement can happen with C functions
+ * https://issues.dlang.org/show_bug.cgi?id=23056
+ */
+ fd.error("no return value from function");
+ e = CTFEExp.cantexp;
+ }
+ }
+
if (tf.isref && e.op == EXP.variable && e.isVarExp().var == fd.vthis)
e = thisarg;
if (tf.isref && fd.hasDualContext() && e.op == EXP.index)
@@ -695,7 +707,6 @@ private Expression interpretFunction(UnionExp* pue, FuncDeclaration fd, InterSta
}
}
}
- assert(e !is null);
// Leave the function
--ctfeGlobals.callDepth;
diff --git a/gcc/d/dmd/dmangle.d b/gcc/d/dmd/dmangle.d
index 1f895e03af0..3d9730348f5 100644
--- a/gcc/d/dmd/dmangle.d
+++ b/gcc/d/dmd/dmangle.d
@@ -1335,9 +1335,13 @@ void realToMangleBuffer(OutBuffer* buf, real_t value)
private
extern (D) const(char)[] externallyMangledIdentifier(Declaration d)
{
+ assert(!d.mangleOverride, "mangle overrides should have been handled earlier");
+
const par = d.toParent(); //toParent() skips over mixin templates
if (!par || par.isModule() || d.linkage == LINK.cpp ||
- (d.linkage == LINK.c && d.isCsymbol() && d.isFuncDeclaration()))
+ (d.linkage == LINK.c && d.isCsymbol() &&
+ (d.isFuncDeclaration() ||
+ (d.isVarDeclaration() && d.isDataseg() && d.storage_class & STC.extern_))))
{
if (d.linkage != LINK.d && d.localNum)
d.error("the same declaration cannot be in multiple scopes with non-D linkage");
diff --git a/gcc/d/dmd/func.d b/gcc/d/dmd/func.d
index 8d8395188b6..2e9c2bff1e0 100644
--- a/gcc/d/dmd/func.d
+++ b/gcc/d/dmd/func.d
@@ -1474,6 +1474,12 @@ extern (C++) class FuncDeclaration : Declaration
return !!(this.flags & FUNCFLAG.naked);
}
+ final void isNaked(bool v) @safe pure nothrow @nogc
+ {
+ if (v) this.flags |= FUNCFLAG.naked;
+ else this.flags &= ~FUNCFLAG.naked;
+ }
+
final bool isGenerated() const scope @safe pure nothrow @nogc
{
return !!(this.flags & FUNCFLAG.generated);
@@ -1520,11 +1526,23 @@ extern (C++) class FuncDeclaration : Declaration
return !!(this.flags & FUNCFLAG.CRTCtor);
}
+ final void isCrtCtor(bool v) @safe pure nothrow @nogc
+ {
+ if (v) this.flags |= FUNCFLAG.CRTCtor;
+ else this.flags &= ~FUNCFLAG.CRTCtor;
+ }
+
final bool isCrtDtor() const scope @safe pure nothrow @nogc
{
return !!(this.flags & FUNCFLAG.CRTDtor);
}
+ final void isCrtDtor(bool v) @safe pure nothrow @nogc
+ {
+ if (v) this.flags |= FUNCFLAG.CRTDtor;
+ else this.flags &= ~FUNCFLAG.CRTDtor;
+ }
+
/**************************************
* The function is doing something that may allocate with the GC,
* so mark it as not nogc (not no-how).
diff --git a/gcc/d/dmd/semantic3.d b/gcc/d/dmd/semantic3.d
index 511957649f7..2e459b1857f 100644
--- a/gcc/d/dmd/semantic3.d
+++ b/gcc/d/dmd/semantic3.d
@@ -327,7 +327,7 @@ private extern(C++) final class Semantic3Visitor : Visitor
sc2.scontinue = null;
sc2.sw = null;
sc2.fes = funcdecl.fes;
- sc2.linkage = LINK.d;
+ sc2.linkage = funcdecl.isCsymbol() ? LINK.c : LINK.d;
sc2.stc &= STC.flowThruFunction;
sc2.visibility = Visibility(Visibility.Kind.public_);
sc2.explicitVisibility = 0;
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index c94634f4770..9bab8ed6395 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-e361d200b287a68344095f306cf5ea3a63c080e1
+9c0d4f914e0817c9ee4eafc5a45c41130aa6b981
The first line of this file holds the git revision number of the last
merge done from the dlang/druntime repository.
diff --git a/libphobos/libdruntime/core/simd.d b/libphobos/libdruntime/core/simd.d
index 11a47118319..94b230d1493 100644
--- a/libphobos/libdruntime/core/simd.d
+++ b/libphobos/libdruntime/core/simd.d
@@ -480,6 +480,7 @@ version (D_SIMD)
/*****
* For "store" operations of the form:
* op1 op= op2
+ * such as MOVLPS.
* Returns:
* op2
* These cannot be marked as pure, as semantic() doesn't check them.
@@ -487,6 +488,7 @@ version (D_SIMD)
@safe void16 __simd_sto(XMM opcode, void16 op1, void16 op2);
@safe void16 __simd_sto(XMM opcode, double op1, void16 op2); ///
@safe void16 __simd_sto(XMM opcode, float op1, void16 op2); ///
+ @safe void16 __simd_sto(XMM opcode, void16 op1, long op2); ///
///
unittest
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE
index 3218ace50a0..c51d237983d 100644
--- a/libphobos/src/MERGE
+++ b/libphobos/src/MERGE
@@ -1,4 +1,4 @@
-ac296f80cda437483b743f953dc69cb1271c82df
+dba1bbe271a9b2d7f24edeebbc77846e29904e41
The first line of this file holds the git revision number of the last
merge done from the dlang/phobos repository.