[pkg-d-commits] [ldc] 113/211: Produce linking errors when calling abstract functions

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:36:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.1.0
in repository ldc.

commit 1a84b2f1483e7a5e2a19bf392475c6ac5931fd15
Author: Martin <noone at nowhere.com>
Date:   Tue Oct 25 20:21:17 2016 +0200

    Produce linking errors when calling abstract functions
    
    Fixes issue #1822.
    
    DtoResolveFunction() explicitly excludes body-less abstract functions from
    being automatically declared. If we want to emit linking errors like DMD,
    we need a LL function for the call (we previously didn't for abstract
    functions, so it was null and LDC crashed). Thus make sure the function is
    resolved and declared by invoking DtoDeclareFunction().
---
 gen/toir.cpp           | 2 +-
 tests/d2/dmd-testsuite | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gen/toir.cpp b/gen/toir.cpp
index 821f852..aec35da 100644
--- a/gen/toir.cpp
+++ b/gen/toir.cpp
@@ -700,7 +700,7 @@ public:
       DotVarExp *dve = static_cast<DotVarExp *>(e->e1);
       FuncDeclaration *fdecl = dve->var->isFuncDeclaration();
       assert(fdecl);
-      DtoResolveFunction(fdecl);
+      DtoDeclareFunction(fdecl);
       fnval = new DFuncValue(fdecl, getIrFunc(fdecl)->func, DtoRVal(dve->e1));
     } else {
       fnval = toElem(e->e1);
diff --git a/tests/d2/dmd-testsuite b/tests/d2/dmd-testsuite
index a12a51d..56c5a64 160000
--- a/tests/d2/dmd-testsuite
+++ b/tests/d2/dmd-testsuite
@@ -1 +1 @@
-Subproject commit a12a51dd78e8acc5bb7c347718704e56c9fa3a83
+Subproject commit 56c5a640ec6fa34d69b42ef2bea726c3f5991d71

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list