https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114434
--- Comment #6 from Iain Buclaw <ibuclaw at gcc dot gnu.org> --- @Rainer, I think I've found the cause for discrepancy, a use of size_t vs. widest integer for pointer offsets. Can you give this a test? --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -1499,7 +1499,7 @@ public: void visit (PtrExp *e) final override { Type *tnext = NULL; - size_t offset; + dinteger_t offset; tree result; if (e->e1->op == EXP::add) @@ -2074,7 +2074,7 @@ public: void visit (SymOffExp *e) final override { /* Build the address and offset of the symbol. */ - size_t soffset = e->isSymOffExp ()->offset; + dinteger_t soffset = e->isSymOffExp ()->offset; tree result = get_decl_tree (e->var); TREE_USED (result) = 1;