aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/ChangeLog141
-rw-r--r--gcc/d/Make-lang.in2
-rw-r--r--gcc/d/d-codegen.cc63
-rw-r--r--gcc/d/d-compiler.cc37
-rw-r--r--gcc/d/d-convert.cc4
-rw-r--r--gcc/d/d-diagnostic.cc23
-rw-r--r--gcc/d/d-lang.cc25
-rw-r--r--gcc/d/d-spec.cc50
-rw-r--r--gcc/d/d-tree.h2
-rw-r--r--gcc/d/decl.cc23
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/VERSION2
-rw-r--r--gcc/d/dmd/access.d4
-rw-r--r--gcc/d/dmd/aggregate.d4
-rw-r--r--gcc/d/dmd/aliasthis.d4
-rw-r--r--gcc/d/dmd/arrayop.d4
-rw-r--r--gcc/d/dmd/arraytypes.d4
-rw-r--r--gcc/d/dmd/ast_node.d4
-rw-r--r--gcc/d/dmd/astenums.d4
-rw-r--r--gcc/d/dmd/attrib.d4
-rw-r--r--gcc/d/dmd/attribsem.d4
-rw-r--r--gcc/d/dmd/blockexit.d4
-rw-r--r--gcc/d/dmd/builtin.d4
-rw-r--r--gcc/d/dmd/canthrow.d4
-rw-r--r--gcc/d/dmd/chkformat.d4
-rw-r--r--gcc/d/dmd/clone.d4
-rw-r--r--gcc/d/dmd/common/bitfields.d4
-rw-r--r--gcc/d/dmd/common/charactertables.d4
-rw-r--r--gcc/d/dmd/common/charactertables.h2
-rw-r--r--gcc/d/dmd/common/file.d4
-rw-r--r--gcc/d/dmd/common/outbuffer.d4
-rw-r--r--gcc/d/dmd/common/smallbuffer.d4
-rw-r--r--gcc/d/dmd/compiler.d4
-rw-r--r--gcc/d/dmd/cond.d4
-rw-r--r--gcc/d/dmd/constfold.d4
-rw-r--r--gcc/d/dmd/cparse.d4
-rw-r--r--gcc/d/dmd/ctfeexpr.d4
-rw-r--r--gcc/d/dmd/ctorflow.d4
-rw-r--r--gcc/d/dmd/cxxfrontend.d4
-rw-r--r--gcc/d/dmd/dcast.d4
-rw-r--r--gcc/d/dmd/dclass.d4
-rw-r--r--gcc/d/dmd/declaration.d4
-rw-r--r--gcc/d/dmd/delegatize.d4
-rw-r--r--gcc/d/dmd/denum.d4
-rw-r--r--gcc/d/dmd/deps.d4
-rw-r--r--gcc/d/dmd/dimport.d4
-rw-r--r--gcc/d/dmd/dinterpret.d4
-rw-r--r--gcc/d/dmd/dmacro.d4
-rw-r--r--gcc/d/dmd/dmodule.d4
-rw-r--r--gcc/d/dmd/doc.d4
-rw-r--r--gcc/d/dmd/dscope.d4
-rw-r--r--gcc/d/dmd/dstruct.d4
-rw-r--r--gcc/d/dmd/dsymbol.d4
-rw-r--r--gcc/d/dmd/dsymbolsem.d4
-rw-r--r--gcc/d/dmd/dtemplate.d4
-rw-r--r--gcc/d/dmd/dtoh.d4
-rw-r--r--gcc/d/dmd/dversion.d4
-rw-r--r--gcc/d/dmd/entity.d4
-rw-r--r--gcc/d/dmd/enumsem.d4
-rw-r--r--gcc/d/dmd/errors.d4
-rw-r--r--gcc/d/dmd/errorsink.d4
-rw-r--r--gcc/d/dmd/escape.d4
-rw-r--r--gcc/d/dmd/expression.d4
-rw-r--r--gcc/d/dmd/expressionsem.d51
-rw-r--r--gcc/d/dmd/file_manager.d4
-rw-r--r--gcc/d/dmd/func.d4
-rw-r--r--gcc/d/dmd/funcsem.d4
-rw-r--r--gcc/d/dmd/globals.d4
-rw-r--r--gcc/d/dmd/globals.h1
-rw-r--r--gcc/d/dmd/gluelayer.d4
-rw-r--r--gcc/d/dmd/hdrgen.d4
-rw-r--r--gcc/d/dmd/iasm.d4
-rw-r--r--gcc/d/dmd/iasmgcc.d4
-rw-r--r--gcc/d/dmd/id.d4
-rw-r--r--gcc/d/dmd/identifier.d4
-rw-r--r--gcc/d/dmd/impcnvtab.d4
-rw-r--r--gcc/d/dmd/imphint.d4
-rw-r--r--gcc/d/dmd/importc.d4
-rw-r--r--gcc/d/dmd/init.d4
-rw-r--r--gcc/d/dmd/initsem.d4
-rw-r--r--gcc/d/dmd/inline.d4
-rw-r--r--gcc/d/dmd/intrange.d4
-rw-r--r--gcc/d/dmd/json.d4
-rw-r--r--gcc/d/dmd/lambdacomp.d4
-rw-r--r--gcc/d/dmd/lexer.d8
-rw-r--r--gcc/d/dmd/location.d27
-rw-r--r--gcc/d/dmd/mangle/basic.d4
-rw-r--r--gcc/d/dmd/mangle/cpp.d4
-rw-r--r--gcc/d/dmd/mangle/package.d4
-rw-r--r--gcc/d/dmd/mtype.d4
-rw-r--r--gcc/d/dmd/mustuse.d4
-rw-r--r--gcc/d/dmd/nogc.d4
-rw-r--r--gcc/d/dmd/nspace.d4
-rw-r--r--gcc/d/dmd/ob.d4
-rw-r--r--gcc/d/dmd/objc.d4
-rw-r--r--gcc/d/dmd/opover.d4
-rw-r--r--gcc/d/dmd/optimize.d4
-rw-r--r--gcc/d/dmd/parse.d4
-rw-r--r--gcc/d/dmd/pragmasem.d4
-rw-r--r--gcc/d/dmd/printast.d4
-rw-r--r--gcc/d/dmd/root/aav.d4
-rw-r--r--gcc/d/dmd/root/array.d4
-rw-r--r--gcc/d/dmd/root/bitarray.d4
-rw-r--r--gcc/d/dmd/root/complex.d4
-rw-r--r--gcc/d/dmd/root/ctfloat.d4
-rw-r--r--gcc/d/dmd/root/file.d4
-rw-r--r--gcc/d/dmd/root/filename.d4
-rw-r--r--gcc/d/dmd/root/hash.d4
-rw-r--r--gcc/d/dmd/root/optional.d4
-rw-r--r--gcc/d/dmd/root/optional.h4
-rw-r--r--gcc/d/dmd/root/port.d4
-rw-r--r--gcc/d/dmd/root/region.d4
-rw-r--r--gcc/d/dmd/root/rmem.d4
-rw-r--r--gcc/d/dmd/root/speller.d4
-rw-r--r--gcc/d/dmd/root/string.d4
-rw-r--r--gcc/d/dmd/root/stringtable.d4
-rw-r--r--gcc/d/dmd/root/utf.d4
-rw-r--r--gcc/d/dmd/rootobject.d4
-rw-r--r--gcc/d/dmd/safe.d4
-rw-r--r--gcc/d/dmd/semantic2.d4
-rw-r--r--gcc/d/dmd/semantic3.d4
-rw-r--r--gcc/d/dmd/sideeffect.d4
-rw-r--r--gcc/d/dmd/statement.d4
-rw-r--r--gcc/d/dmd/statementsem.d4
-rw-r--r--gcc/d/dmd/staticassert.d4
-rw-r--r--gcc/d/dmd/staticcond.d4
-rw-r--r--gcc/d/dmd/stmtstate.d4
-rw-r--r--gcc/d/dmd/target.d4
-rw-r--r--gcc/d/dmd/templateparamsem.d4
-rw-r--r--gcc/d/dmd/templatesem.d4
-rw-r--r--gcc/d/dmd/timetrace.d4
-rw-r--r--gcc/d/dmd/tokens.d4
-rw-r--r--gcc/d/dmd/traits.d4
-rw-r--r--gcc/d/dmd/typesem.d20
-rw-r--r--gcc/d/dmd/typinf.d4
-rw-r--r--gcc/d/dmd/utils.d4
-rw-r--r--gcc/d/dmd/visitor/foreachvar.d4
-rw-r--r--gcc/d/dmd/visitor/package.d4
-rw-r--r--gcc/d/dmd/visitor/postorder.d4
-rw-r--r--gcc/d/dmd/visitor/statement_rewrite_walker.d4
-rw-r--r--gcc/d/expr.cc77
-rw-r--r--gcc/d/gdc.texi6
-rw-r--r--gcc/d/imports.cc6
-rw-r--r--gcc/d/lang.opt4
-rw-r--r--gcc/d/lang.opt.urls6
-rw-r--r--gcc/d/modules.cc13
-rw-r--r--gcc/d/toir.cc11
-rw-r--r--gcc/d/typeinfo.cc8
-rw-r--r--gcc/d/types.cc38
149 files changed, 693 insertions, 447 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog
index bdecaec..1217b5d 100644
--- a/gcc/d/ChangeLog
+++ b/gcc/d/ChangeLog
@@ -1,3 +1,144 @@
+2025-08-06 Sam James <sam@gentoo.org>
+
+ * Make-lang.in (ALL_DFLAGS): Don't use ALIASING_FLAGS.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * d-diagnostic.cc: Likewise.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * d-diagnostic.cc: Update for diagnostic_t becoming
+ enum class diagnostics::kind.
+
+2025-07-25 David Malcolm <dmalcolm@redhat.com>
+
+ * d-diagnostic.cc (d_diagnostic_report_diagnostic): Update to add
+ "m_" prefix to fields of diagnostic_info throughout.
+
+2025-07-21 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ * toir.cc: Pass null pointer to
+ parse_{input,output}_constraint().
+
+2025-04-29 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/103044
+ * d-tree.h (build_clear_padding_call): New prototype.
+ * d-codegen.cc (build_clear_padding_call): New function.
+ (build_memset_call): Remove generated call to __builtin_memcpy.
+ (build_address): Replace generated call to __builtin_memset with
+ __builtin_clear_padding.
+ (build_array_from_exprs): Likewise.
+ * expr.cc (ExprVisitor::visit (AssignExp *)): Remove generated call to
+ __builtin_memset.
+ (ExprVisitor::visit (ArrayLiteralExp *)): Likewise. Insert call to
+ __builtin_clear_padding after copying array into GC memory.
+ (ExprVisitor::visit (StructLiteralExp *)): Remove generated call to
+ __builtin_memset.
+ * toir.cc (IRVisitor::visit (ReturnStatement *)): Likewise.
+
+2025-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 956e73d64e.
+
+2025-04-15 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/119826
+ * types.cc (TypeVisitor::visit (TypeEnum *)): Propagate flags of main
+ enum types to all forward-referenced variants.
+
+2025-04-15 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/119799
+ * decl.cc (DeclVisitor::visit (VarDeclaration *)): Check front-end
+ type size before building the VAR_DECL. Allow C symbols to have a
+ size of `0'.
+
+2025-04-15 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/119817
+ * imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
+ NULL_TREE to vector of import symbols.
+
+2025-04-12 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/109023
+ * d-compiler.cc: Include dmd/errors.h.
+ (Compiler::onImport): Implement.
+ * d-lang.cc (d_handle_option): Handle -finclude-imports.
+ (d_parse_file): Run semantic on included imports.
+ * gdc.texi: Document -finclude-imports.
+ * lang.opt: Add finclude-imports.
+ * lang.opt.urls: Regenerate.
+
+2025-04-12 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/119758
+ * d-lang.cc (d_parse_file): Use endswith in test for -fonly= argument.
+ * d-spec.cc (lang_specific_driver): Rework -fonly= and pass all input
+ files to the front-end compiler when the option is seen.
+
+2025-04-11 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 1b34fea478.
+
+2025-04-09 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/118309
+ * modules.cc: Include debug.h
+ (d_finish_compilation): Call debug_hooks->type_decl on all TYPE_DECLs.
+ * types.cc: Remove toplev.h include.
+ (finish_aggregate_type): Don't call rest_of_type_compilation or
+ rest_of_decl_compilation on type.
+ (TypeVisitor::visit (TypeEnum *)): Likewise.
+
+2025-04-09 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/117832
+ * d-tree.h (build_padded_constructor): New prototype.
+ * d-codegen.cc (build_padded_constructor): New function.
+ (d_array_value): Call it.
+ (build_memset_call): Likewise.
+ (build_struct_literal): Likewise.
+ (underlying_complex_expr): Likewise.
+ (build_array_from_val): Likewise.
+ (build_array_from_exprs): Likewise.
+ (d_build_call): Likewise.
+ (get_frame_for_symbol): Likewise.
+ * d-convert.cc (convert_for_rvalue): Likewise.
+ (convert_for_assignment): Likewise.
+ * decl.cc (class DeclVisitor): Likewise.
+ * expr.cc (class ExprVisitor): Likewise.
+ * modules.cc (layout_moduleinfo): Likewise.
+ * typeinfo.cc (class TypeInfoVisitor): Likewise.
+
+2025-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 51816cd01d.
+
+2025-04-06 Sandra Loosemore <sloosemore@baylibre.com>
+
+ * lang.opt.urls: Regenerate.
+
+2025-04-02 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd ed17b3e95d.
+
+2025-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd c6863be720.
+ * dmd/VERSION: Bump version to v2.111.0.
+
+2025-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/117002
+ * decl.cc (aggregate_initializer_decl): Set explicit decl alignment of
+ class instance.
+ * expr.cc (ExprVisitor::visit (NewExp *)): Likewise.
+ * types.cc (TypeVisitor::visit (TypeClass *)): Mark the record type of
+ classes as packed.
+
2025-03-30 Sandra Loosemore <sloosemore@baylibre.com>
* lang.opt.urls: Regenerate.
diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in
index 2d444c9..0ddd524 100644
--- a/gcc/d/Make-lang.in
+++ b/gcc/d/Make-lang.in
@@ -61,7 +61,7 @@ WARN_DFLAGS = -Wall -Wdeprecated
NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS))
ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \
- $(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
+ $(PICFLAG) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
$(WARN_DFLAGS)
DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index ad71486..e35f75a 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -317,7 +317,7 @@ d_array_value (tree type, tree len, tree data)
CONSTRUCTOR_APPEND_ELT (ce, len_field, len);
CONSTRUCTOR_APPEND_ELT (ce, ptr_field, data);
- return build_constructor (type, ce);
+ return build_padded_constructor (type, ce);
}
/* Returns value representing the array length of expression EXP.
@@ -717,10 +717,11 @@ build_address (tree exp)
if (AGGREGATE_TYPE_P (TREE_TYPE (exp))
&& !aggregate_value_p (TREE_TYPE (exp), exp))
{
- tree tmp = build_local_temp (TREE_TYPE (exp));
- init = compound_expr (init, build_memset_call (tmp));
- init = compound_expr (init, modify_expr (tmp, exp));
- exp = tmp;
+ tree target = force_target_expr (exp);
+ tree ptr = build_address (TARGET_EXPR_SLOT (target));
+ init = compound_expr (init, target);
+ init = compound_expr (init, build_clear_padding_call (ptr));
+ exp = TARGET_EXPR_SLOT (target);
}
else
exp = force_target_expr (exp);
@@ -891,14 +892,13 @@ build_memset_call (tree ptr, tree num)
}
/* Use a zero constant to fill the destination if setting the entire object.
- For CONSTRUCTORs, the memcpy() is lowered to a ref-all pointer assignment,
- which can then be merged with other stores to the object. */
+ For CONSTRUCTORs, also set CONSTRUCTOR_ZERO_PADDING_BITS. */
tree valtype = TREE_TYPE (TREE_TYPE (ptr));
if (tree_int_cst_equal (TYPE_SIZE_UNIT (valtype), num))
{
tree cst = build_zero_cst (valtype);
if (TREE_CODE (cst) == CONSTRUCTOR)
- return build_memcpy_call (ptr, build_address (cst), num);
+ CONSTRUCTOR_ZERO_PADDING_BITS (cst) = 1;
return modify_expr (build_deref (ptr), cst);
}
@@ -907,6 +907,18 @@ build_memset_call (tree ptr, tree num)
ptr, integer_zero_node, num);
}
+/* Build a call to built-in clear_padding(), clears padding bits inside of the
+ object representation of object pointed by PTR. */
+
+tree
+build_clear_padding_call (tree ptr)
+{
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
+
+ return build_call_expr (builtin_decl_explicit (BUILT_IN_CLEAR_PADDING), 1,
+ ptr);
+}
+
/* Return TRUE if the struct SD is suitable for comparison using memcmp.
This is because we don't guarantee that padding is zero-initialized for
a stack variable, so we can't use memcmp to compare struct values. */
@@ -1205,7 +1217,7 @@ build_struct_literal (tree type, vec <constructor_elt, va_gc> *init)
{
/* If the initializer was empty, use default zero initialization. */
if (vec_safe_is_empty (init))
- return build_constructor (type, NULL);
+ return build_padded_constructor (type, NULL);
/* Struct literals can be seen for special enums representing `_Complex',
make sure to reinterpret the literal as the correct type. */
@@ -1306,7 +1318,7 @@ build_struct_literal (tree type, vec <constructor_elt, va_gc> *init)
/* Ensure that we have consumed all values. */
gcc_assert (vec_safe_is_empty (init) || ANON_AGGR_TYPE_P (type));
- tree ctor = build_constructor (type, ve);
+ tree ctor = build_padded_constructor (type, ve);
if (constant_p)
TREE_CONSTANT (ctor) = 1;
@@ -1314,6 +1326,17 @@ build_struct_literal (tree type, vec <constructor_elt, va_gc> *init)
return ctor;
}
+/* Return a new zero padded CONSTRUCTOR node whose type is TYPE and values are
+ in the vec pointed to by VALS. */
+
+tree
+build_padded_constructor (tree type, vec<constructor_elt, va_gc> *vals)
+{
+ tree ctor = build_constructor (type, vals);
+ CONSTRUCTOR_ZERO_PADDING_BITS (ctor) = 1;
+ return ctor;
+}
+
/* Given the TYPE of an anonymous field inside T, return the
FIELD_DECL for the field. If not found return NULL_TREE.
Because anonymous types can nest, we must also search all
@@ -1647,7 +1670,7 @@ underlying_complex_expr (tree type, tree expr)
real_part (expr));
CONSTRUCTOR_APPEND_ELT (ve, TREE_CHAIN (TYPE_FIELDS (type)),
imaginary_part (expr));
- return build_constructor (type, ve);
+ return build_padded_constructor (type, ve);
}
/* Replace type in the reinterpret cast with a cast to the record type. */
@@ -1852,7 +1875,7 @@ build_array_from_val (Type *type, tree val)
for (size_t i = 0; i < dims; i++)
CONSTRUCTOR_APPEND_ELT (elms, size_int (i), val);
- return build_constructor (build_ctype (type), elms);
+ return build_padded_constructor (build_ctype (type), elms);
}
/* Build a static array of type TYPE from an array of EXPS.
@@ -1879,15 +1902,13 @@ build_array_from_exprs (Type *type, Expressions *exps, bool const_p)
/* Create a new temporary to store the array. */
tree var = build_local_temp (satype);
+ /* Initialize the temporary. */
+ tree assign = modify_expr (var, build_padded_constructor (satype, elms));
+
/* Fill any alignment holes with zeroes. */
- TypeStruct *ts = etype->baseElemOf ()->isTypeStruct ();
- tree init = NULL;
- if (ts && (!identity_compare_p (ts->sym) || ts->sym->isUnionDeclaration ()))
- init = build_memset_call (var);
+ tree clear_padding = build_clear_padding_call (build_address (var));
- /* Initialize the temporary. */
- tree assign = modify_expr (var, build_constructor (satype, elms));
- return compound_expr (compound_expr (init, assign), var);
+ return compound_expr (compound_expr (assign, clear_padding), var);
}
@@ -2301,7 +2322,7 @@ d_build_call (TypeFunction *tf, tree callable, tree object,
if (empty_aggregate_p (TREE_TYPE (targ)) && !TREE_ADDRESSABLE (targ)
&& TREE_CODE (targ) != CONSTRUCTOR)
{
- tree t = build_constructor (TREE_TYPE (targ), NULL);
+ tree t = build_padded_constructor (TREE_TYPE (targ), NULL);
targ = build2 (COMPOUND_EXPR, TREE_TYPE (t), targ, t);
}
@@ -2613,7 +2634,7 @@ get_frame_for_symbol (Dsymbol *sym)
framefields = DECL_CHAIN (framefields);
}
- frame_ref = build_address (build_constructor (type, ve));
+ frame_ref = build_address (build_padded_constructor (type, ve));
}
}
diff --git a/gcc/d/d-compiler.cc b/gcc/d/d-compiler.cc
index 160539d..e18f5d3 100644
--- a/gcc/d/d-compiler.cc
+++ b/gcc/d/d-compiler.cc
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "dmd/compiler.h"
+#include "dmd/errors.h"
#include "dmd/expression.h"
#include "dmd/identifier.h"
#include "dmd/module.h"
@@ -164,7 +165,39 @@ Compiler::onParseModule (Module *m)
driver intends on compiling the import. */
bool
-Compiler::onImport (Module *)
+Compiler::onImport (Module *m)
{
- return false;
+ if (!includeImports)
+ return false;
+
+ if (m->filetype != FileType::d && m->filetype != FileType::c)
+ return false;
+
+ /* All imports modules are included except those in the runtime library. */
+ ModuleDeclaration *md = m->md;
+ if (md && md->id)
+ {
+ if (md->packages.length >= 1)
+ {
+ if (!strcmp (md->packages.ptr[0]->toChars (), "core")
+ || !strcmp (md->packages.ptr[0]->toChars (), "std")
+ || !strcmp (md->packages.ptr[0]->toChars (), "gcc")
+ || !strcmp (md->packages.ptr[0]->toChars (), "etc"))
+ return false;
+ }
+ else if (!strcmp (md->id->toChars (), "object"))
+ return false;
+ }
+ else if (m->ident)
+ {
+ if (!strcmp (m->ident->toChars (), "object"))
+ return false;
+ }
+
+ /* This import will be compiled. */
+ if (global.params.v.verbose)
+ message ("compileimport (%s)", m->srcfile.toChars ());
+
+ compiledImports.push (m);
+ return true;
}
diff --git a/gcc/d/d-convert.cc b/gcc/d/d-convert.cc
index 4b19584..c5b0d65 100644
--- a/gcc/d/d-convert.cc
+++ b/gcc/d/d-convert.cc
@@ -688,7 +688,7 @@ convert_for_rvalue (tree expr, Type *etype, Type *totype)
CONSTRUCTOR_APPEND_ELT (elms, index, value);
}
- return build_constructor (build_ctype (totype), elms);
+ return build_padded_constructor (build_ctype (totype), elms);
}
}
@@ -788,7 +788,7 @@ convert_for_assignment (Expression *expr, Type *totype, bool literalp)
TypeSArray *sa_type = tbtype->isTypeSArray ();
uinteger_t count = sa_type->dim->toUInteger ();
- tree ctor = build_constructor (build_ctype (totype), NULL);
+ tree ctor = build_padded_constructor (build_ctype (totype), NULL);
if (count)
{
vec <constructor_elt, va_gc> *ce = NULL;
diff --git a/gcc/d/d-diagnostic.cc b/gcc/d/d-diagnostic.cc
index 55cb42e..e666ddf 100644
--- a/gcc/d/d-diagnostic.cc
+++ b/gcc/d/d-diagnostic.cc
@@ -185,7 +185,7 @@ escape_d_format (const char *format)
static void ATTRIBUTE_GCC_DIAG(3,0)
d_diagnostic_report_diagnostic (const SourceLoc &loc, int opt,
const char *format, va_list ap,
- diagnostic_t kind, bool verbatim)
+ enum diagnostics::kind kind, bool verbatim)
{
va_list argp;
va_copy (argp, ap);
@@ -193,13 +193,13 @@ d_diagnostic_report_diagnostic (const SourceLoc &loc, int opt,
if (loc.filename.length != 0 || !verbatim)
{
rich_location rich_loc (line_table, make_location_t (loc));
- diagnostic_info diagnostic;
+ diagnostics::diagnostic_info diagnostic;
char *xformat = expand_d_format (format);
diagnostic_set_info_translated (&diagnostic, xformat, &argp,
&rich_loc, kind);
if (opt != 0)
- diagnostic.option_id = opt;
+ diagnostic.m_option_id = opt;
diagnostic_report_diagnostic (global_dc, &diagnostic);
}
@@ -224,7 +224,7 @@ void D_ATTRIBUTE_FORMAT(2,0) ATTRIBUTE_GCC_DIAG(2,0)
verrorReport (const SourceLoc loc, const char *format, va_list ap,
ErrorKind kind, const char *prefix1, const char *prefix2)
{
- diagnostic_t diag_kind = DK_UNSPECIFIED;
+ enum diagnostics::kind diag_kind = diagnostics::kind::unspecified;
int opt = 0;
bool verbatim = false;
char *xformat;
@@ -238,7 +238,9 @@ verrorReport (const SourceLoc loc, const char *format, va_list ap,
if (global.gag && !global.params.v.showGaggedErrors)
return;
- diag_kind = global.gag ? DK_ANACHRONISM : DK_ERROR;
+ diag_kind = (global.gag
+ ? diagnostics::kind::anachronism
+ : diagnostics::kind::error);
}
else if (kind == ErrorKind::warning)
{
@@ -254,7 +256,7 @@ verrorReport (const SourceLoc loc, const char *format, va_list ap,
if (global.params.useWarnings == DIAGNOSTICerror)
global.warnings++;
- diag_kind = DK_WARNING;
+ diag_kind = diagnostics::kind::warning;
}
else if (kind == ErrorKind::deprecation)
{
@@ -270,11 +272,11 @@ verrorReport (const SourceLoc loc, const char *format, va_list ap,
}
opt = OPT_Wdeprecated;
- diag_kind = DK_WARNING;
+ diag_kind = diagnostics::kind::warning;
}
else if (kind == ErrorKind::message)
{
- diag_kind = DK_NOTE;
+ diag_kind = diagnostics::kind::note;
verbatim = true;
}
else if (kind == ErrorKind::tip)
@@ -282,7 +284,7 @@ verrorReport (const SourceLoc loc, const char *format, va_list ap,
if (global.gag)
return;
- diag_kind = DK_DEBUG;
+ diag_kind = diagnostics::kind::debug;
verbatim = true;
}
else
@@ -328,7 +330,8 @@ verrorReportSupplemental (const SourceLoc loc, const char* format, va_list ap,
else
gcc_unreachable ();
- d_diagnostic_report_diagnostic (loc, 0, format, ap, DK_NOTE, false);
+ d_diagnostic_report_diagnostic (loc, 0, format, ap, diagnostics::kind::note,
+ false);
}
/* Call this after printing out fatal error messages to clean up and
diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc
index b3786be..ec2ea59 100644
--- a/gcc/d/d-lang.cc
+++ b/gcc/d/d-lang.cc
@@ -523,6 +523,10 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
global.params.ignoreUnsupportedPragmas = value;
break;
+ case OPT_finclude_imports:
+ includeImports = true;
+ break;
+
case OPT_finvariants:
global.params.useInvariants = value ? CHECKENABLEon : CHECKENABLEoff;
break;
@@ -1085,9 +1089,9 @@ d_parse_file (void)
/* Buffer for contents of .ddoc files. */
OutBuffer ddocbuf;
- /* In this mode, the first file name is supposed to be a duplicate
- of one of the input files. */
- if (d_option.fonly && strcmp (d_option.fonly, main_input_filename) != 0)
+ /* In this mode, the main input file is supposed to be the same as the one
+ given by -fonly=. */
+ if (d_option.fonly && !endswith (main_input_filename, d_option.fonly))
error ("%<-fonly=%> argument is different from first input file name");
for (size_t i = 0; i < num_in_fnames; i++)
@@ -1309,6 +1313,21 @@ d_parse_file (void)
dmd::semantic3 (m, NULL);
}
+ if (includeImports)
+ {
+ for (size_t i = 0; i < compiledImports.length; i++)
+ {
+ Module *m = compiledImports[i];
+ gcc_assert (m->isRoot ());
+
+ if (global.params.v.verbose)
+ message ("semantic3 %s", m->toChars ());
+
+ dmd::semantic3 (m, NULL);
+ modules.push (m);
+ }
+ }
+
Module::runDeferredSemantic3 ();
/* Check again, incase semantic3 pass loaded any more modules. */
diff --git a/gcc/d/d-spec.cc b/gcc/d/d-spec.cc
index 7f4a779..c788048 100644
--- a/gcc/d/d-spec.cc
+++ b/gcc/d/d-spec.cc
@@ -104,8 +104,8 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
/* The total number of arguments with the new stuff. */
unsigned int num_args = 1;
- /* "-fonly" if it appears on the command line. */
- const char *only_source_option = 0;
+ /* "-fonly=" if it appears on the command line. */
+ const char *only_source_arg = 0;
/* Whether the -o option was used. */
bool saw_opt_o = false;
@@ -280,13 +280,13 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
case OPT_fonly_:
args[i] |= SKIPOPT;
- only_source_option = decoded_options[i].orig_option_with_args_text;
+ only_source_arg = arg;
if (arg != NULL)
{
- const char *suffix = strrchr (only_source_option, '.');
+ const char *suffix = strrchr (only_source_arg, '.');
if (suffix == NULL || strcmp (suffix, ".d") != 0)
- only_source_option = concat (only_source_option, ".d", NULL);
+ only_source_arg = concat (only_source_arg, ".d", NULL);
}
break;
@@ -335,48 +335,52 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
+ (phobos_library != PHOBOS_NOLINK) * 4 + 2;
new_decoded_options = XNEWVEC (cl_decoded_option, num_args);
- i = 0;
j = 0;
/* Copy the 0th argument, i.e., the name of the program itself. */
- new_decoded_options[j++] = decoded_options[i++];
+ new_decoded_options[j++] = decoded_options[0];
/* NOTE: We start at 1 now, not 0. */
- while (i < argc)
+ for (i = 1; i < argc; i++)
{
if (args[i] & SKIPOPT)
- {
- ++i;
- continue;
- }
-
- new_decoded_options[j] = decoded_options[i];
+ continue;
if (!saw_libcxx && (args[i] & WITHLIBCXX))
{
- --j;
saw_libcxx = &decoded_options[i];
+ continue;
}
- if (args[i] & DSOURCE)
+ if (only_source_arg && (args[i] & DSOURCE))
{
- if (only_source_option)
- --j;
+ if (!endswith (decoded_options[i].arg, only_source_arg))
+ continue;
}
- i++;
+ new_decoded_options[j] = decoded_options[i];
j++;
}
- if (only_source_option)
+ if (only_source_arg)
{
- const char *only_source_arg = only_source_option + 7;
+ /* Generate -fonly= option, then copy D input sources that were initially
+ skipped in first pass over all decoded_options. */
generate_option (OPT_fonly_, only_source_arg, 1, CL_DRIVER,
&new_decoded_options[j]);
j++;
- generate_option_input_file (only_source_arg,
- &new_decoded_options[j++]);
+ for (i = 1; i < argc; i++)
+ {
+ if (!(args[i] & DSOURCE))
+ continue;
+
+ if (endswith (decoded_options[i].arg, only_source_arg))
+ continue;
+
+ new_decoded_options[j] = decoded_options[i];
+ j++;
+ }
}
/* If no reason to link against libphobos library, then don't add it. */
diff --git a/gcc/d/d-tree.h b/gcc/d/d-tree.h
index 42d01e4..9d576e2 100644
--- a/gcc/d/d-tree.h
+++ b/gcc/d/d-tree.h
@@ -568,6 +568,7 @@ extern tree d_mark_read (tree);
extern tree build_memcmp_call (tree, tree, tree);
extern tree build_memcpy_call (tree, tree, tree);
extern tree build_memset_call (tree, tree = NULL_TREE);
+extern tree build_clear_padding_call (tree);
extern bool identity_compare_p (StructDeclaration *);
extern tree build_float_identity (tree_code, tree, tree);
extern tree build_struct_comparison (tree_code, StructDeclaration *,
@@ -575,6 +576,7 @@ extern tree build_struct_comparison (tree_code, StructDeclaration *,
extern tree build_array_struct_comparison (tree_code, StructDeclaration *,
tree, tree, tree);
extern tree build_struct_literal (tree, vec <constructor_elt, va_gc> *);
+extern tree build_padded_constructor (tree, vec <constructor_elt, va_gc> *);
extern tree component_ref (tree, tree);
extern tree build_assign (tree_code, tree, tree);
extern tree modify_expr (tree, tree);
diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc
index 9fcfc56..9ddf7cf 100644
--- a/gcc/d/decl.cc
+++ b/gcc/d/decl.cc
@@ -651,7 +651,7 @@ public:
}
DECL_INITIAL (vtblsym->csym)
- = build_constructor (TREE_TYPE (vtblsym->csym), elms);
+ = build_padded_constructor (TREE_TYPE (vtblsym->csym), elms);
d_finish_decl (vtblsym->csym);
d->semanticRun (PASS::obj);
@@ -791,6 +791,12 @@ public:
}
else if (d->isDataseg ())
{
+ /* When the front-end type size is invalid, an error has already been
+ given for the declaration or type. */
+ dinteger_t size = dmd::size (d->type, d->loc);
+ if (size == SIZE_INVALID)
+ return;
+
tree decl = get_symbol_decl (d);
/* Only need to build the VAR_DECL for extern declarations. */
@@ -804,9 +810,7 @@ public:
return;
/* How big a symbol can be should depend on back-end. */
- tree size = build_integer_cst (dmd::size (d->type, d->loc),
- build_ctype (Type::tsize_t));
- if (!valid_constant_size_p (size))
+ if (!valid_constant_size_p (build_integer_cst (size, size_type_node)))
{
error_at (make_location_t (d->loc), "size is too large");
return;
@@ -835,8 +839,9 @@ public:
}
/* Frontend should have already caught this. */
- gcc_assert (!integer_zerop (size)
- || d->type->toBasetype ()->isTypeSArray ());
+ gcc_assert ((size != 0 && size != SIZE_INVALID)
+ || d->type->toBasetype ()->isTypeSArray ()
+ || d->isCsymbol ());
d_finish_decl (decl);
@@ -2393,6 +2398,12 @@ aggregate_initializer_decl (AggregateDeclaration *decl)
SET_DECL_ALIGN (sinit, sd->alignment.get () * BITS_PER_UNIT);
DECL_USER_ALIGN (sinit) = true;
}
+ else if (sd == NULL)
+ {
+ /* Alignment of class is determined its biggest field alignment. */
+ SET_DECL_ALIGN (sinit, decl->alignsize * BITS_PER_UNIT);
+ DECL_USER_ALIGN (sinit) = true;
+ }
decl->sinit = sinit;
return sinit;
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index 08b4e78..58d19b4 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-02a64d2e1359119b91d2b932e61ed712f272507a
+956e73d64e532a68213970316c2590c572ec03f3
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 0172d7d..e972d6e 100644
--- a/gcc/d/dmd/VERSION
+++ b/gcc/d/dmd/VERSION
@@ -1 +1 @@
-v2.111.0-rc.1
+v2.111.0
diff --git a/gcc/d/dmd/access.d b/gcc/d/dmd/access.d
index df04216..eaaa288 100644
--- a/gcc/d/dmd/access.d
+++ b/gcc/d/dmd/access.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/access.d, _access.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/access.d, _access.d)
* Documentation: https://dlang.org/phobos/dmd_access.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/access.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/access.d
*/
module dmd.access;
diff --git a/gcc/d/dmd/aggregate.d b/gcc/d/dmd/aggregate.d
index 25a8771..51d6fc4 100644
--- a/gcc/d/dmd/aggregate.d
+++ b/gcc/d/dmd/aggregate.d
@@ -7,9 +7,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.d, _aggregate.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/aggregate.d, _aggregate.d)
* Documentation: https://dlang.org/phobos/dmd_aggregate.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aggregate.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/aggregate.d
*/
module dmd.aggregate;
diff --git a/gcc/d/dmd/aliasthis.d b/gcc/d/dmd/aliasthis.d
index aec1869..632cf95 100644
--- a/gcc/d/dmd/aliasthis.d
+++ b/gcc/d/dmd/aliasthis.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d, _aliasthis.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/aliasthis.d, _aliasthis.d)
* Documentation: https://dlang.org/phobos/dmd_aliasthis.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aliasthis.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/aliasthis.d
*/
module dmd.aliasthis;
diff --git a/gcc/d/dmd/arrayop.d b/gcc/d/dmd/arrayop.d
index 3129eb5..7d25e18 100644
--- a/gcc/d/dmd/arrayop.d
+++ b/gcc/d/dmd/arrayop.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arrayop.d, _arrayop.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/arrayop.d, _arrayop.d)
* Documentation: https://dlang.org/phobos/dmd_arrayop.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arrayop.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/arrayop.d
*/
module dmd.arrayop;
diff --git a/gcc/d/dmd/arraytypes.d b/gcc/d/dmd/arraytypes.d
index e09fb43..2cd446e 100644
--- a/gcc/d/dmd/arraytypes.d
+++ b/gcc/d/dmd/arraytypes.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.d, _arraytypes.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/arraytypes.d, _arraytypes.d)
* Documentation: https://dlang.org/phobos/dmd_arraytypes.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arraytypes.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/arraytypes.d
*/
module dmd.arraytypes;
diff --git a/gcc/d/dmd/ast_node.d b/gcc/d/dmd/ast_node.d
index 3f2b221..ad49169 100644
--- a/gcc/d/dmd/ast_node.d
+++ b/gcc/d/dmd/ast_node.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.d, _ast_node.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ast_node.d, _ast_node.d)
* Documentation: https://dlang.org/phobos/dmd_ast_node.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ast_node.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/ast_node.d
*/
module dmd.ast_node;
diff --git a/gcc/d/dmd/astenums.d b/gcc/d/dmd/astenums.d
index 2bbf1e0..b71b6c4 100644
--- a/gcc/d/dmd/astenums.d
+++ b/gcc/d/dmd/astenums.d
@@ -3,9 +3,9 @@
*
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/astenums.d, _astenums.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/astenums.d, _astenums.d)
* Documentation: https://dlang.org/phobos/dmd_astenums.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/astenums.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/astenums.d
*/
module dmd.astenums;
diff --git a/gcc/d/dmd/attrib.d b/gcc/d/dmd/attrib.d
index 7135c28..1bfe790 100644
--- a/gcc/d/dmd/attrib.d
+++ b/gcc/d/dmd/attrib.d
@@ -17,9 +17,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/attrib.d, _attrib.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/attrib.d, _attrib.d)
* Documentation: https://dlang.org/phobos/dmd_attrib.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/attrib.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/attrib.d
*/
module dmd.attrib;
diff --git a/gcc/d/dmd/attribsem.d b/gcc/d/dmd/attribsem.d
index 78a3b47..bc966bb 100644
--- a/gcc/d/dmd/attribsem.d
+++ b/gcc/d/dmd/attribsem.d
@@ -17,9 +17,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/attribsem.d, _attrib.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/attribsem.d, _attrib.d)
* Documentation: https://dlang.org/phobos/dmd_attribsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/attribsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/attribsem.d
*/
module dmd.attribsem;
diff --git a/gcc/d/dmd/blockexit.d b/gcc/d/dmd/blockexit.d
index 32012d4..ae2f12f 100644
--- a/gcc/d/dmd/blockexit.d
+++ b/gcc/d/dmd/blockexit.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/blockexit.d, _blockexit.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/blockexit.d, _blockexit.d)
* Documentation: https://dlang.org/phobos/dmd_blockexit.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/blockexit.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/blockexit.d
*/
module dmd.blockexit;
diff --git a/gcc/d/dmd/builtin.d b/gcc/d/dmd/builtin.d
index e33a812..53307fc 100644
--- a/gcc/d/dmd/builtin.d
+++ b/gcc/d/dmd/builtin.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d, _builtin.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/builtin.d, _builtin.d)
* Documentation: https://dlang.org/phobos/dmd_builtin.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/builtin.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/builtin.d
*/
module dmd.builtin;
diff --git a/gcc/d/dmd/canthrow.d b/gcc/d/dmd/canthrow.d
index a209a0c..96acf05 100644
--- a/gcc/d/dmd/canthrow.d
+++ b/gcc/d/dmd/canthrow.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/canthrow.d, _canthrow.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/canthrow.d, _canthrow.d)
* Documentation: https://dlang.org/phobos/dmd_canthrow.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/canthrow.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/canthrow.d
*/
module dmd.canthrow;
diff --git a/gcc/d/dmd/chkformat.d b/gcc/d/dmd/chkformat.d
index a16605e..8b2d5b4 100644
--- a/gcc/d/dmd/chkformat.d
+++ b/gcc/d/dmd/chkformat.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/chkformat.d, _chkformat.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/chkformat.d, _chkformat.d)
* Documentation: https://dlang.org/phobos/dmd_chkformat.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/chkformat.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/chkformat.d
*/
module dmd.chkformat;
diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d
index 9121517..a21f5a0 100644
--- a/gcc/d/dmd/clone.d
+++ b/gcc/d/dmd/clone.d
@@ -5,9 +5,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/clone.d, _clone.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/clone.d, _clone.d)
* Documentation: https://dlang.org/phobos/dmd_clone.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/clone.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/clone.d
*/
module dmd.clone;
diff --git a/gcc/d/dmd/common/bitfields.d b/gcc/d/dmd/common/bitfields.d
index a157f12..72cb3e7 100644
--- a/gcc/d/dmd/common/bitfields.d
+++ b/gcc/d/dmd/common/bitfields.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Dennis Korpel
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/bitfields.d, common/bitfields.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/bitfields.d, common/bitfields.d)
* Documentation: https://dlang.org/phobos/dmd_common_bitfields.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/bitfields.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/common/bitfields.d
*/
module dmd.common.bitfields;
diff --git a/gcc/d/dmd/common/charactertables.d b/gcc/d/dmd/common/charactertables.d
index 9358667..7df5234 100644
--- a/gcc/d/dmd/common/charactertables.d
+++ b/gcc/d/dmd/common/charactertables.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://cattermole.co.nz, Richard (Rikki) Andrew Cattermole)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/charactertables.d, common/charactertables.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/charactertables.d, common/charactertables.d)
* Documentation: https://dlang.org/phobos/dmd_common_charactertables.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/charactertables.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/common/charactertables.d
*/
module dmd.common.charactertables;
diff --git a/gcc/d/dmd/common/charactertables.h b/gcc/d/dmd/common/charactertables.h
index 2c21767..b38409e 100644
--- a/gcc/d/dmd/common/charactertables.h
+++ b/gcc/d/dmd/common/charactertables.h
@@ -6,7 +6,7 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://cattermole.co.nz, Richard (Rikki) Andrew Cattermole)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/charactertables.d, common/charactertables.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/charactertables.h, common/charactertables.d)
*/
#pragma once
diff --git a/gcc/d/dmd/common/file.d b/gcc/d/dmd/common/file.d
index 66238f7..1b01a28 100644
--- a/gcc/d/dmd/common/file.d
+++ b/gcc/d/dmd/common/file.d
@@ -7,9 +7,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/file.d, common/_file.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/file.d, common/_file.d)
* Documentation: https://dlang.org/phobos/dmd_common_file.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/file.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/common/file.d
*/
module dmd.common.file;
diff --git a/gcc/d/dmd/common/outbuffer.d b/gcc/d/dmd/common/outbuffer.d
index c0ac098..01fc377 100644
--- a/gcc/d/dmd/common/outbuffer.d
+++ b/gcc/d/dmd/common/outbuffer.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuffer.d, root/_outbuffer.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/outbuffer.d, root/_outbuffer.d)
* Documentation: https://dlang.org/phobos/dmd_root_outbuffer.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/outbuffer.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/common/outbuffer.d
*/
module dmd.common.outbuffer;
diff --git a/gcc/d/dmd/common/smallbuffer.d b/gcc/d/dmd/common/smallbuffer.d
index a567482..65adec6 100644
--- a/gcc/d/dmd/common/smallbuffer.d
+++ b/gcc/d/dmd/common/smallbuffer.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/smallbuffer.d, common/_smallbuffer.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/smallbuffer.d, common/_smallbuffer.d)
* Documentation: https://dlang.org/phobos/dmd_common_smallbuffer.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/smallbuffer
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/common/smallbuffer.d
*/
module dmd.common.smallbuffer;
diff --git a/gcc/d/dmd/compiler.d b/gcc/d/dmd/compiler.d
index f02da04..8203e0c 100644
--- a/gcc/d/dmd/compiler.d
+++ b/gcc/d/dmd/compiler.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/compiler.d, _compiler.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/compiler.d, _compiler.d)
* Documentation: https://dlang.org/phobos/dmd_compiler.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/compiler.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/compiler.d
*/
module dmd.compiler;
diff --git a/gcc/d/dmd/cond.d b/gcc/d/dmd/cond.d
index 19c6fe3..1b11a9f 100644
--- a/gcc/d/dmd/cond.d
+++ b/gcc/d/dmd/cond.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cond.d, _cond.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cond.d, _cond.d)
* Documentation: https://dlang.org/phobos/dmd_cond.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cond.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/cond.d
*/
module dmd.cond;
diff --git a/gcc/d/dmd/constfold.d b/gcc/d/dmd/constfold.d
index 0e07bfa..fad9c9a 100644
--- a/gcc/d/dmd/constfold.d
+++ b/gcc/d/dmd/constfold.d
@@ -8,9 +8,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/constfold.d, _constfold.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/constfold.d, _constfold.d)
* Documentation: https://dlang.org/phobos/dmd_constfold.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/constfold.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/constfold.d
*/
module dmd.constfold;
diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d
index 6899468..1a2a1e9 100644
--- a/gcc/d/dmd/cparse.d
+++ b/gcc/d/dmd/cparse.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d, _cparse.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cparse.d, _cparse.d)
* Documentation: https://dlang.org/phobos/dmd_cparse.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cparse.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/cparse.d
*/
module dmd.cparse;
diff --git a/gcc/d/dmd/ctfeexpr.d b/gcc/d/dmd/ctfeexpr.d
index 007e693..2f577ce 100644
--- a/gcc/d/dmd/ctfeexpr.d
+++ b/gcc/d/dmd/ctfeexpr.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctfeexpr.d, _ctfeexpr.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ctfeexpr.d, _ctfeexpr.d)
* Documentation: https://dlang.org/phobos/dmd_ctfeexpr.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctfeexpr.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/ctfeexpr.d
*/
module dmd.ctfeexpr;
diff --git a/gcc/d/dmd/ctorflow.d b/gcc/d/dmd/ctorflow.d
index 3cf9c69..e604700 100644
--- a/gcc/d/dmd/ctorflow.d
+++ b/gcc/d/dmd/ctorflow.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctorflow.d, _ctorflow.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ctorflow.d, _ctorflow.d)
* Documentation: https://dlang.org/phobos/dmd_ctorflow.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctorflow.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/ctorflow.d
*/
module dmd.ctorflow;
diff --git a/gcc/d/dmd/cxxfrontend.d b/gcc/d/dmd/cxxfrontend.d
index b3d5942..234b652 100644
--- a/gcc/d/dmd/cxxfrontend.d
+++ b/gcc/d/dmd/cxxfrontend.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cxxfrontend.d, _cxxfrontend.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/cxxfrontend.d, _cxxfrontend.d)
* Documentation: https://dlang.org/phobos/dmd_cxxfrontend.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cxxfrontend.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/cxxfrontend.d
*/
module dmd.cxxfrontend;
diff --git a/gcc/d/dmd/dcast.d b/gcc/d/dmd/dcast.d
index ff987a3..86d2f0f 100644
--- a/gcc/d/dmd/dcast.d
+++ b/gcc/d/dmd/dcast.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dcast.d, _dcast.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dcast.d, _dcast.d)
* Documentation: https://dlang.org/phobos/dmd_dcast.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dcast.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dcast.d
*/
module dmd.dcast;
diff --git a/gcc/d/dmd/dclass.d b/gcc/d/dmd/dclass.d
index 50a1235e..80d39fa 100644
--- a/gcc/d/dmd/dclass.d
+++ b/gcc/d/dmd/dclass.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dclass.d, _dclass.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dclass.d, _dclass.d)
* Documentation: https://dlang.org/phobos/dmd_dclass.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dclass.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dclass.d
*/
module dmd.dclass;
diff --git a/gcc/d/dmd/declaration.d b/gcc/d/dmd/declaration.d
index e64acb2..4510927 100644
--- a/gcc/d/dmd/declaration.d
+++ b/gcc/d/dmd/declaration.d
@@ -5,9 +5,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/declaration.d, _declaration.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/declaration.d, _declaration.d)
* Documentation: https://dlang.org/phobos/dmd_declaration.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/declaration.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/declaration.d
*/
module dmd.declaration;
diff --git a/gcc/d/dmd/delegatize.d b/gcc/d/dmd/delegatize.d
index fa84db1..344130b 100644
--- a/gcc/d/dmd/delegatize.d
+++ b/gcc/d/dmd/delegatize.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/delegatize.d, _delegatize.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/delegatize.d, _delegatize.d)
* Documentation: https://dlang.org/phobos/dmd_delegatize.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/delegatize.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/delegatize.d
*/
module dmd.delegatize;
diff --git a/gcc/d/dmd/denum.d b/gcc/d/dmd/denum.d
index 401a7a1..e1a4ab6 100644
--- a/gcc/d/dmd/denum.d
+++ b/gcc/d/dmd/denum.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/denum.d, _denum.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/denum.d, _denum.d)
* Documentation: https://dlang.org/phobos/dmd_denum.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/denum.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/denum.d
* References: https://dlang.org/spec/enum.html
*/
diff --git a/gcc/d/dmd/deps.d b/gcc/d/dmd/deps.d
index 4cd5774..f586a84 100644
--- a/gcc/d/dmd/deps.d
+++ b/gcc/d/dmd/deps.d
@@ -24,9 +24,9 @@
*
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/deps.d, makedeps.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/deps.d, makedeps.d)
* Documentation: https://dlang.org/phobos/dmd_deps.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/deps.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/deps.d
*/
module dmd.deps;
diff --git a/gcc/d/dmd/dimport.d b/gcc/d/dmd/dimport.d
index 38f86d3..bbd74a4 100644
--- a/gcc/d/dmd/dimport.d
+++ b/gcc/d/dmd/dimport.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dimport.d, _dimport.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dimport.d, _dimport.d)
* Documentation: https://dlang.org/phobos/dmd_dimport.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dimport.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dimport.d
*/
module dmd.dimport;
diff --git a/gcc/d/dmd/dinterpret.d b/gcc/d/dmd/dinterpret.d
index 17c5b64..13051db 100644
--- a/gcc/d/dmd/dinterpret.d
+++ b/gcc/d/dmd/dinterpret.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dinterpret.d, _dinterpret.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dinterpret.d, _dinterpret.d)
* Documentation: https://dlang.org/phobos/dmd_dinterpret.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dinterpret.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dinterpret.d
*/
module dmd.dinterpret;
diff --git a/gcc/d/dmd/dmacro.d b/gcc/d/dmd/dmacro.d
index af3d5dd..307b43f 100644
--- a/gcc/d/dmd/dmacro.d
+++ b/gcc/d/dmd/dmacro.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmacro.d, _dmacro.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dmacro.d, _dmacro.d)
* Documentation: https://dlang.org/phobos/dmd_dmacro.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmacro.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dmacro.d
*/
module dmd.dmacro;
diff --git a/gcc/d/dmd/dmodule.d b/gcc/d/dmd/dmodule.d
index 1d14c08..0e0070a 100644
--- a/gcc/d/dmd/dmodule.d
+++ b/gcc/d/dmd/dmodule.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmodule.d, _dmodule.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dmodule.d, _dmodule.d)
* Documentation: https://dlang.org/phobos/dmd_dmodule.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmodule.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dmodule.d
*/
module dmd.dmodule;
diff --git a/gcc/d/dmd/doc.d b/gcc/d/dmd/doc.d
index f3ca53f..dc4a0b9 100644
--- a/gcc/d/dmd/doc.d
+++ b/gcc/d/dmd/doc.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/doc.d, _doc.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/doc.d, _doc.d)
* Documentation: https://dlang.org/phobos/dmd_doc.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/doc.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/doc.d
*/
module dmd.doc;
diff --git a/gcc/d/dmd/dscope.d b/gcc/d/dmd/dscope.d
index 70829f5..725a55e 100644
--- a/gcc/d/dmd/dscope.d
+++ b/gcc/d/dmd/dscope.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dscope.d, _dscope.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dscope.d, _dscope.d)
* Documentation: https://dlang.org/phobos/dmd_dscope.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dscope.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dscope.d
*/
module dmd.dscope;
diff --git a/gcc/d/dmd/dstruct.d b/gcc/d/dmd/dstruct.d
index d1df6f5..d07be2f 100644
--- a/gcc/d/dmd/dstruct.d
+++ b/gcc/d/dmd/dstruct.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dstruct.d, _dstruct.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dstruct.d, _dstruct.d)
* Documentation: https://dlang.org/phobos/dmd_dstruct.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dstruct.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dstruct.d
*/
module dmd.dstruct;
diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d
index 3e40dbe..74ca9cb 100644
--- a/gcc/d/dmd/dsymbol.d
+++ b/gcc/d/dmd/dsymbol.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.d, _dsymbol.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dsymbol.d, _dsymbol.d)
* Documentation: https://dlang.org/phobos/dmd_dsymbol.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbol.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dsymbol.d
*/
module dmd.dsymbol;
diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d
index de5e4bd..acbac7a 100644
--- a/gcc/d/dmd/dsymbolsem.d
+++ b/gcc/d/dmd/dsymbolsem.d
@@ -5,9 +5,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d, _dsymbolsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dsymbolsem.d, _dsymbolsem.d)
* Documentation: https://dlang.org/phobos/dmd_dsymbolsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbolsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dsymbolsem.d
*/
module dmd.dsymbolsem;
diff --git a/gcc/d/dmd/dtemplate.d b/gcc/d/dmd/dtemplate.d
index 3efe77d..2158895 100644
--- a/gcc/d/dmd/dtemplate.d
+++ b/gcc/d/dmd/dtemplate.d
@@ -31,9 +31,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d, _dtemplate.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dtemplate.d, _dtemplate.d)
* Documentation: https://dlang.org/phobos/dmd_dtemplate.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtemplate.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dtemplate.d
*/
module dmd.dtemplate;
diff --git a/gcc/d/dmd/dtoh.d b/gcc/d/dmd/dtoh.d
index efc71ad..3946c25 100644
--- a/gcc/d/dmd/dtoh.d
+++ b/gcc/d/dmd/dtoh.d
@@ -5,9 +5,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtohd, _dtoh.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dtoh.d, _dtoh.d)
* Documentation: https://dlang.org/phobos/dmd_dtoh.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtoh.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dtoh.d
*/
module dmd.dtoh;
diff --git a/gcc/d/dmd/dversion.d b/gcc/d/dmd/dversion.d
index 6be7528..26528e9 100644
--- a/gcc/d/dmd/dversion.d
+++ b/gcc/d/dmd/dversion.d
@@ -7,9 +7,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dversion.d, _dversion.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/dversion.d, _dversion.d)
* Documentation: https://dlang.org/phobos/dmd_dversion.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dversion.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/dversion.d
*/
module dmd.dversion;
diff --git a/gcc/d/dmd/entity.d b/gcc/d/dmd/entity.d
index 6457a62..a70029b 100644
--- a/gcc/d/dmd/entity.d
+++ b/gcc/d/dmd/entity.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/entity.d, _entity.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/entity.d, _entity.d)
* Documentation: https://dlang.org/phobos/dmd_entity.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/entity.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/entity.d
*/
module dmd.entity;
diff --git a/gcc/d/dmd/enumsem.d b/gcc/d/dmd/enumsem.d
index 30dfeb3..4f0d4e5 100644
--- a/gcc/d/dmd/enumsem.d
+++ b/gcc/d/dmd/enumsem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/enumsem.d, _enumsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/enumsem.d, _enumsem.d)
* Documentation: https://dlang.org/phobos/dmd_enumsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/enumsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/enumsem.d
*/
module dmd.enumsem;
diff --git a/gcc/d/dmd/errors.d b/gcc/d/dmd/errors.d
index c9a29c1..90c18c3 100644
--- a/gcc/d/dmd/errors.d
+++ b/gcc/d/dmd/errors.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/errors.d, _errors.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/errors.d, _errors.d)
* Documentation: https://dlang.org/phobos/dmd_errors.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/errors.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/errors.d
*/
module dmd.errors;
diff --git a/gcc/d/dmd/errorsink.d b/gcc/d/dmd/errorsink.d
index 5514449..5793ef1 100644
--- a/gcc/d/dmd/errorsink.d
+++ b/gcc/d/dmd/errorsink.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 2023-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/errorsink.d, _errorsink.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/errorsink.d, _errorsink.d)
* Documentation: https://dlang.org/phobos/dmd_errorsink.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/errorsink.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/errorsink.d
*/
module dmd.errorsink;
diff --git a/gcc/d/dmd/escape.d b/gcc/d/dmd/escape.d
index 719ac4b..a0c5472 100644
--- a/gcc/d/dmd/escape.d
+++ b/gcc/d/dmd/escape.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/escape.d, _escape.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/escape.d, _escape.d)
* Documentation: https://dlang.org/phobos/dmd_escape.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/escape.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/escape.d
*/
module dmd.escape;
diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d
index 4bf1f9f..d65b163 100644
--- a/gcc/d/dmd/expression.d
+++ b/gcc/d/dmd/expression.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expression.d, _expression.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/expression.d, _expression.d)
* Documentation: https://dlang.org/phobos/dmd_expression.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expression.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/expression.d
*/
module dmd.expression;
diff --git a/gcc/d/dmd/expressionsem.d b/gcc/d/dmd/expressionsem.d
index 83f28be..b02f6ea 100644
--- a/gcc/d/dmd/expressionsem.d
+++ b/gcc/d/dmd/expressionsem.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d, _expressionsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/expressionsem.d, _expressionsem.d)
* Documentation: https://dlang.org/phobos/dmd_expressionsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/expressionsem.d
*/
module dmd.expressionsem;
@@ -641,21 +641,25 @@ TupleDeclaration isAliasThisTuple(Expression e)
Type t = e.type.toBasetype();
while (true)
{
- Dsymbol s = t.toDsymbol(null);
- if (!s)
- return null;
- auto ad = s.isAggregateDeclaration();
- if (!ad)
- return null;
- s = ad.aliasthis ? ad.aliasthis.sym : null;
- if (s && s.isVarDeclaration())
+ if (Dsymbol s = t.toDsymbol(null))
{
- TupleDeclaration td = s.isVarDeclaration().toAlias().isTupleDeclaration();
- if (td && td.isexp)
- return td;
+ if (auto ad = s.isAggregateDeclaration())
+ {
+ s = ad.aliasthis ? ad.aliasthis.sym : null;
+ if (s && s.isVarDeclaration())
+ {
+ TupleDeclaration td = s.isVarDeclaration().toAlias().isTupleDeclaration();
+ if (td && td.isexp)
+ return td;
+ }
+ if (Type att = t.aliasthisOf())
+ {
+ t = att;
+ continue;
+ }
+ }
}
- if (Type att = t.aliasthisOf())
- t = att;
+ return null;
}
}
@@ -1247,6 +1251,9 @@ private Expression resolveUFCS(Scope* sc, CallExp ce)
}
else
{
+ if (arrayExpressionSemantic(ce.arguments.peekSlice(), sc))
+ return ErrorExp.get();
+
if (Expression ey = die.dotIdSemanticProp(sc, 1))
{
if (ey.op == EXP.error)
@@ -1254,19 +1261,11 @@ private Expression resolveUFCS(Scope* sc, CallExp ce)
ce.e1 = ey;
if (isDotOpDispatch(ey))
{
- // even opDispatch and UFCS must have valid arguments,
- // so now that we've seen indication of a problem,
- // check them for issues.
- Expressions* originalArguments = Expression.arraySyntaxCopy(ce.arguments);
-
const errors = global.startGagging();
e = ce.expressionSemantic(sc);
if (!global.endGagging(errors))
return e;
- if (arrayExpressionSemantic(originalArguments.peekSlice(), sc))
- return ErrorExp.get();
-
/* fall down to UFCS */
}
else
@@ -6979,10 +6978,10 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
while (1)
{
AttribDeclaration ad = s.isAttribDeclaration();
- if (!ad)
- break;
- if (ad.decl && ad.decl.length == 1)
+ if (ad && ad.decl && ad.decl.length == 1)
s = (*ad.decl)[0];
+ else
+ break;
}
//printf("inserting '%s' %p into sc = %p\n", s.toChars(), s, sc);
diff --git a/gcc/d/dmd/file_manager.d b/gcc/d/dmd/file_manager.d
index 8a6ec99..2ccb1d2 100644
--- a/gcc/d/dmd/file_manager.d
+++ b/gcc/d/dmd/file_manager.d
@@ -3,9 +3,9 @@
*
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d, _file_manager.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/file_manager.d, _file_manager.d)
* Documentation: https://dlang.org/phobos/dmd_file_manager.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/file_manager.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/file_manager.d
*/
module dmd.file_manager;
diff --git a/gcc/d/dmd/func.d b/gcc/d/dmd/func.d
index e96c332..064b67f 100644
--- a/gcc/d/dmd/func.d
+++ b/gcc/d/dmd/func.d
@@ -11,9 +11,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/func.d, _func.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/func.d, _func.d)
* Documentation: https://dlang.org/phobos/dmd_func.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/func.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/func.d
*/
module dmd.func;
diff --git a/gcc/d/dmd/funcsem.d b/gcc/d/dmd/funcsem.d
index 269a200..1231496 100644
--- a/gcc/d/dmd/funcsem.d
+++ b/gcc/d/dmd/funcsem.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/funcsem.d, _funcsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/funcsem.d, _funcsem.d)
* Documentation: https://dlang.org/phobos/dmd_funcsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/funcsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/funcsem.d
*/
module dmd.funcsem;
diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d
index 132683e..624738e 100644
--- a/gcc/d/dmd/globals.d
+++ b/gcc/d/dmd/globals.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/globals.d, _globals.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/globals.d, _globals.d)
* Documentation: https://dlang.org/phobos/dmd_globals.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/globals.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/globals.d
*/
module dmd.globals;
diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h
index 59952a2..62a575e 100644
--- a/gcc/d/dmd/globals.h
+++ b/gcc/d/dmd/globals.h
@@ -421,6 +421,7 @@ struct SourceLoc
uint32_t line;
uint32_t column;
uint32_t fileOffset;
+ DString fileContent;
};
struct Loc
diff --git a/gcc/d/dmd/gluelayer.d b/gcc/d/dmd/gluelayer.d
index 8dca303..ba7c1e9 100644
--- a/gcc/d/dmd/gluelayer.d
+++ b/gcc/d/dmd/gluelayer.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/gluelayer.d, _gluelayer.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/gluelayer.d, _gluelayer.d)
* Documentation: https://dlang.org/phobos/dmd_gluelayer.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/gluelayer.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/gluelayer.d
*/
module dmd.gluelayer;
diff --git a/gcc/d/dmd/hdrgen.d b/gcc/d/dmd/hdrgen.d
index d33bff1..61ff273 100644
--- a/gcc/d/dmd/hdrgen.d
+++ b/gcc/d/dmd/hdrgen.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.d, _hdrgen.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/hdrgen.d, _hdrgen.d)
* Documentation: https://dlang.org/phobos/dmd_hdrgen.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/hdrgen.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/hdrgen.d
*/
module dmd.hdrgen;
diff --git a/gcc/d/dmd/iasm.d b/gcc/d/dmd/iasm.d
index 8301d75..689ef0f 100644
--- a/gcc/d/dmd/iasm.d
+++ b/gcc/d/dmd/iasm.d
@@ -6,9 +6,9 @@
* Copyright (C) 2018-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasm.d, _iasm.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm.d, _iasm.d)
* Documentation: https://dlang.org/phobos/dmd_iasm.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasm.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/iasm.d
*/
module dmd.iasm;
diff --git a/gcc/d/dmd/iasmgcc.d b/gcc/d/dmd/iasmgcc.d
index f8ebf8f..3d6e6ab 100644
--- a/gcc/d/dmd/iasmgcc.d
+++ b/gcc/d/dmd/iasmgcc.d
@@ -4,9 +4,9 @@
* Copyright (C) 2018-2025 by The D Language Foundation, All Rights Reserved
* Authors: Iain Buclaw
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasmgcc.d, _iasmgcc.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasmgcc.d, _iasmgcc.d)
* Documentation: https://dlang.org/phobos/dmd_iasmgcc.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasmgcc.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/iasmgcc.d
*/
module dmd.iasmgcc;
diff --git a/gcc/d/dmd/id.d b/gcc/d/dmd/id.d
index 93db559..e1c22f2 100644
--- a/gcc/d/dmd/id.d
+++ b/gcc/d/dmd/id.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/id.d, _id.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/id.d, _id.d)
* Documentation: https://dlang.org/phobos/dmd_id.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/id.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/id.d
*/
module dmd.id;
diff --git a/gcc/d/dmd/identifier.d b/gcc/d/dmd/identifier.d
index 2cb1b44..c213597 100644
--- a/gcc/d/dmd/identifier.d
+++ b/gcc/d/dmd/identifier.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/identifier.d, _identifier.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/identifier.d, _identifier.d)
* Documentation: https://dlang.org/phobos/dmd_identifier.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/identifier.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/identifier.d
*/
module dmd.identifier;
diff --git a/gcc/d/dmd/impcnvtab.d b/gcc/d/dmd/impcnvtab.d
index cadb079..b2ab919 100644
--- a/gcc/d/dmd/impcnvtab.d
+++ b/gcc/d/dmd/impcnvtab.d
@@ -9,9 +9,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/impcnvtab.d, _impcnvtab.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/impcnvtab.d, _impcnvtab.d)
* Documentation: https://dlang.org/phobos/dmd_impcnvtab.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/impcnvtab.d
*/
module dmd.impcnvtab;
diff --git a/gcc/d/dmd/imphint.d b/gcc/d/dmd/imphint.d
index c01cb6c..382a0f3 100644
--- a/gcc/d/dmd/imphint.d
+++ b/gcc/d/dmd/imphint.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/imphint.d, _imphint.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/imphint.d, _imphint.d)
* Documentation: https://dlang.org/phobos/dmd_imphint.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/imphint.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/imphint.d
*/
module dmd.imphint;
diff --git a/gcc/d/dmd/importc.d b/gcc/d/dmd/importc.d
index 6a85e96..2f88a21 100644
--- a/gcc/d/dmd/importc.d
+++ b/gcc/d/dmd/importc.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 2021-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/importc.d, _importc.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/importc.d, _importc.d)
* Documentation: https://dlang.org/phobos/dmd_importc.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/importc.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/importc.d
*/
module dmd.importc;
diff --git a/gcc/d/dmd/init.d b/gcc/d/dmd/init.d
index 39699c2..55fb6f3 100644
--- a/gcc/d/dmd/init.d
+++ b/gcc/d/dmd/init.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/init.d, _init.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/init.d, _init.d)
* Documentation: https://dlang.org/phobos/dmd_init.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/init.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/init.d
*/
module dmd.init;
diff --git a/gcc/d/dmd/initsem.d b/gcc/d/dmd/initsem.d
index d37c85a..1ebccf77 100644
--- a/gcc/d/dmd/initsem.d
+++ b/gcc/d/dmd/initsem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/initsem.d, _initsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/initsem.d, _initsem.d)
* Documentation: https://dlang.org/phobos/dmd_initsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/initsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/initsem.d
*/
module dmd.initsem;
diff --git a/gcc/d/dmd/inline.d b/gcc/d/dmd/inline.d
index 9864b72..72f2da4 100644
--- a/gcc/d/dmd/inline.d
+++ b/gcc/d/dmd/inline.d
@@ -7,9 +7,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/inline.d, _inline.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/inline.d, _inline.d)
* Documentation: https://dlang.org/phobos/dmd_inline.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/inline.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/inline.d
*/
module dmd.inline;
diff --git a/gcc/d/dmd/intrange.d b/gcc/d/dmd/intrange.d
index 8a2caaa..f68e302 100644
--- a/gcc/d/dmd/intrange.d
+++ b/gcc/d/dmd/intrange.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/intrange.d, _intrange.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/intrange.d, _intrange.d)
* Documentation: https://dlang.org/phobos/dmd_intrange.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/intrange.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/intrange.d
*/
module dmd.intrange;
diff --git a/gcc/d/dmd/json.d b/gcc/d/dmd/json.d
index bbc62d7..080870a 100644
--- a/gcc/d/dmd/json.d
+++ b/gcc/d/dmd/json.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/json.d, _json.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/json.d, _json.d)
* Documentation: https://dlang.org/phobos/dmd_json.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/json.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/json.d
*/
module dmd.json;
diff --git a/gcc/d/dmd/lambdacomp.d b/gcc/d/dmd/lambdacomp.d
index 944abb5..9f9fd77 100644
--- a/gcc/d/dmd/lambdacomp.d
+++ b/gcc/d/dmd/lambdacomp.d
@@ -8,9 +8,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lamdbacomp.d, _lambdacomp.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/lambdacomp.d, _lambdacomp.d)
* Documentation: https://dlang.org/phobos/dmd_lambdacomp.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lambdacomp.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/lambdacomp.d
*/
module dmd.lambdacomp;
diff --git a/gcc/d/dmd/lexer.d b/gcc/d/dmd/lexer.d
index 4d0a222..ed9f7f1 100644
--- a/gcc/d/dmd/lexer.d
+++ b/gcc/d/dmd/lexer.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d, _lexer.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/lexer.d, _lexer.d)
* Documentation: https://dlang.org/phobos/dmd_lexer.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/lexer.d
*/
module dmd.lexer;
@@ -132,7 +132,7 @@ class Lexer
// debug printf("Lexer::Lexer(%p)\n", base);
// debug printf("lexer.filename = %s\n", filename);
token = Token.init;
- this.baseLoc = newBaseLoc(filename, endoffset);
+ this.baseLoc = newBaseLoc(filename, base[0 .. endoffset]);
this.linnum = 1;
this.base = base;
this.end = base + endoffset;
@@ -224,7 +224,7 @@ class Lexer
inTokenStringConstant = 0;
lastDocLine = 0;
- baseLoc = newBaseLoc("#defines", slice.length);
+ baseLoc = newBaseLoc("#defines", slice);
scanloc = baseLoc.getLoc(0);
}
diff --git a/gcc/d/dmd/location.d b/gcc/d/dmd/location.d
index b9f1cd4..393ffb8 100644
--- a/gcc/d/dmd/location.d
+++ b/gcc/d/dmd/location.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/location.d, _location.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/location.d, _location.d)
* Documentation: https://dlang.org/phobos/dmd_location.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/location.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/location.d
*/
module dmd.location;
@@ -64,7 +64,7 @@ nothrow:
extern (C++) static Loc singleFilename(const char* filename)
{
Loc result;
- locFileTable ~= new BaseLoc(filename.toDString, locIndex, 0, [0]);
+ locFileTable ~= new BaseLoc(filename.toDString, null, locIndex, 0, [0]);
result.index = locIndex++;
return result;
}
@@ -235,16 +235,20 @@ struct SourceLoc
uint column; /// column number (starts at 1)
uint fileOffset; /// byte index into file
+ /// Index `fileOffset` into this to to obtain source code context of this location
+ const(char)[] fileContent;
+
// aliases for backwards compatibility
alias linnum = line;
alias charnum = column;
- this(const(char)[] filename, uint line, uint column, uint fileOffset = 0) nothrow @nogc pure @safe
+ this(const(char)[] filename, uint line, uint column, uint fileOffset = 0, const(char)[] fileContent = null) nothrow @nogc pure @safe
{
this.filename = filename;
this.line = line;
this.column = column;
this.fileOffset = fileOffset;
+ this.fileContent = fileContent;
}
this(Loc loc) nothrow @nogc @trusted
@@ -300,15 +304,15 @@ private size_t fileTableIndex(uint index) nothrow @nogc
* Create a new source location map for a file
* Params:
* filename = source file name
- * size = space to reserve for locations, equal to the file size in bytes
+ * fileContent = content of source file
* Returns: new BaseLoc
*/
-BaseLoc* newBaseLoc(const(char)* filename, size_t size) nothrow
+BaseLoc* newBaseLoc(const(char)* filename, const(char)[] fileContent) nothrow
{
- locFileTable ~= new BaseLoc(filename.toDString, locIndex, 1, [0]);
+ locFileTable ~= new BaseLoc(filename.toDString, fileContent, locIndex, 1, [0]);
// Careful: the endloc of a FuncDeclaration can
// point to 1 past the very last byte in the file, so account for that
- locIndex += size + 1;
+ locIndex += fileContent.length + 1;
return locFileTable[$ - 1];
}
@@ -354,6 +358,7 @@ struct BaseLoc
@safe nothrow:
const(char)[] filename; /// Source file name
+ const(char)[] fileContents; /// Source file contents
uint startIndex; /// Subtract this from Loc.index to get file offset
int startLine = 1; /// Line number at index 0
uint[] lines; /// For each line, the file offset at which it starts. At index 0 there's always a 0 entry.
@@ -384,11 +389,11 @@ struct BaseLoc
{
auto fname = filename.toDString;
if (substitutions.length == 0)
- substitutions ~= BaseLoc(this.filename, 0, 0);
+ substitutions ~= BaseLoc(this.filename, null, 0, 0);
if (fname.length == 0)
fname = substitutions[$ - 1].filename;
- substitutions ~= BaseLoc(fname, offset, cast(int) (line - lines.length + startLine - 2));
+ substitutions ~= BaseLoc(fname, null, offset, cast(int) (line - lines.length + startLine - 2));
}
/// Returns: `loc` modified by substitutions from #file / #line directives
@@ -408,7 +413,7 @@ struct BaseLoc
private SourceLoc getSourceLoc(uint offset) @nogc
{
const i = getLineIndex(offset);
- const sl = SourceLoc(filename, cast(int) (i + startLine), cast(int) (1 + offset - lines[i]), offset);
+ const sl = SourceLoc(filename, cast(int) (i + startLine), cast(int) (1 + offset - lines[i]), offset, fileContents);
return substitute(sl);
}
diff --git a/gcc/d/dmd/mangle/basic.d b/gcc/d/dmd/mangle/basic.d
index cb92b6f..263dd5e 100644
--- a/gcc/d/dmd/mangle/basic.d
+++ b/gcc/d/dmd/mangle/basic.d
@@ -3,9 +3,9 @@
*
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/basicmangle.d, _basicmangle.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mangle/basic.d, _basicmangle.d)
* Documentation: https://dlang.org/phobos/dmd_basicmangle.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/basicmangle.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/mangle/basic.d
*/
module dmd.mangle.basic;
diff --git a/gcc/d/dmd/mangle/cpp.d b/gcc/d/dmd/mangle/cpp.d
index 3ab42e2..7e9f020 100644
--- a/gcc/d/dmd/mangle/cpp.d
+++ b/gcc/d/dmd/mangle/cpp.d
@@ -7,9 +7,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cppmangle.d, _cppmangle.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mangle/cpp.d, _cppmangle.d)
* Documentation: https://dlang.org/phobos/dmd_cppmangle.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cppmangle.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/mangle/cpp.d
*
* References:
* Follows Itanium C++ ABI 1.86 section 5.1
diff --git a/gcc/d/dmd/mangle/package.d b/gcc/d/dmd/mangle/package.d
index d630d6a..3ad2c7d 100644
--- a/gcc/d/dmd/mangle/package.d
+++ b/gcc/d/dmd/mangle/package.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmangle.d, _dmangle.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mangle/package.d, _dmangle.d)
* Documentation: https://dlang.org/phobos/dmd_dmangle.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmangle.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/mangle/package.d
* References: https://dlang.org/blog/2017/12/20/ds-newfangled-name-mangling/
*/
diff --git a/gcc/d/dmd/mtype.d b/gcc/d/dmd/mtype.d
index 5ba866c..a3e1a8c 100644
--- a/gcc/d/dmd/mtype.d
+++ b/gcc/d/dmd/mtype.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/mtype.d, _mtype.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mtype.d, _mtype.d)
* Documentation: https://dlang.org/phobos/dmd_mtype.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/mtype.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/mtype.d
*/
module dmd.mtype;
diff --git a/gcc/d/dmd/mustuse.d b/gcc/d/dmd/mustuse.d
index 005a6c0..fab9723 100644
--- a/gcc/d/dmd/mustuse.d
+++ b/gcc/d/dmd/mustuse.d
@@ -3,9 +3,9 @@
*
* Copyright: Copyright (C) 2022-2025 by The D Language Foundation, All Rights Reserved
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/mustuse.d, _mustuse.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/mustuse.d, _mustuse.d)
* Documentation: https://dlang.org/phobos/dmd_mustuse.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/mustuse.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/mustuse.d
*/
module dmd.mustuse;
diff --git a/gcc/d/dmd/nogc.d b/gcc/d/dmd/nogc.d
index 30e469d..f1494a4 100644
--- a/gcc/d/dmd/nogc.d
+++ b/gcc/d/dmd/nogc.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nogc.d, _nogc.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/nogc.d, _nogc.d)
* Documentation: https://dlang.org/phobos/dmd_nogc.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nogc.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/nogc.d
*/
module dmd.nogc;
diff --git a/gcc/d/dmd/nspace.d b/gcc/d/dmd/nspace.d
index 4a21770c..0c93f0e 100644
--- a/gcc/d/dmd/nspace.d
+++ b/gcc/d/dmd/nspace.d
@@ -39,9 +39,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nspace.d, _nspace.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/nspace.d, _nspace.d)
* Documentation: https://dlang.org/phobos/dmd_nspace.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nspace.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/nspace.d
*/
module dmd.nspace;
diff --git a/gcc/d/dmd/ob.d b/gcc/d/dmd/ob.d
index 870e8e7..099f811 100644
--- a/gcc/d/dmd/ob.d
+++ b/gcc/d/dmd/ob.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ob.d, _ob.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/ob.d, _ob.d)
* Documentation: https://dlang.org/phobos/dmd_escape.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ob.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/ob.d
* References: https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md Argument Ownership and Function Calls
*/
diff --git a/gcc/d/dmd/objc.d b/gcc/d/dmd/objc.d
index 4626f22..32878b5 100644
--- a/gcc/d/dmd/objc.d
+++ b/gcc/d/dmd/objc.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/objc.d, _objc.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/objc.d, _objc.d)
* Documentation: https://dlang.org/phobos/dmd_objc.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/objc.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/objc.d
*/
module dmd.objc;
diff --git a/gcc/d/dmd/opover.d b/gcc/d/dmd/opover.d
index 06b9e82..7baaeaa 100644
--- a/gcc/d/dmd/opover.d
+++ b/gcc/d/dmd/opover.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/opover.d, _opover.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/opover.d, _opover.d)
* Documentation: https://dlang.org/phobos/dmd_opover.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/opover.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/opover.d
*/
module dmd.opover;
diff --git a/gcc/d/dmd/optimize.d b/gcc/d/dmd/optimize.d
index 7f2b030..66b8c6a 100644
--- a/gcc/d/dmd/optimize.d
+++ b/gcc/d/dmd/optimize.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/optimize.d, _optimize.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/optimize.d, _optimize.d)
* Documentation: https://dlang.org/phobos/dmd_optimize.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/optimize.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/optimize.d
*/
module dmd.optimize;
diff --git a/gcc/d/dmd/parse.d b/gcc/d/dmd/parse.d
index 3d25464..e68017c 100644
--- a/gcc/d/dmd/parse.d
+++ b/gcc/d/dmd/parse.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/parse.d, _parse.d)
* Documentation: https://dlang.org/phobos/dmd_parse.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/parse.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/parse.d
*/
module dmd.parse;
diff --git a/gcc/d/dmd/pragmasem.d b/gcc/d/dmd/pragmasem.d
index a7299a0..4459774 100644
--- a/gcc/d/dmd/pragmasem.d
+++ b/gcc/d/dmd/pragmasem.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/pragmasem.d, _pragmasem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/pragmasem.d, _pragmasem.d)
* Documentation: https://dlang.org/phobos/dmd_pragmasem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/pragmasem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/pragmasem.d
*/
module dmd.pragmasem;
diff --git a/gcc/d/dmd/printast.d b/gcc/d/dmd/printast.d
index 281851e..5e4c9f7 100644
--- a/gcc/d/dmd/printast.d
+++ b/gcc/d/dmd/printast.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/printast.d, _printast.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/printast.d, _printast.d)
* Documentation: https://dlang.org/phobos/dmd_printast.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/printast.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/printast.d
*/
module dmd.printast;
diff --git a/gcc/d/dmd/root/aav.d b/gcc/d/dmd/root/aav.d
index 80b1d63..014d4a5 100644
--- a/gcc/d/dmd/root/aav.d
+++ b/gcc/d/dmd/root/aav.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/aav.d, root/_aav.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/aav.d, root/_aav.d)
* Documentation: https://dlang.org/phobos/dmd_root_aav.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/aav.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/aav.d
*/
module dmd.root.aav;
diff --git a/gcc/d/dmd/root/array.d b/gcc/d/dmd/root/array.d
index f36947e..a80fc80 100644
--- a/gcc/d/dmd/root/array.d
+++ b/gcc/d/dmd/root/array.d
@@ -5,9 +5,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/array.d, root/_array.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/array.d, root/_array.d)
* Documentation: https://dlang.org/phobos/dmd_root_array.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/array.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/array.d
*/
module dmd.root.array;
diff --git a/gcc/d/dmd/root/bitarray.d b/gcc/d/dmd/root/bitarray.d
index b977602..b5adaa8 100644
--- a/gcc/d/dmd/root/bitarray.d
+++ b/gcc/d/dmd/root/bitarray.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.d, root/_bitarray.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/bitarray.d, root/_bitarray.d)
* Documentation: https://dlang.org/phobos/dmd_root_array.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/bitarray.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/bitarray.d
*/
module dmd.root.bitarray;
diff --git a/gcc/d/dmd/root/complex.d b/gcc/d/dmd/root/complex.d
index 710d0e9..777c103 100644
--- a/gcc/d/dmd/root/complex.d
+++ b/gcc/d/dmd/root/complex.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/complex.d, _complex.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/complex.d, _complex.d)
* Documentation: https://dlang.org/phobos/dmd_root_complex.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/complex.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/complex.d
*/
module dmd.root.complex;
diff --git a/gcc/d/dmd/root/ctfloat.d b/gcc/d/dmd/root/ctfloat.d
index 080fa3d..eb3b71c 100644
--- a/gcc/d/dmd/root/ctfloat.d
+++ b/gcc/d/dmd/root/ctfloat.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.d, root/_ctfloat.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/ctfloat.d, root/_ctfloat.d)
* Documentation: https://dlang.org/phobos/dmd_root_ctfloat.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/ctfloat.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/ctfloat.d
*/
module dmd.root.ctfloat;
diff --git a/gcc/d/dmd/root/file.d b/gcc/d/dmd/root/file.d
index 7accc61..2046e59 100644
--- a/gcc/d/dmd/root/file.d
+++ b/gcc/d/dmd/root/file.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/file.d, root/_file.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/file.d, root/_file.d)
* Documentation: https://dlang.org/phobos/dmd_root_file.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/file.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/file.d
*/
module dmd.root.file;
diff --git a/gcc/d/dmd/root/filename.d b/gcc/d/dmd/root/filename.d
index 602e62c..5ad0775 100644
--- a/gcc/d/dmd/root/filename.d
+++ b/gcc/d/dmd/root/filename.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d, root/_filename.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/filename.d, root/_filename.d)
* Documentation: https://dlang.org/phobos/dmd_root_filename.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/filename.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/filename.d
*/
module dmd.root.filename;
diff --git a/gcc/d/dmd/root/hash.d b/gcc/d/dmd/root/hash.d
index 0852a9f..d327f4b 100644
--- a/gcc/d/dmd/root/hash.d
+++ b/gcc/d/dmd/root/hash.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Martin Nowak, Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/hash.d, root/_hash.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/hash.d, root/_hash.d)
* Documentation: https://dlang.org/phobos/dmd_root_hash.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/hash.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/hash.d
*/
module dmd.root.hash;
diff --git a/gcc/d/dmd/root/optional.d b/gcc/d/dmd/root/optional.d
index 8602bcf..2b518eb 100644
--- a/gcc/d/dmd/root/optional.d
+++ b/gcc/d/dmd/root/optional.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.d, root/_optional.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/optional.d, root/_optional.d)
* Documentation: https://dlang.org/phobos/dmd_root_optional.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/optional.d
*/
module dmd.root.optional;
diff --git a/gcc/d/dmd/root/optional.h b/gcc/d/dmd/root/optional.h
index e01a612..12891f8 100644
--- a/gcc/d/dmd/root/optional.h
+++ b/gcc/d/dmd/root/optional.h
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.h, root/_optional.h)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/optional.h, root/_optional.h)
* Documentation: https://dlang.org/phobos/dmd_root_optional.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.h
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/optional.h
*/
#include "dcompat.h" // for d_bool
diff --git a/gcc/d/dmd/root/port.d b/gcc/d/dmd/root/port.d
index 4f21884..5fd8080 100644
--- a/gcc/d/dmd/root/port.d
+++ b/gcc/d/dmd/root/port.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/port.d, root/_port.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/port.d, root/_port.d)
* Documentation: https://dlang.org/phobos/dmd_root_port.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/port.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/port.d
*/
module dmd.root.port;
diff --git a/gcc/d/dmd/root/region.d b/gcc/d/dmd/root/region.d
index 3928a55..a8efbca 100644
--- a/gcc/d/dmd/root/region.d
+++ b/gcc/d/dmd/root/region.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 2019-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/region.d, root/_region.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/region.d, root/_region.d)
* Documentation: https://dlang.org/phobos/dmd_root_region.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/region.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/region.d
*/
module dmd.root.region;
diff --git a/gcc/d/dmd/root/rmem.d b/gcc/d/dmd/root/rmem.d
index 8fa0b08..32d22d3 100644
--- a/gcc/d/dmd/root/rmem.d
+++ b/gcc/d/dmd/root/rmem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.d, root/_rmem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/rmem.d, root/_rmem.d)
* Documentation: https://dlang.org/phobos/dmd_root_rmem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/rmem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/rmem.d
*/
module dmd.root.rmem;
diff --git a/gcc/d/dmd/root/speller.d b/gcc/d/dmd/root/speller.d
index e984a9e..a215110 100644
--- a/gcc/d/dmd/root/speller.d
+++ b/gcc/d/dmd/root/speller.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/speller.d, root/_speller.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/speller.d, root/_speller.d)
* Documentation: https://dlang.org/phobos/dmd_root_speller.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/speller.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/speller.d
*/
module dmd.root.speller;
diff --git a/gcc/d/dmd/root/string.d b/gcc/d/dmd/root/string.d
index 252ed77..369a79b 100644
--- a/gcc/d/dmd/root/string.d
+++ b/gcc/d/dmd/root/string.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/string.d, root/_string.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/string.d, root/_string.d)
* Documentation: https://dlang.org/phobos/dmd_root_string.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/string.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/string.d
*/
module dmd.root.string;
diff --git a/gcc/d/dmd/root/stringtable.d b/gcc/d/dmd/root/stringtable.d
index b40e7df..c7a2c8c 100644
--- a/gcc/d/dmd/root/stringtable.d
+++ b/gcc/d/dmd/root/stringtable.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/stringtable.d, root/_stringtable.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/stringtable.d, root/_stringtable.d)
* Documentation: https://dlang.org/phobos/dmd_root_stringtable.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/stringtable.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/stringtable.d
*/
module dmd.root.stringtable;
diff --git a/gcc/d/dmd/root/utf.d b/gcc/d/dmd/root/utf.d
index ede1fd8..5b2c42f 100644
--- a/gcc/d/dmd/root/utf.d
+++ b/gcc/d/dmd/root/utf.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/utf.d, _utf.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/root/utf.d, _utf.d)
* Documentation: https://dlang.org/phobos/dmd_root_utf.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/utf.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/root/utf.d
*/
module dmd.root.utf;
diff --git a/gcc/d/dmd/rootobject.d b/gcc/d/dmd/rootobject.d
index 8b8a13c..71b36a4 100644
--- a/gcc/d/dmd/rootobject.d
+++ b/gcc/d/dmd/rootobject.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: Walter Bright, https://www.digitalmars.com
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/rootobject.d, _rootobject.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/rootobject.d, _rootobject.d)
* Documentation: https://dlang.org/phobos/dmd_rootobject.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/rootobject.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/rootobject.d
*/
module dmd.rootobject;
diff --git a/gcc/d/dmd/safe.d b/gcc/d/dmd/safe.d
index 3f83d50..3be9efe 100644
--- a/gcc/d/dmd/safe.d
+++ b/gcc/d/dmd/safe.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/safe.d, _safe.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/safe.d, _safe.d)
* Documentation: https://dlang.org/phobos/dmd_safe.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/safe.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/safe.d
*/
module dmd.safe;
diff --git a/gcc/d/dmd/semantic2.d b/gcc/d/dmd/semantic2.d
index 4b410a1..1c58e63 100644
--- a/gcc/d/dmd/semantic2.d
+++ b/gcc/d/dmd/semantic2.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic2.d, _semantic2.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/semantic2.d, _semantic2.d)
* Documentation: https://dlang.org/phobos/dmd_semantic2.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic2.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/semantic2.d
*/
module dmd.semantic2;
diff --git a/gcc/d/dmd/semantic3.d b/gcc/d/dmd/semantic3.d
index bfb8c75..a24af7b 100644
--- a/gcc/d/dmd/semantic3.d
+++ b/gcc/d/dmd/semantic3.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic3.d, _semantic3.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/semantic3.d, _semantic3.d)
* Documentation: https://dlang.org/phobos/dmd_semantic3.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic3.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/semantic3.d
*/
module dmd.semantic3;
diff --git a/gcc/d/dmd/sideeffect.d b/gcc/d/dmd/sideeffect.d
index 8f905ca..5984466 100644
--- a/gcc/d/dmd/sideeffect.d
+++ b/gcc/d/dmd/sideeffect.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/sideeffect.d, _sideeffect.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/sideeffect.d, _sideeffect.d)
* Documentation: https://dlang.org/phobos/dmd_sideeffect.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/sideeffect.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/sideeffect.d
*/
module dmd.sideeffect;
diff --git a/gcc/d/dmd/statement.d b/gcc/d/dmd/statement.d
index 602d3a6..2ade0a9 100644
--- a/gcc/d/dmd/statement.d
+++ b/gcc/d/dmd/statement.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement.d, _statement.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/statement.d, _statement.d)
* Documentation: https://dlang.org/phobos/dmd_statement.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/statement.d
*/
module dmd.statement;
diff --git a/gcc/d/dmd/statementsem.d b/gcc/d/dmd/statementsem.d
index 04d0b40..0c9b6be 100644
--- a/gcc/d/dmd/statementsem.d
+++ b/gcc/d/dmd/statementsem.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statementsem.d, _statementsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/statementsem.d, _statementsem.d)
* Documentation: https://dlang.org/phobos/dmd_statementsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statementsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/statementsem.d
*/
module dmd.statementsem;
diff --git a/gcc/d/dmd/staticassert.d b/gcc/d/dmd/staticassert.d
index 495241e..52ded55 100644
--- a/gcc/d/dmd/staticassert.d
+++ b/gcc/d/dmd/staticassert.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.d, _staticassert.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/staticassert.d, _staticassert.d)
* Documentation: https://dlang.org/phobos/dmd_staticassert.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticassert.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/staticassert.d
*/
module dmd.staticassert;
diff --git a/gcc/d/dmd/staticcond.d b/gcc/d/dmd/staticcond.d
index 288cfdc..c2e87c7 100644
--- a/gcc/d/dmd/staticcond.d
+++ b/gcc/d/dmd/staticcond.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticcond.d, _staticcond.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/staticcond.d, _staticcond.d)
* Documentation: https://dlang.org/phobos/dmd_staticcond.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticcond.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/staticcond.d
*/
module dmd.staticcond;
diff --git a/gcc/d/dmd/stmtstate.d b/gcc/d/dmd/stmtstate.d
index fe53d80..1c1fd08 100644
--- a/gcc/d/dmd/stmtstate.d
+++ b/gcc/d/dmd/stmtstate.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/stmtstate.d, _stmtstate.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/stmtstate.d, _stmtstate.d)
* Documentation: https://dlang.org/phobos/dmd_stmtstate.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/stmtstate.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/stmtstate.d
*/
module dmd.stmtstate;
diff --git a/gcc/d/dmd/target.d b/gcc/d/dmd/target.d
index e32851b..46926cd 100644
--- a/gcc/d/dmd/target.d
+++ b/gcc/d/dmd/target.d
@@ -18,9 +18,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/target.d, _target.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/target.d, _target.d)
* Documentation: https://dlang.org/phobos/dmd_target.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/target.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/target.d
*/
module dmd.target;
diff --git a/gcc/d/dmd/templateparamsem.d b/gcc/d/dmd/templateparamsem.d
index e7a40a0..561181a 100644
--- a/gcc/d/dmd/templateparamsem.d
+++ b/gcc/d/dmd/templateparamsem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/templateparamsem.d, _templateparamsem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/templateparamsem.d, _templateparamsem.d)
* Documentation: https://dlang.org/phobos/dmd_templateparamsem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/templateparamsem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/templateparamsem.d
*/
module dmd.templateparamsem;
diff --git a/gcc/d/dmd/templatesem.d b/gcc/d/dmd/templatesem.d
index 17526e6..e5efce4 100644
--- a/gcc/d/dmd/templatesem.d
+++ b/gcc/d/dmd/templatesem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/templatesem.d, _templatesem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/templatesem.d, _templatesem.d)
* Documentation: https://dlang.org/phobos/dmd_templatesem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/templatesem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/templatesem.d
*/
module dmd.templatesem;
diff --git a/gcc/d/dmd/timetrace.d b/gcc/d/dmd/timetrace.d
index 7d1fd73..742dde0 100644
--- a/gcc/d/dmd/timetrace.d
+++ b/gcc/d/dmd/timetrace.d
@@ -9,9 +9,9 @@ This file is originally from LDC (the LLVM D compiler).
Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved
Authors: Johan Engelen, Max Haughton, Dennis Korpel
License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
-Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/timetrace.d, common/_timetrace.d)
+Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/timetrace.d, common/_timetrace.d)
Documentation: https://dlang.org/phobos/dmd_common_timetrace.html
-Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/timetrace.d
+Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/timetrace.d
*/
module dmd.timetrace;
diff --git a/gcc/d/dmd/tokens.d b/gcc/d/dmd/tokens.d
index 3a6e14c..a106207 100644
--- a/gcc/d/dmd/tokens.d
+++ b/gcc/d/dmd/tokens.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/tokens.d, _tokens.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/tokens.d, _tokens.d)
* Documentation: https://dlang.org/phobos/dmd_tokens.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/tokens.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/tokens.d
*/
module dmd.tokens;
diff --git a/gcc/d/dmd/traits.d b/gcc/d/dmd/traits.d
index 37363ff..127a89d 100644
--- a/gcc/d/dmd/traits.d
+++ b/gcc/d/dmd/traits.d
@@ -6,9 +6,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/traits.d, _traits.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/traits.d, _traits.d)
* Documentation: https://dlang.org/phobos/dmd_traits.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/traits.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/traits.d
*/
module dmd.traits;
diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d
index c5a3b83..d4c7a58 100644
--- a/gcc/d/dmd/typesem.d
+++ b/gcc/d/dmd/typesem.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typesem.d, _typesem.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/typesem.d, _typesem.d)
* Documentation: https://dlang.org/phobos/dmd_typesem.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typesem.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/typesem.d
*/
module dmd.typesem;
@@ -3266,9 +3266,19 @@ Type merge(Type type)
case Tsarray:
// prevents generating the mangle if the array dim is not yet known
- if (!type.isTypeSArray().dim.isIntegerExp())
- return type;
- goto default;
+ if (auto ie = type.isTypeSArray().dim.isIntegerExp())
+ {
+ // After TypeSemantic, the length is always converted to size_t, but the parser
+ // usually generates regular integer types (e.g. in cast(const ubyte[2])) which
+ // it may try to merge, which then leads to failing implicit conversions as 2LU != 2
+ // according to Expression.equals. Only merge array types with size_t lengths for now.
+ // https://github.com/dlang/dmd/issues/21179
+ if (ie.type != Type.tsize_t)
+ return type;
+
+ goto default;
+ }
+ return type;
case Tenum:
break;
diff --git a/gcc/d/dmd/typinf.d b/gcc/d/dmd/typinf.d
index f0ced82..1c7ed32 100644
--- a/gcc/d/dmd/typinf.d
+++ b/gcc/d/dmd/typinf.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typinf.d, _typinf.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/typinf.d, _typinf.d)
* Documentation: https://dlang.org/phobos/dmd_typinf.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typinf.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/typinf.d
*/
module dmd.typinf;
diff --git a/gcc/d/dmd/utils.d b/gcc/d/dmd/utils.d
index e20b86f..bfa197a 100644
--- a/gcc/d/dmd/utils.d
+++ b/gcc/d/dmd/utils.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utils.d, _utils.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/utils.d, _utils.d)
* Documentation: https://dlang.org/phobos/dmd_utils.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utils.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/utils.d
*/
module dmd.utils;
diff --git a/gcc/d/dmd/visitor/foreachvar.d b/gcc/d/dmd/visitor/foreachvar.d
index d170206..80611d6 100644
--- a/gcc/d/dmd/visitor/foreachvar.d
+++ b/gcc/d/dmd/visitor/foreachvar.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/foreachvar.d, _foreachvar.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/visitor/foreachvar.d, _foreachvar.d)
* Documentation: https://dlang.org/phobos/dmd_foreachvar.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/foreachvar.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/visitor/foreachvar.d
*/
module dmd.visitor.foreachvar;
diff --git a/gcc/d/dmd/visitor/package.d b/gcc/d/dmd/visitor/package.d
index 64e2514..50b5a54 100644
--- a/gcc/d/dmd/visitor/package.d
+++ b/gcc/d/dmd/visitor/package.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/visitor.d, _visitor.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/visitor/package.d, _visitor.d)
* Documentation: https://dlang.org/phobos/dmd_visitor.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/visitor.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/visitor/package.d
*/
module dmd.visitor;
diff --git a/gcc/d/dmd/visitor/postorder.d b/gcc/d/dmd/visitor/postorder.d
index 731e682..22549da 100644
--- a/gcc/d/dmd/visitor/postorder.d
+++ b/gcc/d/dmd/visitor/postorder.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/apply.d, _apply.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/visitor/postorder.d, _apply.d)
* Documentation: https://dlang.org/phobos/dmd_apply.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/apply.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/visitor/postorder.d
*/
module dmd.visitor.postorder;
diff --git a/gcc/d/dmd/visitor/statement_rewrite_walker.d b/gcc/d/dmd/visitor/statement_rewrite_walker.d
index 6700414..25e4c73 100644
--- a/gcc/d/dmd/visitor/statement_rewrite_walker.d
+++ b/gcc/d/dmd/visitor/statement_rewrite_walker.d
@@ -4,9 +4,9 @@
* Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
* Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
* License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
- * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement_rewrite_walker.d, _statement_rewrite_walker.d)
+ * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/visitor/statement_rewrite_walker.d, _statement_rewrite_walker.d)
* Documentation: https://dlang.org/phobos/dmd_statement_rewrite_walker.html
- * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement_rewrite_walker.d
+ * Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/visitor/statement_rewrite_walker.d
*/
module dmd.visitor.statement_rewrite_walker;
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index 0415763..268a176 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -1026,7 +1026,6 @@ public:
if (tb1->ty == TY::Tstruct)
{
tree t1 = build_expr (e->e1);
- tree t2 = convert_for_assignment (e->e2, e->e1->type, true);
StructDeclaration *sd = tb1->isTypeStruct ()->sym;
/* Look for struct = 0. */
@@ -1051,25 +1050,8 @@ public:
else
{
/* Simple struct literal assignment. */
- tree init = NULL_TREE;
-
- /* Fill any alignment holes in the struct using memset. */
- if ((e->op == EXP::construct
- || (e->e2->op == EXP::structLiteral && e->op == EXP::blit))
- && (sd->isUnionDeclaration () || !identity_compare_p (sd)))
- {
- t1 = stabilize_reference (t1);
- init = build_memset_call (t1);
- }
-
- /* Elide generating assignment if init is all zeroes. */
- if (init != NULL_TREE && initializer_zerop (t2))
- this->result_ = compound_expr (init, t1);
- else
- {
- tree result = build_assign (modifycode, t1, t2);
- this->result_ = compound_expr (init, result);
- }
+ tree t2 = convert_for_assignment (e->e2, e->e1->type, true);
+ this->result_ = build_assign (modifycode, t1, t2);
}
return;
@@ -2243,6 +2225,8 @@ public:
storage class, then the instance is allocated on the stack
rather than the heap or using the class specific allocator. */
tree var = build_local_temp (TREE_TYPE (type));
+ SET_DECL_ALIGN (var, cd->alignsize * BITS_PER_UNIT);
+ DECL_USER_ALIGN (var) = 1;
new_call = build_nop (type, build_address (var));
setup_exp = modify_expr (var, aggregate_initializer_decl (cd));
}
@@ -2455,7 +2439,7 @@ public:
CONSTRUCTOR_APPEND_ELT (ce, TYPE_FIELDS (aatype), mem);
result = build_nop (build_ctype (e->type),
- build_constructor (aatype, ce));
+ build_padded_constructor (aatype, ce));
}
else
gcc_unreachable ();
@@ -2528,7 +2512,7 @@ public:
CONSTRUCTOR_APPEND_ELT (elms, size_int (i), value);
}
- tree ctor = build_constructor (type, elms);
+ tree ctor = build_padded_constructor (type, elms);
TREE_CONSTANT (ctor) = 1;
this->result_ = ctor;
return;
@@ -2610,8 +2594,10 @@ public:
this->result_ = d_array_value (build_ctype (e->type),
size_int (0), null_pointer_node);
else
- this->result_ = build_constructor (make_array_type (tb->nextOf (), 0),
- NULL);
+ {
+ tree arrtype = make_array_type (tb->nextOf (), 0);
+ this->result_ = build_padded_constructor (arrtype, NULL);
+ }
return;
}
@@ -2652,7 +2638,7 @@ public:
/* Now return the constructor as the correct type. For static arrays there
is nothing else to do. For dynamic arrays, return a two field struct.
For pointers, return the address. */
- tree ctor = build_constructor (satype, elms);
+ tree ctor = build_padded_constructor (satype, elms);
tree type = build_ctype (e->type);
/* Nothing else to do for static arrays. */
@@ -2681,22 +2667,6 @@ public:
if (constant_p && initializer_constant_valid_p (ctor, TREE_TYPE (ctor)))
TREE_STATIC (ctor) = 1;
- /* Use memset to fill any alignment holes in the array. */
- if (!this->constp_ && !this->literalp_)
- {
- TypeStruct *ts = etype->baseElemOf ()->isTypeStruct ();
-
- if (ts != NULL && (!identity_compare_p (ts->sym)
- || ts->sym->isUnionDeclaration ()))
- {
- tree var = build_local_temp (TREE_TYPE (ctor));
- tree init = build_memset_call (var);
- /* Evaluate memset() first, then any saved elements. */
- saved_elems = compound_expr (init, saved_elems);
- ctor = compound_expr (modify_expr (var, ctor), var);
- }
- }
-
this->result_ = compound_expr (saved_elems, d_convert (type, ctor));
}
else if (e->onstack)
@@ -2722,6 +2692,9 @@ public:
tree result = build_memcpy_call (mem, build_address (ctor), size);
+ /* Fill any alignment holes in the array. */
+ result = compound_expr (result, build_clear_padding_call (mem));
+
/* Return the array pointed to by MEM. */
result = compound_expr (result, mem);
@@ -2753,7 +2726,7 @@ public:
TypeAArray *ta = tb->isTypeAArray ();
if (e->keys->length == 0)
{
- this->result_ = build_constructor (build_ctype (ta), NULL);
+ this->result_ = build_padded_constructor (build_ctype (ta), NULL);
return;
}
@@ -2785,7 +2758,7 @@ public:
CONSTRUCTOR_APPEND_ELT (ce, TYPE_FIELDS (aatype), mem);
tree result = build_nop (build_ctype (e->type),
- build_constructor (aatype, ce));
+ build_padded_constructor (aatype, ce));
this->result_ = compound_expr (init, result);
}
@@ -2796,7 +2769,7 @@ public:
/* Handle empty struct literals. */
if (e->elements == NULL || e->sd->fields.length == 0)
{
- this->result_ = build_constructor (build_ctype (e->type), NULL);
+ this->result_ = build_padded_constructor (build_ctype (e->type), NULL);
return;
}
@@ -2847,7 +2820,7 @@ public:
elem = d_save_expr (elem);
if (initializer_zerop (elem))
- value = build_constructor (build_ctype (ftype), NULL);
+ value = build_padded_constructor (build_ctype (ftype), NULL);
else
value = build_array_from_val (ftype, elem);
}
@@ -2895,18 +2868,6 @@ public:
tree var = build_deref (e->sym);
ctor = compound_expr (modify_expr (var, ctor), var);
}
- else if (!this->literalp_)
- {
- /* Use memset to fill any alignment holes in the object. */
- if (!identity_compare_p (e->sd) || e->sd->isUnionDeclaration ())
- {
- tree var = build_local_temp (TREE_TYPE (ctor));
- tree init = build_memset_call (var);
- /* Evaluate memset() first, then any saved element constructors. */
- saved_elems = compound_expr (init, saved_elems);
- ctor = compound_expr (modify_expr (var, ctor), var);
- }
- }
this->result_ = compound_expr (saved_elems, ctor);
}
@@ -2946,7 +2907,7 @@ public:
if (constant_p)
this->result_ = build_vector_from_ctor (type, elms);
else
- this->result_ = build_constructor (type, elms);
+ this->result_ = build_padded_constructor (type, elms);
}
else if (e->e1->type->toBasetype ()->ty == TY::Tsarray)
{
diff --git a/gcc/d/gdc.texi b/gcc/d/gdc.texi
index 2cb0c4a62..3a8bea0 100644
--- a/gcc/d/gdc.texi
+++ b/gcc/d/gdc.texi
@@ -277,6 +277,12 @@ Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202002}.
Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202302}.
@end table
+@opindex finclude-imports
+@item -finclude-imports
+Include imported modules in the compilation, as if they were given on the
+command line. When this option is enabled, all imported modules are compiled
+except those that are part of libphobos.
+
@opindex finvariants
@opindex fno-invariants
@item -fno-invariants
diff --git a/gcc/d/imports.cc b/gcc/d/imports.cc
index 776caaf..16e4df6 100644
--- a/gcc/d/imports.cc
+++ b/gcc/d/imports.cc
@@ -182,7 +182,11 @@ public:
vec_alloc (tset, d->a.length);
for (size_t i = 0; i < d->a.length; i++)
- vec_safe_push (tset, build_import_decl (d->a[i]));
+ {
+ tree overload = build_import_decl (d->a[i]);
+ if (overload != NULL_TREE)
+ vec_safe_push (tset, overload);
+ }
this->result_ = build_tree_list_vec (tset);
tset->truncate (0);
diff --git a/gcc/d/lang.opt b/gcc/d/lang.opt
index 50c6f2f..298ff58 100644
--- a/gcc/d/lang.opt
+++ b/gcc/d/lang.opt
@@ -327,6 +327,10 @@ fignore-unknown-pragmas
D
Ignore unsupported pragmas.
+finclude-imports
+D RejectNegative
+Include imported modules in the compilation.
+
finvariants
D Var(flag_invariants)
Generate code for class invariant contracts.
diff --git a/gcc/d/lang.opt.urls b/gcc/d/lang.opt.urls
index 40bbca7..b4886bf 100644
--- a/gcc/d/lang.opt.urls
+++ b/gcc/d/lang.opt.urls
@@ -75,6 +75,9 @@ UrlSuffix(gcc/Warning-Options.html#index-Wextra) LangUrlSuffix_D(gdc/Warnings.ht
Wmismatched-special-enum
LangUrlSuffix_D(gdc/Warnings.html#index-Wmismatched-special-enum)
+Wpsabi
+UrlSuffix(gcc/Warning-Options.html#index-Wno-psabi)
+
Wspeculative
LangUrlSuffix_D(gdc/Warnings.html#index-Wno-speculative)
@@ -152,6 +155,9 @@ LangUrlSuffix_D(gdc/Runtime-Options.html#index-fextern-std)
fignore-unknown-pragmas
LangUrlSuffix_D(gdc/Warnings.html#index-fignore-unknown-pragmas)
+finclude-imports
+LangUrlSuffix_D(gdc/Runtime-Options.html#index-finclude-imports)
+
finvariants
LangUrlSuffix_D(gdc/Runtime-Options.html#index-finvariants)
diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc
index 471ac43..14e4a48 100644
--- a/gcc/d/modules.cc
+++ b/gcc/d/modules.cc
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "cgraph.h"
#include "stor-layout.h"
+#include "debug.h"
#include "toplev.h"
#include "target.h"
#include "common/common-target.h"
@@ -667,7 +668,7 @@ layout_moduleinfo (Module *decl)
CONSTRUCTOR_APPEND_ELT (minit, NULL_TREE, size_int (aimports_dim));
CONSTRUCTOR_APPEND_ELT (minit, NULL_TREE,
- build_constructor (satype, elms));
+ build_padded_constructor (satype, elms));
}
if (flags & MIlocalClasses)
@@ -684,7 +685,7 @@ layout_moduleinfo (Module *decl)
CONSTRUCTOR_APPEND_ELT (minit, NULL_TREE, size_int (aclasses.length));
CONSTRUCTOR_APPEND_ELT (minit, NULL_TREE,
- build_constructor (satype, elms));
+ build_padded_constructor (satype, elms));
}
if (flags & MIname)
@@ -927,6 +928,14 @@ d_finish_compilation (tree *vec, int len)
/* Complete all generated thunks. */
symtab->process_same_body_aliases ();
+ /* Output debug information for all type declarations in this unit. */
+ for (int i = 0; i < len; i++)
+ {
+ tree decl = vec[i];
+ if (TREE_CODE (decl) == TYPE_DECL)
+ debug_hooks->type_decl (decl, false);
+ }
+
/* Process all file scopes in this compilation, and the external_scope,
through wrapup_global_declarations. */
for (int i = 0; i < len; i++)
diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc
index 427a662..554399b 100644
--- a/gcc/d/toir.cc
+++ b/gcc/d/toir.cc
@@ -1058,13 +1058,8 @@ public:
if (sle != NULL)
{
- StructDeclaration *sd = type->baseElemOf ()->isTypeStruct ()->sym;
sle->sym = build_address (this->func_->shidden);
using_rvo_p = true;
-
- /* Fill any alignment holes in the return slot using memset. */
- if (!identity_compare_p (sd) || sd->isUnionDeclaration ())
- add_stmt (build_memset_call (this->func_->shidden));
}
if (using_rvo_p == true)
@@ -1455,7 +1450,8 @@ public:
oconstraints[i] = constraint;
if (parse_output_constraint (&constraint, i, ninputs, noutputs,
- &allows_mem, &allows_reg, &is_inout))
+ &allows_mem, &allows_reg, &is_inout,
+ nullptr))
{
/* If the output argument is going to end up in memory. */
if (!allows_reg)
@@ -1474,7 +1470,8 @@ public:
= TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
if (parse_input_constraint (&constraint, i, ninputs, noutputs, 0,
- oconstraints, &allows_mem, &allows_reg))
+ oconstraints, &allows_mem, &allows_reg,
+ nullptr))
{
/* If the input argument is going to end up in memory. */
if (!allows_reg && allows_mem)
diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc
index e81b2f0..4c3e9e4 100644
--- a/gcc/d/typeinfo.cc
+++ b/gcc/d/typeinfo.cc
@@ -489,14 +489,14 @@ class TypeInfoVisitor : public Visitor
CONSTRUCTOR_APPEND_ELT (v, size_int (3), size_int (b->offset));
/* Add to the array of interfaces. */
- value = build_constructor (vtbl_interface_type_node, v);
+ value = build_padded_constructor (vtbl_interface_type_node, v);
CONSTRUCTOR_APPEND_ELT (elms, size_int (i), value);
}
tree domain = size_int (cd->vtblInterfaces->length - 1);
tree arrtype = build_array_type (vtbl_interface_type_node,
build_index_type (domain));
- return build_constructor (arrtype, elms);
+ return build_padded_constructor (arrtype, elms);
}
/* Write out the interfacing vtable[] of base class BCD that will be accessed
@@ -542,7 +542,7 @@ class TypeInfoVisitor : public Visitor
tree vtbldomain = build_index_type (size_int (id->vtbl.length - 1));
tree vtbltype = build_array_type (vtable_entry_type, vtbldomain);
- tree value = build_constructor (vtbltype, elms);
+ tree value = build_padded_constructor (vtbltype, elms);
this->layout_field (value);
}
@@ -1160,7 +1160,7 @@ public:
CONSTRUCTOR_APPEND_ELT (elms, size_int (i),
build_typeinfo (d->loc, arg->type));
}
- tree ctor = build_constructor (build_ctype (satype), elms);
+ tree ctor = build_padded_constructor (build_ctype (satype), elms);
tree decl = this->internal_reference (ctor);
tree length = size_int (ti->arguments->length);
diff --git a/gcc/d/types.cc b/gcc/d/types.cc
index 98074f1..1c74840 100644
--- a/gcc/d/types.cc
+++ b/gcc/d/types.cc
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "tm.h"
#include "function.h"
-#include "toplev.h"
#include "target.h"
#include "stringpool.h"
#include "stor-layout.h"
@@ -709,13 +708,8 @@ finish_aggregate_type (unsigned structsize, unsigned alignsize, tree type)
TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (type);
}
- /* Finish debugging output for this type. */
- rest_of_type_compilation (type, TYPE_FILE_SCOPE_P (type));
+ /* Complete any other forward-referenced fields of this aggregate type. */
finish_incomplete_fields (type);
-
- /* Finish processing of TYPE_DECL. */
- rest_of_decl_compilation (TYPE_NAME (type),
- DECL_FILE_SCOPE_P (TYPE_NAME (type)), 0);
}
/* Returns true if the class or struct type TYPE has already been layed out by
@@ -1185,13 +1179,28 @@ public:
layout_type (t->ctype);
- /* Finish debugging output for this type. */
- rest_of_type_compilation (t->ctype, TYPE_FILE_SCOPE_P (t->ctype));
- finish_incomplete_fields (t->ctype);
+ /* Fix up all forward-referenced variants of this enum type. */
+ for (tree v = TYPE_MAIN_VARIANT (t->ctype); v;
+ v = TYPE_NEXT_VARIANT (v))
+ {
+ if (v == t->ctype)
+ continue;
- /* Finish processing of TYPE_DECL. */
- rest_of_decl_compilation (TYPE_NAME (t->ctype),
- DECL_FILE_SCOPE_P (TYPE_NAME (t->ctype)), 0);
+ TYPE_VALUES (v) = TYPE_VALUES (t->ctype);
+ TYPE_LANG_SPECIFIC (v) = TYPE_LANG_SPECIFIC (t->ctype);
+ TYPE_MIN_VALUE (v) = TYPE_MIN_VALUE (t->ctype);
+ TYPE_MAX_VALUE (v) = TYPE_MAX_VALUE (t->ctype);
+ TYPE_UNSIGNED (v) = TYPE_UNSIGNED (t->ctype);
+ TYPE_SIZE (v) = TYPE_SIZE (t->ctype);
+ TYPE_SIZE_UNIT (v) = TYPE_SIZE_UNIT (t->ctype);
+ SET_TYPE_MODE (v, TYPE_MODE (t->ctype));
+ TYPE_PRECISION (v) = TYPE_PRECISION (t->ctype);
+ SET_TYPE_ALIGN (v, TYPE_ALIGN (t->ctype));
+ TYPE_USER_ALIGN (v) = TYPE_USER_ALIGN (t->ctype);
+ }
+
+ /* Complete forward-referenced fields of this enum type. */
+ finish_incomplete_fields (t->ctype);
}
}
@@ -1278,7 +1287,8 @@ public:
build_type_decl (basetype, t->sym);
set_visibility_for_decl (basetype, t->sym);
apply_user_attributes (t->sym, basetype);
- finish_aggregate_type (t->sym->structsize, t->sym->alignsize, basetype);
+ /* The underlying record type of classes are packed. */
+ finish_aggregate_type (t->sym->structsize, 1, basetype);
/* Classes only live in memory, so always set the TREE_ADDRESSABLE bit. */
for (tree tv = basetype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT (tv))