[committed] d: Merge upstream dmd 529110f66, druntime 148608b7.

2022-06-24 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd 529110f66. The git revision hash of libdruntime has also been bumped, though the only changes made have been outside what is merged downstream. D front-end changes: - Import latest bug fixes to mainline. Bootstrapped and regression te

Re: [PATCH] tilegx: Fix infinite loop in gen-mul-tables generator

2022-06-24 Thread Iain Buclaw via Gcc-patches
Excerpts from Jeff Law via Gcc-patches's message of Juni 22, 2022 8:16 pm: > > > On 6/22/2022 11:30 AM, Iain Buclaw via Gcc-patches wrote: >> Hi, >> >> Since around GCC 10, the condition `j < (INTMAX_MAX / 10)' will get >> optimized into `j !

[PATCH] tilegx: Fix infinite loop in gen-mul-tables generator

2022-06-22 Thread Iain Buclaw via Gcc-patches
Hi, Since around GCC 10, the condition `j < (INTMAX_MAX / 10)' will get optimized into `j != 922337203685477580', which will result in an infinite loop for certain inputs of `j'. This patch just copies the condition already used by the -DTILEPRO generator code, which doesn't fall into the same tr

[committed] d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c.

2022-06-22 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd 6203135dc, and the D run-time library with upstream druntime e150cca1, and phobos a4a18d21c. D front-end changes: - Input parameters can now be applied on extern(C++) functions to bind to `const &' when the `-fpreview=in' flag is

[committed] d: Add `@no_sanitize' attribute to compiler and library.

2022-06-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds the `@no_sanitize' attribute to the D front-end. The `@no_sanitize` attribute disables a particular sanitizer for this function, analogous to `__attribute__((no_sanitize))'. The library also defines `@noSanitize' to be compatible with the LLVM D compiler's `ldc.attributes'.

[committed] d: Add `@visibility' and `@hidden' attributes.

2022-06-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds the visibility attribute to the D compiler, and library helpers `@visibility' and `@hidden' to the run-time library. The `@visibility' attribute is functionality the same as `__attribute__((visibility))', and `@hidden' is a convenience alias to `@visibility("hidden")' defined

[committed] d: Set TYPE_ARTIFICIAL on internal TypeInfo types

2022-06-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch sets the TYPE_ARTIFICIAL flag on internally generated object.TypeInfo types, preventing them from triggering warnings when compiling with `-Wpadded'. Regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline, and backported to the release/gcc-10, gcc-11, and gcc-12 br

[committed] d: Delay completing aggregate and enum types until after attributes have been applied.

2022-06-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch rejigs the logic for completing D types with (eventually) recursive references to itself within its members. Because of these forward/recursive references, the TYPE_SIZE, TYPE_ALIGN, and TYPE_MODE of structs and enums were set before laying out its members. This adds a new macro T

Re: [committed] d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f.

2022-06-13 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of Juni 13, 2022 8:58 pm: > Hi Iain, > >> This patches merges the D front-end with upstream dmd 821ed393d, and the >> standard library with upstream druntime 454471d8 and phobos 1206fc94f. > >> libphobos/ChangeLog: >> >> * libdruntime/MERGE: Merge upstream

[committed] d: Match function declarations of gcc built-ins from any module.

2022-06-13 Thread Iain Buclaw via Gcc-patches
This patch changes the `Compiler::onParseModule' hook in the D front-end to scan for declarations of recognised gcc built-ins from any module. Previously, only the `core.stdc' package was scanned. In addition to matching of the symbol, any user-applied `@attributes' or `pragma(mangle)' name will b

[committed] d: Improve TypeInfo errors when compiling in -fno-rtti mode

2022-06-13 Thread Iain Buclaw via Gcc-patches
Hi, The existing TypeInfo errors can be cryptic. This patch alters the diagnostic to include which expression is requiring `object.TypeInfo'. Bootstrapped and regression tested on x86_64-linux-gnu, and backported to releases/gcc-12 branch. Regards, Iain. --- gcc/d/ChangeLog: * d-tree.

[committed] d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f.

2022-06-13 Thread Iain Buclaw via Gcc-patches
Hi, This patches merges the D front-end with upstream dmd 821ed393d, and the standard library with upstream druntime 454471d8 and phobos 1206fc94f. D front-end changes: - Import latest bug fixes to mainline. D runtime changes: - Fix duplicate Elf64_Dyn definitions on Solaris. - _d_

[GCC-12][committed] d: Fix D lexer sometimes fails to compile code read from stdin

2022-05-31 Thread Iain Buclaw via Gcc-patches
Hi, As of gdc-12, the lexer expects there 4 bytes of zero padding at the end of the source buffer to mark the end of input. Sometimes when reading from stdin, the data at the end of input is garbage rather than zeroes. Fix that by explicitly calling memset past the end of the buffer. Bootstrappe

Re: [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.

2022-05-27 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of Mai 18, 2022 4:40 pm: > Hi Iain, > >> Upstream dmd has now released v2.100.0, this patch merges in the >> latest bug fixes since the last sync-up of the release branch, as well >> as all new feature changes on development branch. > [...] >> D runtime changes:

[committed] d: add more 'final' and 'override' to gcc/d/*.cc 'visit' impls

2022-05-25 Thread Iain Buclaw via Gcc-patches
Hi, The first round of adding these missed several more cases in other files where the Visitor pattern is used in the D front-end. Bootstrapped on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * expr.cc: Add "final" and "override" to all "visit" vfunc

Re: [PATCH 05/10] d: add 'final' and 'override' to gcc/d/*.cc 'visit' impls

2022-05-24 Thread Iain Buclaw via Gcc-patches
Excerpts from David Malcolm's message of Mai 24, 2022 3:15 pm: > On Tue, 2022-05-24 at 14:56 +0200, Iain Buclaw wrote: >> Excerpts from David Malcolm via Gcc-patches's message of Mai 23, 2022 >> 9:28 pm: >> > gcc/d/ChangeLog: >> > * decl.cc: Add "final" and "override" to all "visit" vfunc >

Re: [PATCH 05/10] d: add 'final' and 'override' to gcc/d/*.cc 'visit' impls

2022-05-24 Thread Iain Buclaw via Gcc-patches
Excerpts from David Malcolm via Gcc-patches's message of Mai 23, 2022 9:28 pm: > gcc/d/ChangeLog: > * decl.cc: Add "final" and "override" to all "visit" vfunc decls > as appropriate. > * expr.cc: Likewise. > * toir.cc: Likewise. > * typeinfo.cc: Likewise. > * typ

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-23 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Mai 11, 2022 10:17 am: > On 5/9/22 14:03, Richard Biener wrote: >> On Thu, May 5, 2022 at 4:30 PM Martin Liška wrote: >>> >>> On 5/5/22 14:58, Iain Buclaw wrote: This D front-end change doesn't look right to me, besides the slight >>> >>> Hello. >>> >>>

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-20 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 20, 2022 6:56 am: > On Tue, 17 May 2022, Marc Aurèle La France wrote: >> On Tue, 17 May 2022, Iain Buclaw wrote: >>> Excerpts from Marc Aurèle La France's message of Mai 17, 2022 5:31 pm: On Tue, 17 May 2022, Iain Buclaw wrote: > Excerpt

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 17, 2022 5:31 pm: > On Tue, 17 May 2022, Iain Buclaw wrote: >> Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: >>> On Sun, 15 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 12, 2022

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: > On Sun, 15 May 2022, Iain Buclaw wrote: >> Excerpts from Marc Aurèle La France's message of Mai 12, 2022 10:29 pm: > >>> No compiler has any business rejecting files for the sole crime of >>> being symlinked to. The followi

[GCC 12][committed] d: Merge upstream dmd a53934d18, phobos 604534d7c.

2022-05-15 Thread Iain Buclaw via Gcc-patches
Hi, Upstream dmd has now released v2.100.0, this patch merges in the latest bug fixes since the last sync-up of the release branch. D front-end changes: - Import dmd v2.100.0 release. - The new behavior of issuing deprecation messages for scope violations has been reverted until ne

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-15 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 12, 2022 10:29 pm: > Greetings. > > No compiler has any business rejecting files for the sole crime of being > symlinked to. The following applies, modulo patch fuzz, to the 9, 10 and 11 > series of compilers. > > Given my use of shadow trees,

[GCC 12][committed] d: Merge upstream dmd 88de5e369.

2022-05-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd 88de5e369, synchronizing the latest regression fixes from the stable v2.100.0 branch that were found in production and industry codebases. D front-end changes: - Merge regression fixes in v2.100.0 branch. Bootstrapped and regression te

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-05 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Mai 5, 2022 2:16 pm: > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/d/ChangeLog: > > * longdouble.h: Use ARRAY_SIZE. > > diff --git a/gcc/d/longdouble.h b/gcc/d/longdoub

[GCC 12][committed] d: Merge upstream dmd 081d61e15, druntime 9c0d4f91, phobos dba1bbe27.

2022-05-03 Thread Iain Buclaw via Gcc-patches
Hi, This patches merges the D front-end with upstream dmd 081d61e15, and the the standard library with druntime 9c0d4f91 and phobos dba1bbe27. Synchronizing the latest bug fixes in the upcoming v2.100 release. D front-end changes: - Import dmd v2.100.0-rc.1. D runtime changes: - Impor

[committed] d: Merge upstream dmd 313d28b3d, druntime e361d200.

2022-04-28 Thread Iain Buclaw via Gcc-patches
Hi, This patches merges the D front-end with upstream dmd 313d28b3d, and the D runtime library with upstream druntime e361d200. D front-end changes: - Import latest bug fixes from the 2.100 release branch. - Fix signatures of extern C++ functions that have size_t parameters. Boots

[GCC 9 backport][committed] libphobos: Give _Unwind_Exception an alignment that best resembles __attribute__((aligned))

2022-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r12-3986 to the GCC 9 branch. For interoperability with C++ EH, the alignment should match, otherwise D may not be able to intercept exceptions thrown from C++. Bootstrapped and regression tested on x86_64-linux-gnu. Regards, Iain. --- libphobos/ChangeLog: * l

[GCC 10 backport][committed] libphobos: Give _Unwind_Exception an alignment that best resembles __attribute__((aligned))

2022-04-26 Thread Iain Buclaw via Gcc-patches
This patch backports r12-3986 to the GCC 10 branch. For interoperability with C++ EH, the alignment should match, otherwise D may not be able to intercept exceptions thrown from C++. Bootstrapped and regression tested on x86_64-linux-gnu. Regards, Iain. --- libphobos/ChangeLog: * libd

[GCC 11 backport][committed] libphobos: Give _Unwind_Exception an alignment that best resembles __attribute__((aligned))

2022-04-26 Thread Iain Buclaw via Gcc-patches
This patch backports r12-3986 to the GCC 11 branch. For interoperability with C++ EH, the alignment should match, otherwise D may not be able to intercept exceptions thrown from C++. Bootstrapped and regression tested on x86_64-apple-darwin20. Regards, Iain. --- libphobos/ChangeLog: *

[committed] libphobos: Don't call free on the TLS array in the emutls destroy function.

2022-04-26 Thread Iain Buclaw via Gcc-patches
Fixes a segfault seen on Darwin when a GC scan is ran after a thread has been destroyed. As the global emutlsArrays hash still has a reference to the array itself, and tries to iterate all elements. Setting the length to zero frees all allocated elements in the array, and ensures that it is skipp

[committed] d: Merge upstream dmd eb7bee331, druntime 27834edb, phobos ac296f80c.

2022-04-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd eb7bee331, and the standard library with druntime 27834edb and phobos ac296f80c. D front-end changes: - Import dmd v2.100.0-beta.1. - Print deprecation messages for scope violations unless `-frevert=dip1000' is used. - Fix

[committed] d: Compile simd_ctfe.d only on avx_runtime or vect_sizes_16B_8B targets

2022-04-04 Thread Iain Buclaw via Gcc-patches
Hi, This test makes use of the `__vector(int[4])' type, which is not supported on all targets, so guard the test with target avx_runtime || vect_sizes_16B_8B, fixing PR104740. Regression tested on x86_64-linux-gnu, committed to mainline. Regards, Iain. --- PR d/104740 gcc/testsuite/Ch

[committed] d: Remove Wtemplates warnings from the code generation pass

2022-04-03 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the `-Wtemplate' warnings from the code generation pass of the D front-end. These have been superceded by the upstream front-end's own internal tracking of instantiations, exposed by `-ftransition=templates'. Bootstrapped on x86_64-linux-gnu, and committed to mainline. Re

[committed] d: Fix internal compiler error: in build_complex, at tree.c:2358

2022-03-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in the D front-end when constructing a complex object from a struct literal typed as enum __c_complex_float. The conversion from the special _Complex enum to native complex used build_complex, however the input value isn't necessarily a literal. Bootstrapped and regre

[committed] d: Fix mistakes in strings to be translated [PR104552]

2022-03-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch addresses comments made in PR104552 about documented D language options. Bootstrapped and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: PR translation/104552 * lang.opt (fdump-cxx-spec=): Fix typo in argument handle. (fpreview=fixaliasthis):

[committed] d: Cache generated import declarations in a hash_map

2022-03-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch refactors the ImportVisitor to cache the generated result decl in a hash_map. Originally, these were cached in the front-end AST node field `isym'. However, this field is soon to be removed. Bootstrapped and regression tested on x86_64-linux-gnu/m32/mx32, and committed to mainlin

Re: [PATCH] libphobos: Enable on Solaris/SPARC or with /bin/as [PR 103528]

2022-03-10 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of März 10, 2022 11:19 am: > libphobos is currently only enabled on Solaris/x86 with gas. As > discovered when gdc was switched to the dmd frontend, this initially > broke bootstrap for the other Solaris configurations. > > However, it's now well possible to en

[committed] d: Merge upstream dmd 423f19b41, druntime 100a608c, phobos a1f8c4c07.

2022-03-02 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 423f19b41, as well as the D runtime libraries with druntime 100a608c, and phobos a1f8c4c07. D Runtime changes: - Fix stdc.stdio bindings to not depend on druntime (PR104729). - Implement stdc.math for Solaris (PR10473

[committed] d: Remove gdc.test/dhry.d from the testsuite (PR104736)

2022-03-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes gdc.test/dhry.d from the testsuite, that was merged in from the sync with upstream 2.098.0. This test is not well ported, and doesn't check anything useful. Committed to mainline. gcc/testsuite/ChangeLog: PR d/104736 * gdc.test/runnable/dhry.d: Removed. -

[committed] libphobos: Fix misspelling of msvcUsesUCRT (PR104659)

2022-03-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a compilation error on x86_64-w64-mingw32. Committed to mainline, and backported to releases/gcc-11. Regards Iain --- libphobos/ChangeLog: PR d/104659 * libdruntime/config/mingw/msvc.c (init_msvc): Fix misspelling of msvcUsesUCRT. --- libphobos/lib

[committed] d: Merge upstream dmd cf63dd8e5, druntime caf14b0f, phobos 41aaf8c26.

2022-02-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd cf63dd8e5, as well as the D runtime libraries with druntime caf14b0f, and phobos 41aaf8c26, synchronizing with the release of 2.099.0-rc1. D front-end changes: - Import dmd v2.099.0-rc.1. - The `main' can now return t

[committed] d: Remove handling of deleting GC allocated classes.

2022-02-20 Thread Iain Buclaw via Gcc-patches
Hi, Now that the `delete' keyword has been removed from the front-end, only compiler-generated uses of DeleteExp reach the code generator via the auto-destruction of `scope class' variables. The run-time library helpers that previously were used to delete GC class objects can now be removed from

[committed] d: Merge upstream dmd cb49e99f8, druntime 55528bd1, phobos 1a3e80ec2.

2022-02-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd cb49e99f8, as well as the D runtime libraries with druntime 55528bd1, and phobos 1a3e80ec2, synchronizing with the release of 2.099.0-beta1. D front-end changes: - Import dmd v2.099.0-beta.1. - It's now an error to us

Re: [committed] d: Merge upstream dmd 52844d4b1, druntime dbd0c874, phobos 896b1d0e1.

2022-02-18 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of Februar 16, 2022 11:45 pm: > Hi Iain, > >> This patch merges the D front-end implementation with upstream dmd >> 52844d4b1, as well as the D runtime libraries with druntime dbd0c874, >> and phobos 896b1d0e1, including the latest features and bug-fixes ahead o

Re: [PATCH][pushed] d: Fix -Werror=format-diag error.

2022-02-01 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Januar 31, 2022 9:50 am: > Pushed as obvious. > Thanks, Iain.

Re: [PATCH] internal_error - do not use leading capital letter

2022-01-27 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Januar 27, 2022 1:40 pm: > That's follow up patch based on the discussion with Jakub. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * config/rs6000/host-darwin.cc (segv_crash_handler): > Do not use leading capital letter.

Re: gcc/configure: out of date

2022-01-14 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Januar 14, 2022 4:51 pm: > On 1/14/22 16:46, Martin Liška wrote: >> Hello. >> >> I noticed that when I run: >> ACLOCAL=~/bin/automake-1.15.1/bin/aclocal   >> AUTOMAKE=~/bin/automake-1.15.1/bin/automake autoconf >> >> in gcc subfolder I get the following dif

Re: [PATCH] docs: replace http:// with https://

2021-12-22 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Dezember 22, 2021 1:57 pm: > I replaced and verified http:// links for various domains. > > Ready to be installed? > Tahnks, > Martin > Hi, > gcc/d/ChangeLog: > > * gdc.texi: Replace http:// with https. > > --- > gcc/d/gdc.texi

[GCC-11][committed] libphobos: Add power*-*-freebsd* as supported target

2021-12-21 Thread Iain Buclaw via Gcc-patches
This patch backports the change in mainline that adds power*-*-freebsd* as supported targets for libphobos, which soft depends on another change in mainline that adds FreeBSD_13 support for the bindings. Regression tested on powerpc64-portbld-freebsd13.0, and committed to the releases/gcc-11 branc

[committed] libphobos: Add power*-*-freebsd* as supported target

2021-12-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds power*-*-freebsd* as supported targets for libphobos. This has been tested on powerpc64-freebsd13 and powerpc64le-freebsd13, and used to build dub, along with some D tools from ports. Regression tested, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog:

[GCC-9, 10, 11][committed] libphobos: Fix definition of stat_t for MIPS64 (PR103604)

2021-12-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports a specific change from commit r12-6003 to the release branches to fix the layout of stat_t on MIPS64 targets. Bootstrapped and regression tested on mips-unknown-linux, with -mabi=64 and -mabi=n32 multilib configurations. Committed to releases/gcc-11, gcc-10, and gcc-9 br

[committed] d: Merge upstream dmd ad8412530, druntime fd9a4544, phobos 495e835c2.

2021-12-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd ad8412530, and the run-time libraries with upstream druntime fd9a4544 and phobos 495e835c2. D front-end changes: - Import dmd v2.098.1 - Remove calling of _d_delstruct from code generator. Druntime changes: - Import druntime v

[PATCH] config: Add check whether D compiler works (PR103528)

2021-12-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch extends AC_PROG_GDC so that as well as checking for the existence of a GDC compiler, also validate that it has also been built with libphobos, otherwise warn or fail with the message that GDC is required to build d. Tested on a system running powerpcle-linux both without a D compil

[committed] d: Merge upstream dmd 93108bb9e, druntime 6364e010, phobos 575b67a9b.

2021-12-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 93108bb9e, and the D run-time libraries with druntime 6364e010 and phobos 575b67a9b. The internal version of the language has been bumped to v2.098.1-beta.1. D front-end changes: - Import dmd v2.098.1-beta.1. - Defau

Re: [committed 4/4] d: Merge upstream phobos 574bf883b

2021-12-10 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of December 9, 2021 11:11 pm: > Excerpts from Andreas Schwab's message of December 9, 2021 11:09 am: >> Breaks aarch64: >> >> ../../../../libphobos/libdruntime/core/sys/linux/unistd.d:10:15: error: >> module 'core.sys.linux.syscalls' import 'SystemCall' not fou

[committed 2/3] d: Update for new front-end interface.

2021-12-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates the gdc codegen interface for the new front-end. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * Make-lang.in (D_FRONTEND_OBJS): Add d/root-optional.o. * d-attribs.cc (build_attributes):

[committed] d: Align methods to MINIMUM_METHOD_BOUNDARY.

2021-12-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch aligns all D defined methods to MINIMUM_METHOD_BOUNDARY, improving interoperability with C++ methods. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline and backported to the release branches. Regards, Iain. gcc/d/ChangeLog: * decl.cc (get_symb

Re: [committed 4/4] d: Merge upstream phobos 574bf883b

2021-12-09 Thread Iain Buclaw via Gcc-patches
Excerpts from Andreas Schwab's message of December 9, 2021 11:09 am: > Breaks aarch64: > > ../../../../libphobos/libdruntime/core/sys/linux/unistd.d:10:15: error: > module 'core.sys.linux.syscalls' import 'SystemCall' not found >10 | public import core.sys.linux.syscalls : SystemCall; >

[committed 2/4] d: Merge upstream dmd testsuite 568496d5b

2021-12-08 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D2 testsuite upstream dmd 568496d5b. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 568496d5b. --- gcc/testsuite/gdc.test/compilable/b19294.d

Re: [PATCH] D: fix UBSAN

2021-12-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of December 6, 2021 1:03 pm: > Fixes: > gcc/d/expr.cc:2596:9: runtime error: null pointer passed as argument 2, which > is declared to never be null > > Ready for master? > Thanks, > Martin > Looks reasonable to me. Iain.

[committed] libphobos: Push all callee-save registers on the stack before GC scan on ARM

2021-12-02 Thread Iain Buclaw via Gcc-patches
Hi, This is the library fix for PR103520 that also prevents the garbage collector from releasing live memory. However this requires that the host compiler has been patched with this fix, so the GC will remain disabled in the D front-end for now until enough time has passed for this to have trickl

[committed] libphobos: Add missing ControlState variable for AArch64

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a typo that occurred during the splitting of the std.math module into a package. Bootstrapped and regression tested on aarch64-linux-gnu, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/std/math/hardware.d (FloatingPointControl.getControlSt

[committed] d: Disable the D runtime garbage collector after initializing (PR103520)

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch disables the D runtime garbage collector after initializing. Not all targets that support building libdruntime have a stable garbage collector, so to avoid running into problems where live memory allocated by the D GC is freed, disable all in-flight collections until a time when sc

[committed] d: Prefix object files from the root package with 'root-'

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch prefixes D object files from the root package with 'root-'. None of the front-end module names in either the dmd or root package collide just yet, but that does not mean they won't in the future. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. R

[committed] d: Update documentation of new D language options.

2021-12-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds documentation for the following new D options: - New switch that controls what code is generated on a contract failure (throw or abort). - New switch that controls mangling of D types in `extern(C++)` code, as well as setting the compile-time value of

[PING, PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-30 Thread Iain Buclaw via Gcc-patches
Ping. Are the common gcc parts OK (also for backporting)? Iain. Excerpts from Iain Buclaw's message of November 26, 2021 1:51 pm: > Excerpts from Iain Sandoe's message of November 19, 2021 10:21 am: >> Hi Iain >> >>> On 19 Nov 2021, at 08:32, Iain Buclaw wrote: >> >>> This patch fixes a stage

[PING, PATCH] doc, d: Add note that D front end now requires GDC installed in order to bootstrap.

2021-11-30 Thread Iain Buclaw via Gcc-patches
Ping. Excerpts from Iain Buclaw's message of November 18, 2021 2:06 am: > Hi, > > As asked for, this adds the documentation note in install.texi about the > upcoming bootstrap requirements. > > Obviously this will be applied alongside the patch posted previously: > > https://gcc.gnu.org/piperma

[committed 19/19] libphobos: Update libphobos testsuite to pass on latest version

2021-11-30 Thread Iain Buclaw via Gcc-patches
This adds new, or updates the dejagu testing scripts for the suite of libphobos tests. Bootstrapped, regression tested, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * testsuite/lib/libphobos.exp (libphobos-dg-test): Handle assembly compile types. (d

[committed 18/19] testsuite: Update gdc testsuite to pass on latest version

2021-11-30 Thread Iain Buclaw via Gcc-patches
This updates the GDC testsuite parts to be compatible with the current language features/deprecations. The dejagnu gdc-utils helper has also been updated to handle the new options and directives added to the D2 testsuite tests. Bootstrapped, regression tested, and committed to mainline. Regards,

[committed 17/19] libphobos: Import druntime testsuite v2.098.0-beta.1 (e6caaab9)

2021-11-30 Thread Iain Buclaw via Gcc-patches
This is the updated D runtime library testsuite. Bootstrapped, regression tested, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * testsuite/libphobos.aa/test_aa.d: Update test. * testsuite/libphobos.exceptions/unknown_gc.d: Likewise. * testsuite/libp

[committed 14/19] libphobos: Update libphobos to build latest version

2021-11-30 Thread Iain Buclaw via Gcc-patches
Updates the make files that build phobos. Bootstrapped, regression tested, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/Makefile.am (D_EXTRA_DFLAGS): Add -fpreview=dip1000 and -fpreview=dtorfields flags. (PHOBOS_DSOURCES): Update list of std m

[committed 10/19] libphobos: Update libgdruntime to build with latest version

2021-11-30 Thread Iain Buclaw via Gcc-patches
Updates the make files, and the gdc-specific modules of druntime. Bootstrapped, regression tested, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * libdruntime/Makefile.am (D_EXTRA_FLAGS): Build libdruntime with -fpreview=dip1000, -fpreview=fieldwise, and -fp

Re: [committed 03/12] d: Insert null terminator in obstack buffers

2021-11-28 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of November 26, 2021 1:35 pm: > Excerpts from Martin Liška's message of November 25, 2021 3:09 pm: >> On 7/30/21 13:01, Iain Buclaw via Gcc-patches wrote: >>> |Covers cases where functions that handle the extracted strings ignore th

Re: [PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-26 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 19, 2021 10:21 am: > Hi Iain > >> On 19 Nov 2021, at 08:32, Iain Buclaw wrote: > >> This patch fixes a stage2 bootstrap failure in the D front-end on >> darwin due to libgphobos being dynamically linked despite >> -static-libphobos being on the com

Re: [committed 03/12] d: Insert null terminator in obstack buffers

2021-11-26 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of November 25, 2021 3:09 pm: > On 7/30/21 13:01, Iain Buclaw via Gcc-patches wrote: >> |Covers cases where functions that handle the extracted strings ignore the >> explicit length. This isn't something that's known to happen in

Re: [PATCH] d: fix ASAN in option processing

2021-11-26 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of November 25, 2021 2:59 pm: > Fixes: > > ==129444==ERROR: AddressSanitizer: global-buffer-overflow on address > 0x0666ca5c at pc 0x00ef094b bp 0x7fff8180 sp 0x7fff8178 > READ of size 4 at 0x0666ca5c thread T0 > #0 0xef094a in parse_o

Re: [PATCH] libphobos, testsuite: Add prune clauses for two Darwin cases.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 19, 2021 4:59 pm: > Depending on the permutation of CPU, OS version and shared/non- > shared library inclusion, we get can get two warnings from the > external tools (ld64, dsymutil) which are not actually GCC issues > but relate to the external tools

[committed] libphobos: Increase size of defaultStackPages on OSX X86_64 targets.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, As of macOS 11, libunwind now requires more stack space than 16k, so default to a larger stack size. This is only applied to X86 as the PAGESIZE is still 4k, however on AArch64 it is 16k. Regression tested on x86_64-linux-gnu and x86_64-apple-darwin20, committed to mainline and backported to

[committed] libphobos: Don't call __gthread_key_delete in the emutls destroy function.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a EXC_BAD_ACCESS issue seen on Darwin when the libphobos DSO gets unloaded. Based on reading libgcc's emutls implementation, as it doesn't call __gthread_key_delete directly, neither should libphobos. Bootstrapped and regression tested on x86_64-linux-gnu and x86_64-apple-da

Re: [PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-19 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 19, 2021 10:21 am: > Hi Iain > >> On 19 Nov 2021, at 08:32, Iain Buclaw wrote: > >> This patch fixes a stage2 bootstrap failure in the D front-end on >> darwin due to libgphobos being dynamically linked despite >> -static-libphobos being on the com

[PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a stage2 bootstrap failure in the D front-end on darwin due to libgphobos being dynamically linked despite -static-libphobos being on the command line. In the gdc driver, this takes the previous fix for the Darwin D bootstrap, and extends it to the -static-libphobos option as

[committed] d: Use HOST_WIDE_INT for type size temporaries.

2021-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an issue with bootstrap on x86_64-darwin when building with --enable-werror. These couple variables are later used as the value for the format specifier `%wd`, to which the expected type may not match dinteger_t, causing unnecessary -Wformat warnings. Bootstrapped and regres

[PATCH] doc, d: Add note that D front end now requires GDC installed in order to bootstrap.

2021-11-17 Thread Iain Buclaw via Gcc-patches
Hi, As asked for, this adds the documentation note in install.texi about the upcoming bootstrap requirements. Obviously this will be applied alongside the patch posted previously: https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582917.html Final batch of testing before proceeding has tak

Re: [PATCH] Combine malloc + memset to calloc

2021-11-15 Thread Iain Buclaw via Gcc-patches
Excerpts from Seija K. via Gcc-patches's message of November 12, 2021 9:29 pm: > diff --git a/gcc/d/dmd/ctfeexpr.c b/gcc/d/dmd/ctfeexpr.c > index a8e97833ad0..401ed748f43 100644 > --- a/gcc/d/dmd/ctfeexpr.c > +++ b/gcc/d/dmd/ctfeexpr.c > @@ -1350,8 +1350,7 @@ int ctfeRawCmp(Loc loc, Expression *e1,

[committed] d: Fix regressing test failures on ix86-solaris2.11

2021-10-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a regression caused by r12-3986. The _Unwind_Exception struct had its alignment adjusted to 16-bytes in order to be compatible with other languages, however malloc() on Solaris X86 is not guaranteed to allocate memory aligned to 16-bytes as well. Bootstrapped and regression

[committed] d: Fix pr96435.d failing on SPARC and HPPA

2021-10-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes test failures seen on SPARC and HPPA targets. The value used to initialize the integer field in the union didn't account for BigEndian targets running this code. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, as well as sparc-sun-solaris2.11. Committed t

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Luís Ferreira's message of October 8, 2021 7:08 pm: > On Fri, 2021-10-08 at 18:52 +0200, Iain Buclaw wrote: >> Excerpts from Luís Ferreira's message of October 7, 2021 8:29 pm: >> > On Tue, 2021-10-05 at 21:49 -0400, Eric Gallager wrote: >> > > >> > > I can help with the autotools pa

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Luís Ferreira's message of October 7, 2021 8:29 pm: > On Tue, 2021-10-05 at 21:49 -0400, Eric Gallager wrote: >> >> I can help with the autotools part if you can say how precisely you'd >> like to use them to add address sanitization. And as for the OSS >> fuzz part, I think someone

[committed] d: gdc driver ignores -static-libstdc++ when automatically linking libstdc++ library

2021-10-04 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds handling of `-static-libstc++' to the gdc driver, so that libstdc++ is appropriately linked if it is either needed or seen on the command-line. This is required for bootstrapping the self hosted D front-end, so will also be backported to all supported releases. Bootstrapped a

[committed] d: Save target node before parsing optimize options in case it changes.

2021-10-04 Thread Iain Buclaw via Gcc-patches
Hi, This patch saves target node information before calling parse_optimize_options in the D "optimize" attribute handler, the same as is done for C/C++ optimize. Fixes an ICE seen on PowerPC targets with the attr_optimize*.d tests in the gdc.dg testsuite. Bootstrapped and regression tested, and

Re: [PATCH] libiberty: d-demangle: rename function symbols to be more consistent

2021-10-04 Thread Iain Buclaw via Gcc-patches
> On 30/09/2021 02:48 Luís Ferreira wrote: > > > There is some function names with `dlang_parse_` prefix and some with only > `dlang_` prefix that does parsing. The same happens with `dlang_decode_`. > > To make things a bit more consistent and easier to understand, this patch adds > the missi

[committed] libphobos: Select the appropriate exception handler in getClassInfo

2021-09-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch makes getClassInfo to be analogous to __gdc_personality, which ignores in-flight exceptions that we haven't collided with yet. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards Iain --- libphobos/ChangeLog: * libdruntim

[committed] libphobos: Print stacktrace before terminating program due to uncaught exception.

2021-09-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds adjusts the `throw' entrypoint to print the stacktrace of an uncaught exception before terminating. By default, D run-time has a top level exception handler to catch anything that was uncaught by user code. However when the `rt_trapExceptions' flag is cleared, this handler wo

[committed] libphobos: Remove unused variables in gcc.backtrace.

2021-09-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch simplifies how core runtime constructs the LibBacktrace object in the event of a segfault during unittests. The core.runtime module always overrides the default parameter value for constructor calls. MaxAlignment is not required because a class can be created on the stack with the

[committed] libphobos: Give _Unwind_Exception an alignment that best resembles __attribute__((aligned))

2021-09-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch gives the definition of _Unwind_Exception on the D side a suitable alignment. For interoperability with C++ EH, the alignment should match, otherwise D may not be able to intercept exceptions thrown from C++. Ideally the correct alignment should be exposed by the compiler, but for

[committed] libphobos: Define main function as extern(C) when compiling without D runtime (PR102476)

2021-09-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch defines the default supplied main function as read when compiling with `-fmain' as extern(C) when compiling without D runtime. The default linkage is extern(D), however this does not work when mixing `-fmain' together with `-fno-druntime'. Bootstrapped and regression tested on x86

[committed] d: Don't include terminating null pointer in string expression conversion (PR102185)

2021-09-12 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an issue with the routine that converts STRING_CST to a StringExp for the dmd front-end to use during the semantic pass. The null terminator gets re-added by the ExprVisitor when lowering StringExp back into a STRING_CST during the code generator pass. Bootstrapped and regre

[committed] libphobos: Don't add zlib when ENABLE_LIBDRUNTIME_ONLY

2021-09-01 Thread Iain Buclaw via Gcc-patches
Hi, The D run-time library does not depend on zlib, so only include it in the library when Phobos is being built as well. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/Makefile.am: Don't add z

[committed] libphobos: Update comment for DRUNTIME_OS_SOURCES

2021-09-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates the comment for DRUNTIME_OS_SOURCES to reflect new conditionals that have been added since it was introduced. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * m4/druntime/os.m4

<    1   2   3   4   5   6   >