{"id":2223065,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2223065/?format=json","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.0/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20260414101327.63245-1-ibuclaw@gdcproject.org>","date":"2026-04-14T10:13:27","name":"d: Merge upstream dmd, druntime e145b91245","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"91897ba6d8222c405d63ae6ab5fbe06831f7b364","submitter":{"id":46728,"url":"http://patchwork.ozlabs.org/api/1.0/people/46728/?format=json","name":"Iain Buclaw","email":"ibuclaw@gdcproject.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20260414101327.63245-1-ibuclaw@gdcproject.org/mbox/","series":[{"id":499813,"url":"http://patchwork.ozlabs.org/api/1.0/series/499813/?format=json","date":"2026-04-14T10:13:27","name":"d: Merge upstream dmd, druntime e145b91245","version":1,"mbox":"http://patchwork.ozlabs.org/series/499813/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223065/checks/","tags":{},"headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gdcproject.org header.i=@gdcproject.org\n header.a=rsa-sha256 header.s=MBO0001 header.b=zQSoZUoV;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=gdcproject.org header.i=@gdcproject.org\n header.a=rsa-sha256 header.s=MBO0001 header.b=zQSoZUoV","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=gdcproject.org","sourceware.org; spf=pass smtp.mailfrom=gdcproject.org","server2.sourceware.org;\n arc=none smtp.remote-ip=80.241.56.151","outgoing_mbo_mout; dkim=none;\n spf=pass (outgoing_mbo_mout: domain of ibuclaw@gdcproject.org designates\n 2001:67c:2050:b231:465::102 as permitted sender)\n smtp.mailfrom=ibuclaw@gdcproject.org"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw0Vm0KdTz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 20:14:06 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id B8DA44BA2E2D\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 10:14:04 +0000 (GMT)","from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151])\n by sourceware.org (Postfix) with ESMTPS id 661EB4BA2E07\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 10:13:33 +0000 (GMT)","from smtp102.mailbox.org (smtp102.mailbox.org\n [IPv6:2001:67c:2050:b231:465::102])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4fw0V20nX5z9tJx;\n Tue, 14 Apr 2026 12:13:30 +0200 (CEST)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org B8DA44BA2E2D","OpenDKIM Filter v2.11.0 sourceware.org 661EB4BA2E07"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 661EB4BA2E07","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 661EB4BA2E07","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776161613; cv=none;\n b=XtRLZWXgv4NdWzJXfNYfaH57WDd/kmC0pFKjN3TUxhXJd+D9Yf2sePDENryygaVqaLnglG6dFXSTwAiLwoAgRetsVUQb+CGEJ6TDghMFnLS3ZVw4d+U79BYjRciPIkXt/kthNJLxPV9vdhk1+UoQDO6jdbyHAxUm1PAVu2OdCTc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776161613; c=relaxed/simple;\n bh=DfpvXCEip41xnsfvLCCFKe6pq+97nFtKidsdRthOKQY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Hh1wK8+VpINz3Jajdcm2BswdxbfDhtDJY1uPy/1eakpmbQB9XJBdIcKUNtjM2rJgkWiXFmlkbWducMQf0n4HkTRz/q8BpfmJafIR932hRekMDW6/NRLSN9Q0u2+VUbK+cVtaY7akxgqnBMugKSxZE+JQdNIb7INEylB+5r4JI+g=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gdcproject.org;\n s=MBO0001; t=1776161610;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=N5zrEej+F02qzXWmYkXYR1fBPhj/Z+SO6AluITSVbvs=;\n b=zQSoZUoVnsgi9WtvCftgbM9IdxGdKoU+WmdGSi4faHm51PzPEjCfxEae9p0mgK6mbCwdPL\n t0UsrP4eVPyE3YLdWhnomYFWVWbBWvaZRcPJM7l+T2L71uWZaXlmWXOxpxIYYK0QnZiVYs\n tmgwtHkXCx0s2wQA97dRp41wXAXRjZvwtiqlOY2UPlGCVeOaHqi4xMWh5AoeKCEOd5/m8N\n fP8KR9Jw2cA6ZnWE8yQ1iKXZ1KAajuuVyr0De1HErvKq+TL3Vjbu4zWIpaboIr8n8f8rc2\n EUfXqH2ygcW5MKAUGtHTqz49rujfs0d1S1qoEgVEklcvlgm4fHphvjjRrPp7lg==","From":"Iain Buclaw <ibuclaw@gdcproject.org>","To":"gcc-patches@gcc.gnu.org","Cc":"Iain Buclaw <ibuclaw@gdcproject.org>","Subject":"[PATCH] d: Merge upstream dmd, druntime e145b91245","Date":"Tue, 14 Apr 2026 12:13:27 +0200","Message-ID":"<20260414101327.63245-1-ibuclaw@gdcproject.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Rspamd-Queue-Id":"4fw0V20nX5z9tJx","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"Hi,\n\nThis patch merges the D front-end upstream dmd e145b91245.\n\nImports latest bug fixes from the v2.113.0 release branch.\n\nBootstrapped and regtested on x86_64-linux-gnu, committed to mainline.\n\nRegards,\nIain.\n\n---\ngcc/d/ChangeLog:\n\n\t* dmd/MERGE: Merge upstream dmd e145b91245.\n\nlibphobos/ChangeLog:\n\n\t* libdruntime/MERGE: Merge upstream druntime e145b91245.\n---\n gcc/d/dmd/MERGE                               |  2 +-\n gcc/d/dmd/constfold.d                         |  2 +-\n gcc/d/dmd/declaration.h                       |  2 +-\n gcc/d/dmd/dsymbolsem.d                        | 40 +++++++++++-\n gcc/d/dmd/globals.d                           |  2 +-\n gcc/d/dmd/globals.h                           |  2 +-\n gcc/d/dmd/scope.h                             |  2 -\n gcc/d/dmd/statementsem.d                      | 15 +++--\n gcc/d/dmd/templatesem.d                       |  7 +--\n gcc/d/dmd/typesem.d                           | 15 ++++-\n gcc/testsuite/gdc.test/compilable/test21839.d | 10 +++\n gcc/testsuite/gdc.test/compilable/test8717.d  |  4 +-\n .../gdc.test/fail_compilation/diag10783.d     |  5 +-\n .../gdc.test/fail_compilation/diag9358.d      |  6 +-\n .../gdc.test/fail_compilation/fail22925.d     | 40 ++++++++++++\n .../gdc.test/fail_compilation/staticarray.d   | 61 ++++++++++++++++++-\n .../fail_compilation/test_switch_error.d      | 10 +--\n libphobos/libdruntime/MERGE                   |  2 +-\n libphobos/libdruntime/core/sys/posix/signal.d | 39 ++++++++++++\n 19 files changed, 223 insertions(+), 43 deletions(-)\n create mode 100644 gcc/testsuite/gdc.test/compilable/test21839.d\n create mode 100644 gcc/testsuite/gdc.test/fail_compilation/fail22925.d","diff":"diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE\nindex a5b457e873c..eac1d04c8c6 100644\n--- a/gcc/d/dmd/MERGE\n+++ b/gcc/d/dmd/MERGE\n@@ -1,4 +1,4 @@\n-662104f52607c175ecb80633bd261932aa004561\n+e145b9124523d1fecd55e0702003ef86947eb745\n \n The first line of this file holds the git revision number of the last\n merge done from the dlang/dmd repository.\ndiff --git a/gcc/d/dmd/constfold.d b/gcc/d/dmd/constfold.d\nindex 1dc6c4ca2de..2a43c8e2753 100644\n--- a/gcc/d/dmd/constfold.d\n+++ b/gcc/d/dmd/constfold.d\n@@ -1267,7 +1267,7 @@ UnionExp Slice(Type type, Expression e1, Expression lwr, Expression upr)\n         {\n             auto elements = new Expressions(cast(size_t)(iupr - ilwr));\n             memcpy(elements.tdata(), es1.elements.tdata() + ilwr, cast(size_t)(iupr - ilwr) * ((*es1.elements)[0]).sizeof);\n-            emplaceExp!(ArrayLiteralExp)(&ue, e1.loc, type, elements);\n+            emplaceExp!(ArrayLiteralExp)(&ue, e1.loc, type, es1.basis, elements);\n         }\n     }\n     else\ndiff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h\nindex 759e533543d..1fa3ebd776d 100644\n--- a/gcc/d/dmd/declaration.h\n+++ b/gcc/d/dmd/declaration.h\n@@ -45,7 +45,7 @@ namespace dmd\n     bool equals(const Dsymbol * const ds, const Dsymbol * const s);\n     bool hasNestedFrameRefs(FuncDeclaration *fd);\n     bool isVirtualMethod(FuncDeclaration *fd);\n-    bool isVirtual(const FuncDeclaration *fd);\n+    bool isVirtual(const FuncDeclaration * const fd);\n }\n \n //enum STC : ulong from astenums.d:\ndiff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d\nindex 16709bc1136..daa3bab6b8b 100644\n--- a/gcc/d/dmd/dsymbolsem.d\n+++ b/gcc/d/dmd/dsymbolsem.d\n@@ -2389,6 +2389,24 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor\n             return true;\n         }\n \n+        static bool shouldTryDeepSArrayDimInference(Expression ie, Scope* sc)\n+        {\n+            if (!ie)\n+                return false;\n+\n+            // `new` expressions cannot provide a compile-time static extent\n+            // for inferring `$`, and may recurse through incomplete aggregates.\n+            if (ie.isNewExp())\n+                return false;\n+\n+            // Field initializers are especially prone to recursive semantic\n+            // evaluation against incompletely defined aggregates.\n+            if (sc && sc.parent && sc.parent.isAggregateDeclaration())\n+                return false;\n+\n+            return true;\n+        }\n+\n         auto tsa = dsym.type.isTypeSArray();\n \n         if (tsa && hasDollarDimension(tsa))\n@@ -2397,19 +2415,37 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor\n             {\n                 .error(dsym.loc, \"cannot infer static array length from `$`, provide an initializer\");\n                 tsa.dim = new IntegerExp(dsym.loc, 0, Type.tsize_t);\n+                dsym._init = new ErrorInitializer();\n+                dsym.type = Type.terror;\n+                dsym.errors = true;\n+                dsym.semanticRun = PASS.semanticdone;\n+                return;\n             }\n             else\n             {\n                 Expression ie = dsym._init.initializerToExpression(null, sc.inCfile);\n                 if (ie && ie.op != EXP.error)\n                 {\n-                    ie = ie.expressionSemantic(sc);\n-                    ie = ie.optimize(WANTvalue);\n+                    // Infer from literal syntax first to avoid prematurely\n+                    // semantic-analyzing expressions that may depend on\n+                    // incomplete types (e.g. recursive initializers).\n+                    // https://github.com/dlang/dmd/issues/22887\n                     bool dimInferred = inferSArrayDim(tsa, ie, dsym.loc, sc);\n+                    if (!dimInferred && shouldTryDeepSArrayDimInference(ie, sc))\n+                    {\n+                        ie = ie.expressionSemantic(sc);\n+                        ie = ie.optimize(WANTvalue);\n+                        dimInferred = inferSArrayDim(tsa, ie, dsym.loc, sc);\n+                    }\n                     if (!dimInferred)\n                     {\n                         .error(dsym.loc, \"cannot infer static array length from `$`, provide an initializer\");\n                         tsa.dim = new IntegerExp(dsym.loc, 0, Type.tsize_t);\n+                        dsym._init = new ErrorInitializer();\n+                        dsym.type = Type.terror;\n+                        dsym.errors = true;\n+                        dsym.semanticRun = PASS.semanticdone;\n+                        return;\n                     }\n                     if (auto ale = ie.isArrayLiteralExp())\n                         dsym._init = new ExpInitializer(dsym.loc, ale);\ndiff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d\nindex 020d24786cb..bdb2ff42af9 100644\n--- a/gcc/d/dmd/globals.d\n+++ b/gcc/d/dmd/globals.d\n@@ -181,7 +181,7 @@ extern (C++) struct Param\n     bool addMain;           // add a default main() function\n     bool allInst;           // generate code for all template instantiations\n     bool bitfields = true;  // support C style bit fields\n-    bool rewriteNoExceptionToSeq; // Allow finally statements that do not throw an Exception\n+    bool nothrowOptimizations; // Allow finally statements that do not throw an Exception\n                                   // in try body to rewrite to a sequence.\n \n     CppStdRevision cplusplus = CppStdRevision.cpp11;    // version of C++ standard to support\ndiff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h\nindex 40894f256a6..626ce1bde9b 100644\n--- a/gcc/d/dmd/globals.h\n+++ b/gcc/d/dmd/globals.h\n@@ -205,7 +205,7 @@ struct Param\n     d_bool addMain;       // add a default main() function\n     d_bool allInst;       // generate code for all template instantiations\n     d_bool bitfields;         // support C style bit fields\n-    d_bool rewriteNoExceptionToSeq;\n+    d_bool nothrowOptimizations;\n     CppStdRevision cplusplus;  // version of C++ name mangling to support\n \n     Help help;\ndiff --git a/gcc/d/dmd/scope.h b/gcc/d/dmd/scope.h\nindex 94eeee803dd..4ca980a2c16 100644\n--- a/gcc/d/dmd/scope.h\n+++ b/gcc/d/dmd/scope.h\n@@ -138,6 +138,4 @@ struct Scope final\n     AliasDeclaration *aliasAsg; // if set, then aliasAsg is being assigned a new value,\n                                 // do not set wasRead for it\n     StructDeclaration *argStruct; // elimiate recursion when looking for rvalue construction\n-\n-    Dsymbol *search(Loc loc, Identifier *ident, Dsymbol *&pscopesym, SearchOptFlags flags = (SearchOptFlags)SearchOpt::all);\n };\ndiff --git a/gcc/d/dmd/statementsem.d b/gcc/d/dmd/statementsem.d\nindex 2f7b442d3a5..6c9f4ae4997 100644\n--- a/gcc/d/dmd/statementsem.d\n+++ b/gcc/d/dmd/statementsem.d\n@@ -1898,8 +1898,8 @@ Statement statementSemanticVisit(Statement s, Scope* sc)\n             ss.condition = ErrorExp.get();\n         ss.condition = ss.condition.optimize(WANTvalue);\n         ss.condition = ss.condition.checkGC(sc);\n-        if (ss.condition.op == EXP.error)\n-            conditionError = true;\n+        if (conditionError || ss.condition.op == EXP.error)\n+            return setError();\n \n         bool needswitcherror = false;\n \n@@ -1915,7 +1915,7 @@ Statement statementSemanticVisit(Statement s, Scope* sc)\n         ss._body = ss._body.statementSemantic(sc);\n         sc.inLoop = inLoopSave;\n \n-        if (conditionError || (ss._body && ss._body.isErrorStatement()))\n+        if (ss._body && ss._body.isErrorStatement())\n         {\n             sc.pop();\n             return setError();\n@@ -2357,6 +2357,13 @@ Statement statementSemanticVisit(Statement s, Scope* sc)\n             lval = fval + 256;\n         }\n \n+        // If the first and last values aren't integer types, then the toInteger()\n+        // call above would have resulted in an error.\n+        if  (!crs.first.type.isIntegral() || !crs.last.type.isIntegral())\n+        {\n+            errors = true;\n+        }\n+\n         if (errors)\n             return setError();\n \n@@ -3491,7 +3498,7 @@ Statement statementSemanticVisit(Statement s, Scope* sc)\n         // Don't care about paths that halt, either\n         // Only rewrite if it was requested.\n         // This has side effects where Error will not run destructors, unsafe.\n-        if (global.params.rewriteNoExceptionToSeq && (blockexit & ~BE.halt) == BE.fallthru)\n+        if (global.params.nothrowOptimizations && (blockexit & ~BE.halt) == BE.fallthru)\n         {\n             result = new CompoundStatement(tfs.loc, tfs._body, tfs.finalbody);\n             return;\ndiff --git a/gcc/d/dmd/templatesem.d b/gcc/d/dmd/templatesem.d\nindex 304a7a8fd1f..905ec2b787b 100644\n--- a/gcc/d/dmd/templatesem.d\n+++ b/gcc/d/dmd/templatesem.d\n@@ -7550,12 +7550,7 @@ MATCH deduceType(scope RootObject o, scope Scope* sc, scope Type tparam,\n         override void visit(ArrayLiteralExp e)\n         {\n             // https://issues.dlang.org/show_bug.cgi?id=20092\n-            if (e.elements && e.elements.length && e.type.toBasetype().nextOf().ty == Tvoid)\n-            {\n-                result = deduceEmptyArrayElement();\n-                return;\n-            }\n-            if ((!e.elements || !e.elements.length) && e.type.toBasetype().nextOf().ty == Tvoid && tparam.ty == Tarray)\n+            if (e.type.toBasetype().nextOf().ty == Tvoid && tparam.ty == Tarray)\n             {\n                 // tparam:T[] <- e:[] (void[])\n                 result = deduceEmptyArrayElement();\ndiff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d\nindex 34bb80cf03c..67873afdbb4 100644\n--- a/gcc/d/dmd/typesem.d\n+++ b/gcc/d/dmd/typesem.d\n@@ -466,15 +466,15 @@ void check(Type _this)\n  */\n private void fixTo(Type _this, Type t)\n {\n-    // If fixing this: immutable(T*) by t: immutable(T)*,\n-    // cache t to this.xto won't break transitivity.\n     Type mto = null;            // the naked type of `t`\n-    Type tn = _this.nextOf();\n     if (_this.mod || t.mod)\n     {\n         _this.getMcache();\n         t.getMcache();\n     }\n+    // If fixing this: immutable(T*) by t: immutable(T)*,\n+    // cache t to this.xto won't break transitivity.\n+    Type tn = _this.nextOf();\n     if (!tn || _this.ty != Tsarray && tn.mod == t.nextOf().mod)\n     {\n         switch (t.mod)\n@@ -8529,6 +8529,15 @@ Type immutableOf(Type type)\n \n /********************************\n  * Make type mutable.\n+ *      0            => 0\n+ *      const        => 0\n+ *      immutable    => 0\n+ *      shared       => shared\n+ *      shared const => shared\n+ *      wild         => 0\n+ *      wild const   => 0\n+ *      shared wild  => shared\n+ *      shared wild const => shared\n  */\n Type mutableOf(Type type)\n {\ndiff --git a/gcc/testsuite/gdc.test/compilable/test21839.d b/gcc/testsuite/gdc.test/compilable/test21839.d\nnew file mode 100644\nindex 00000000000..9fad4aee9ff\n--- /dev/null\n+++ b/gcc/testsuite/gdc.test/compilable/test21839.d\n@@ -0,0 +1,10 @@\n+// https://github.com/dlang/dmd/issues/21839\n+// ICE with void[N].init passed to template function\n+\n+void tf(U)(U) {}\n+\n+void test()\n+{\n+    tf(void[16].init);\n+    tf(void[8].init);\n+}\ndiff --git a/gcc/testsuite/gdc.test/compilable/test8717.d b/gcc/testsuite/gdc.test/compilable/test8717.d\nindex 26a2866c682..455d72c14cc 100644\n--- a/gcc/testsuite/gdc.test/compilable/test8717.d\n+++ b/gcc/testsuite/gdc.test/compilable/test8717.d\n@@ -60,4 +60,6 @@ static if(SPT.init.sii != 1) { static assert(0); }\n static if(SPT.sf() != 1) { static assert(0); }\n static if(SPT.init.f() != 1) { static assert(0); }\n \n-void main() { }\n+// https://github.com/dlang/dmd/issues/22699\n+struct S{ int[8] e; }\n+static assert(S().e[0..4] == S.init.e[0..4]);\ndiff --git a/gcc/testsuite/gdc.test/fail_compilation/diag10783.d b/gcc/testsuite/gdc.test/fail_compilation/diag10783.d\nindex e69eddbec03..17ebe95970d 100644\n--- a/gcc/testsuite/gdc.test/fail_compilation/diag10783.d\n+++ b/gcc/testsuite/gdc.test/fail_compilation/diag10783.d\n@@ -1,9 +1,8 @@\n /*\n TEST_OUTPUT:\n ---\n-fail_compilation/diag10783.d(15): Error: no property `type` for `event` of type `diag10783.Event`\n-fail_compilation/diag10783.d(10):        struct `Event` defined here\n-fail_compilation/diag10783.d(15): Error: undefined identifier `En`\n+fail_compilation/diag10783.d(14): Error: no property `type` for `event` of type `diag10783.Event`\n+fail_compilation/diag10783.d(9):        struct `Event` defined here\n ---\n */\n \ndiff --git a/gcc/testsuite/gdc.test/fail_compilation/diag9358.d b/gcc/testsuite/gdc.test/fail_compilation/diag9358.d\nindex 58dd495ab8e..55f55ada144 100644\n--- a/gcc/testsuite/gdc.test/fail_compilation/diag9358.d\n+++ b/gcc/testsuite/gdc.test/fail_compilation/diag9358.d\n@@ -1,10 +1,8 @@\n /*\n TEST_OUTPUT:\n ---\n-fail_compilation/diag9358.d(13): Error: `x` must be of integral or string type, it is a `double`\n-fail_compilation/diag9358.d(15): Error: `case` expression must be a compile-time `string` or an integral constant, not `1.1`\n-fail_compilation/diag9358.d(16): Error: `case` expression must be a compile-time `string` or an integral constant, not `2.1`\n-fail_compilation/diag9358.d(26): Error: `case` expression must be a compile-time `string` or an integral constant, not `z`\n+fail_compilation/diag9358.d(11): Error: `x` must be of integral or string type, it is a `double`\n+fail_compilation/diag9358.d(24): Error: `case` expression must be a compile-time `string` or an integral constant, not `z`\n ---\n */\n void main()\ndiff --git a/gcc/testsuite/gdc.test/fail_compilation/fail22925.d b/gcc/testsuite/gdc.test/fail_compilation/fail22925.d\nnew file mode 100644\nindex 00000000000..6341a02158a\n--- /dev/null\n+++ b/gcc/testsuite/gdc.test/fail_compilation/fail22925.d\n@@ -0,0 +1,40 @@\n+/*\n+TEST_OUTPUT:\n+---\n+fail_compilation/fail22925.d(15): Error: integer constant expression expected instead of `\"s\"`\n+fail_compilation/fail22925.d(15): Error: integer constant expression expected instead of `\"z\"`\n+fail_compilation/fail22925.d(23): Error: `s` must be of integral or string type, it is a `real`\n+fail_compilation/fail22925.d(35): Error: cannot implicitly convert expression `2.8` of type `double` to `int`\n+fail_compilation/fail22925.d(35): Error: cannot implicitly convert expression `4.2` of type `double` to `int`\n+---\n+*/\n+void test1(string s)\n+{\n+    switch (s)\n+    {\n+        case \"s\": .. case \"z\":\n+            break;\n+        default:\n+            break;\n+    }\n+}\n+void test2(real s)\n+{\n+    switch (s)\n+    {\n+        case 1.0: .. case 2.7:\n+            break;\n+        default:\n+            break;\n+    }\n+}\n+void test3(int s)\n+{\n+    switch (s)\n+    {\n+        case 2.8: .. case 4.2:\n+            break;\n+        default:\n+            break;\n+    }\n+}\ndiff --git a/gcc/testsuite/gdc.test/fail_compilation/staticarray.d b/gcc/testsuite/gdc.test/fail_compilation/staticarray.d\nindex 87b16ef360f..768c64f728f 100644\n--- a/gcc/testsuite/gdc.test/fail_compilation/staticarray.d\n+++ b/gcc/testsuite/gdc.test/fail_compilation/staticarray.d\n@@ -1,12 +1,67 @@\n /*\n TEST_OUTPUT:\n ---\n-fail_compilation/staticarray.d(10): Error: cannot infer static array length from `$`, provide an initializer\n-fail_compilation/staticarray.d(11): Error: cannot infer static array length from `$`, provide an initializer\n-fail_compilation/staticarray.d(12): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(24): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(25): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(26): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(29): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(27): Error: struct `staticarray.ForwardRef1` circular or forward reference\n+fail_compilation/staticarray.d(38): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(36): Error: struct `staticarray.ForwardRef3` circular or forward reference\n+fail_compilation/staticarray.d(43): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(41): Error: struct `staticarray.ForwardRef4` circular or forward reference\n+fail_compilation/staticarray.d(50): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(47): Error: struct `staticarray.ForwardRef5` circular or forward reference\n+fail_compilation/staticarray.d(55): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(53): Error: struct `staticarray.ForwardRef6` circular or forward reference\n+fail_compilation/staticarray.d(60): Error: cannot infer static array length from `$`, provide an initializer\n+fail_compilation/staticarray.d(58): Error: struct `staticarray.ForwardRef7` circular or forward reference\n+fail_compilation/staticarray.d(66): Error: struct `staticarray.ForwardRef8` cannot have field `arr` with static array of same struct type\n+fail_compilation/staticarray.d(33): Error: variable `staticarray.ForwardRef2.arr` recursive initialization of field\n ---\n */\n \n int[$] arr1;\n int[$] arr2 = void;\n int[$][1] arr3 = 1;\n+struct ForwardRef1\n+{\n+    ForwardRef1[$] arr = new ForwardRef1();\n+}\n+struct ForwardRef2\n+{\n+    ForwardRef2*[$] arr = [new ForwardRef2()];\n+}\n+\n+struct ForwardRef3\n+{\n+    ForwardRef3[$] arr = ForwardRef3.init;\n+}\n+\n+struct ForwardRef4\n+{\n+    ForwardRef4[$] arr = make();\n+    static ForwardRef4 make() { return ForwardRef4.init; }\n+}\n+\n+struct ForwardRef5\n+{\n+    enum bool flag = true;\n+    ForwardRef5[$] arr = flag ? ForwardRef5.init : ForwardRef5.init;\n+}\n+\n+struct ForwardRef6\n+{\n+    ForwardRef6[$] arr = (0, ForwardRef6.init);\n+}\n+\n+struct ForwardRef7\n+{\n+    ForwardRef7[$] arr = make();\n+    static ForwardRef7[] make() { return [ForwardRef7.init]; }\n+}\n+\n+struct ForwardRef8\n+{\n+    ForwardRef8[$][$] arr = [[ForwardRef8.init]];\n+}\ndiff --git a/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d b/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d\nindex 41b6e52545e..637570c2c26 100644\n--- a/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d\n+++ b/gcc/testsuite/gdc.test/fail_compilation/test_switch_error.d\n@@ -2,9 +2,7 @@\n https://issues.dlang.org/show_bug.cgi?id=22514\n TEST_OUTPUT:\n ---\n-fail_compilation/test_switch_error.d(13): Error: undefined identifier `doesNotExist`\n-fail_compilation/test_switch_error.d(16): Error: undefined identifier `alsoDoesNotExits`\n-fail_compilation/test_switch_error.d(19): Error: duplicate `case 2` in `switch` statement\n+fail_compilation/test_switch_error.d(11): Error: undefined identifier `doesNotExist`\n ---\n ++/\n \n@@ -104,10 +102,6 @@ void test5(int i)\n TEST_OUTPUT:\n ---\n fail_compilation/test_switch_error.d(513): Error: undefined identifier `undefinedFunc`\n-fail_compilation/test_switch_error.d(517): Error: `case` expression must be a compile-time `string` or an integral constant, not `Strukt(1)`\n-fail_compilation/test_switch_error.d(518): Error: `case` variables have to be `const` or `immutable`\n-fail_compilation/test_switch_error.d(518): Error: `case` variables not allowed in `final switch` statements\n-fail_compilation/test_switch_error.d(519): Error: `case` variables not allowed in `final switch` statements\n fail_compilation/test_switch_error.d(522): Error: undefined identifier `undefinedFunc2`\n ---\n ++/\n@@ -144,8 +138,6 @@ void errorsWithErrors(int param, immutable int constant)\n TEST_OUTPUT:\n ---\n fail_compilation/test_switch_error.d(622): Error: undefined identifier `undefinedFunc`\n-fail_compilation/test_switch_error.d(624): Error: `case` expression must be a compile-time `string` or an integral constant, not `SubtypeOfInt(2)`\n-fail_compilation/test_switch_error.d(625): Error: `case` expression must be a compile-time `string` or an integral constant, not `SubtypeOfIntMethod()`\n ---\n ++/\n #line 600\ndiff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE\nindex a5b457e873c..eac1d04c8c6 100644\n--- a/libphobos/libdruntime/MERGE\n+++ b/libphobos/libdruntime/MERGE\n@@ -1,4 +1,4 @@\n-662104f52607c175ecb80633bd261932aa004561\n+e145b9124523d1fecd55e0702003ef86947eb745\n \n The first line of this file holds the git revision number of the last\n merge done from the dlang/dmd repository.\ndiff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d\nindex 94ddd0403da..ffa88f48f14 100644\n--- a/libphobos/libdruntime/core/sys/posix/signal.d\n+++ b/libphobos/libdruntime/core/sys/posix/signal.d\n@@ -414,6 +414,30 @@ version (linux)\n         enum SIGUSR2    = 12;\n         enum SIGURG     = 23;\n     }\n+    else version (Emscripten)\n+    {\n+        //SIGABRT (defined in core.stdc.signal)\n+        enum SIGALRM    = 14;\n+        enum SIGBUS     = 7;\n+        enum SIGCHLD    = 17;\n+        enum SIGCONT    = 18;\n+        //SIGFPE (defined in core.stdc.signal)\n+        enum SIGHUP     = 1;\n+        //SIGILL (defined in core.stdc.signal)\n+        //SIGINT (defined in core.stdc.signal)\n+        enum SIGKILL    = 9;\n+        enum SIGPIPE    = 13;\n+        enum SIGQUIT    = 3;\n+        //SIGSEGV (defined in core.stdc.signal)\n+        enum SIGSTOP    = 19;\n+        //SIGTERM (defined in core.stdc.signal)\n+        enum SIGTSTP    = 20;\n+        enum SIGTTIN    = 21;\n+        enum SIGTTOU    = 22;\n+        enum SIGUSR1    = 10;\n+        enum SIGUSR2    = 12;\n+        enum SIGURG     = 23;\n+    }\n     else\n         static assert(0, \"unimplemented\");\n }\n@@ -1784,6 +1808,16 @@ version (linux)\n         enum SIGXCPU    = 24;\n         enum SIGXFSZ    = 25;\n     }\n+    else version (Emscripten)\n+    {\n+        enum SIGPOLL    = 29;\n+        enum SIGPROF    = 27;\n+        enum SIGSYS     = 31;\n+        enum SIGTRAP    = 5;\n+        enum SIGVTALRM  = 26;\n+        enum SIGXCPU    = 24;\n+        enum SIGXFSZ    = 25;\n+    }\n     else\n         static assert(0, \"unimplemented\");\n \n@@ -2768,6 +2802,11 @@ else version (CRuntime_Musl)\n         enum MINSIGSTKSZ = 2048;\n         enum SIGSTKSZ    = 8192;\n     }\n+    else version (Emscripten)\n+    {\n+        enum MINSIGSTKSZ = 2048;\n+        enum SIGSTKSZ    = 8192;\n+    }\n     else\n         static assert(0, \"unimplemented\");\n \n","prefixes":[]}