aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dmodule.d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-02-28 15:47:52 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2022-02-28 17:49:01 +0100
commit1027dc459204894f4503f713a3d73826e4bbab15 (patch)
tree606564b15e0978c77c76d0e618c00c25a78aaf38 /gcc/d/dmd/dmodule.d
parent430c89274d7f82810724126637ffdc5507d442f0 (diff)
downloadgcc-1027dc459204894f4503f713a3d73826e4bbab15.zip
gcc-1027dc459204894f4503f713a3d73826e4bbab15.tar.gz
gcc-1027dc459204894f4503f713a3d73826e4bbab15.tar.bz2
d: Merge upstream dmd cf63dd8e5, druntime caf14b0f, phobos 41aaf8c26.
D front-end changes: - Import dmd v2.099.0-rc.1. - The `main' can now return type `noreturn' and supports return inference. D Runtime changes: - Import druntime v2.099.0-rc.1. - C bindings for stat_t on powerpc-linux has been fixed. Phobos changes: - Import phobos v2.099.0-rc.1. gcc/d/ChangeLog: * d-target.cc (Target::_init): Initialize C type size fields. * dmd/MERGE: Merge upstream dmd cf63dd8e5. * dmd/VERSION: Update version to v2.099.0-rc.1. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime caf14b0f. * src/MERGE: Merge upstream phobos 41aaf8c26. gcc/testsuite/ChangeLog: * gdc.dg/torture/simd7413a.d: Update. * gdc.dg/ubsan/pr88957.d: Update. * gdc.dg/simd18489.d: New test. * gdc.dg/torture/simd21727.d: New test.
Diffstat (limited to 'gcc/d/dmd/dmodule.d')
-rw-r--r--gcc/d/dmd/dmodule.d8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/d/dmd/dmodule.d b/gcc/d/dmd/dmodule.d
index 84e29fe..6568442 100644
--- a/gcc/d/dmd/dmodule.d
+++ b/gcc/d/dmd/dmodule.d
@@ -615,6 +615,14 @@ extern (C++) final class Module : Package
const dmdConfFile = global.inifilename.length ? FileName.canonicalName(global.inifilename) : "not found";
errorSupplemental(loc, "config file: %.*s", cast(int)dmdConfFile.length, dmdConfFile.ptr);
}
+ else if (FileName.ext(this.arg) || !loc.isValid())
+ {
+ // Modules whose original argument name has an extension, or do not
+ // have a valid location come from the command-line.
+ // Error that their file cannot be found and return early.
+ .error(loc, "cannot find input file `%s`", srcfile.toChars());
+ return false;
+ }
else
{
// if module is not named 'package' but we're trying to read 'package.d', we're looking for a package module