[committed 08/12] d: Only handle named enums in enum_initializer_decl

2021-07-30 Thread Iain Buclaw via Gcc-patches
Anonymous enums neither generate an initializer nor typeinfo symbol, so it's safe to assert that all enum declarations passed to this function always have an identifier. gcc/d/ChangeLog: * decl.cc (enum_initializer_decl): Only handle named enums. --- gcc/d/decl.cc | 7 ++- 1 file

[committed 10/12] d: Don't generate a PREDICT_EXPR when assert contracts are turned off.

2021-07-30 Thread Iain Buclaw via Gcc-patches
This expression is just discarded by add_stmt, so never reaches the middle-end. gcc/d/ChangeLog: * expr.cc (ExprVisitor::visit (AssertExp *)): Don't generate PREDICT_EXPR. --- gcc/d/expr.cc | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git

[committed 02/12] d: Drop any field or parameter types that got cached before conversion failed.

2021-07-30 Thread Iain Buclaw via Gcc-patches
This ensures there are no dangling references to AST members that have been freed, either explcitly or by the garbage collector. gcc/d/ChangeLog: * d-builtins.cc (build_frontend_type): Restore builtin_converted_decls length on conversion failure. --- gcc/d/d-builtins.cc | 9

[committed 06/12] d: Factor aggregate_initializer_decl to set the sinit for aggregate declarations.

2021-07-30 Thread Iain Buclaw via Gcc-patches
The self-hosted implementation of the D front-end changes the type of `sinit' to a void pointer, which requires an explicit cast to `tree'. gcc/d/ChangeLog: * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't use sinit for declaration directly. (DeclVisitor::visit

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

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: >> > > >&g

[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: *

[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

[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

[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

[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

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

[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

[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

[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

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

[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

[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

[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

[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

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

[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

[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

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

[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

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

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 the &

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

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

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 the curren

[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

[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

[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

[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.

[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

[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. *

[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

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; >

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 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

[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

[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

[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.

[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:

[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: > >

[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. -

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

[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

[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.

[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

[committed] d: __FUNCTION__ doesn't work in core.stdc.stdio functions without cast (PR101441)

2021-07-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports a fix from upstream to allow __FUNCTION__ and __PRETTY_FUNCTION__ to be used as C string literals. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32. Committed to mainline, and backported to the gcc-9, gcc-10, and gcc-11 release branches. Regards, Iain.

[committed] d: Change in DotTemplateExp type semantics leading to regression (PR101619)

2021-07-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a regression introduced by PR100999. By giving dot templates a type, meant that properry resolving silently started passing for code that should never have passed. The simple fix is to provide implementations for checkType and checkValue that give an error about dot

[committed] d: Compile-time reflection for supported built-ins (PR101127)

2021-07-28 Thread Iain Buclaw via Gcc-patches
Hi, In order to allow user-code to determine whether a back-end builtin is available without error, LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE has been defined to delay putting back-end builtin functions until the ISA that defines them has been declared. However in D, there is no global namespace.

[committed] d: fix ICE at convert_expr(tree_node*, Type*, Type*) (PR101490)

2021-07-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a modulo by zero bug, seen in both the front-end and code generator when testing if a conversion from a static array to dynamic array was valid. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32. Committed to mainline, and backported to the gcc-9, gcc-10, and

[committed] d: Wrong evaluation order of binary expressions (PR101640)

2021-07-28 Thread Iain Buclaw via Gcc-patches
Hi, The use of fold_build2 can in some cases swap the order of its operands if that is the more optimal thing to do. However this breaks semantic guarantee of left-to-right evaluation in D. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32. Committed to mainline, and backported

[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

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

[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

[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. ---

[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

[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

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

[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.

[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

[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

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

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: 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 

Re: [PATCHSET] Reintroduce targetrustm hooks

2023-09-13 Thread Iain Buclaw via Gcc-patches
Excerpts from Arthur Cohen's message of September 7, 2023 3:41 pm: > Alright, was not expecting to mess up this patchset so bad so here we go: > > This patchset reintroduces proper targetrustm hooks without the old > problematic mess of macros we had, which had been removed for the first > merge

Re: [PATCH] Allow target attributes in non-gnu namespaces

2023-09-13 Thread Iain Buclaw via Gcc-patches
Excerpts from Richard Sandiford via Gcc-patches's message of September 8, 2023 6:29 pm: > Currently there are four static sources of attributes: > > - LANG_HOOKS_ATTRIBUTE_TABLE > - LANG_HOOKS_COMMON_ATTRIBUTE_TABLE > - LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE > - TARGET_ATTRIBUTE_TABLE > > All of the

[committed] d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.

2023-08-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end and run-time library with upstream dmd 26f049fb26, and standard library with phobos 330d6a4fd. Synchronizing with the latest bug fixes in the v2.105.0-beta.1 release. D front-end changes: - Import dmd v2.105.0-beta.1. - Added predefined

[committed][GCC 12] d: Fix internal compiler error: in layout_aggregate_type, at d/types.cc:574

2023-08-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE that is specific to the D front-end language version in GDC 12. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, committed to releases/gcc-12. The pr110959.d test case has also been committed to mainline to catch the unlikely event of a regression.

[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. -

[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: *

[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

[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: *

[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: *

[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

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

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 o

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 Fr

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,

[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.

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

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

2022-05-25 Thread Iain Buclaw via Gcc-patches
" to all "visit" vfunc decls as appropriate. * imports.cc: Likewise. * typeinfo.cc: Likewise. Signed-off-by: Iain Buclaw --- gcc/d/expr.cc | 110 +++--- gcc/d/imports.cc | 26 +-- gcc/d/typeinfo.cc | 22 +

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

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 != 92

[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

[committed] d: Add `@register' attribute to compiler and library (PR105413)

2022-06-24 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds a new `@register' attribute to the D compiler and library. Addressing a feature request in PR105413. The `@register` attribute specifies that a local or `__gshared` variable is to be given a register storage-class in the C sense of the term, and will be placed into a

[committed] d: Give consistent error message when attribute argument not a string constant

2022-06-24 Thread Iain Buclaw via Gcc-patches
Hi, This patch adjusts all the "not a string" errors in the D attribute handlers to use the same format string for consistency. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * d-attribs.cc

[committed] d: Construct indexes of ARRAY_TYPE using ARRAY_REF.

2022-06-24 Thread Iain Buclaw via Gcc-patches
Hi, This patch changes the D front-end code generation of index expressions to use an ARRAY_REF when the array expression is a ARRAY_TYPE. This is a small simplification over `((T *))[index]', which also allows eliding an unneccesary marking of TREE_ADDRESSABLE when the array expression is a

[11, committed] d: Fix error: aggregate value used where floating point was expected (PR106139)

2022-07-05 Thread Iain Buclaw via Gcc-patches
Hi, This is the GCC-11 backport of the fix for PR106139 posted last week. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to releases/gcc-11. Regards, Iain. --- PR d/106139 gcc/d/ChangeLog: * d-convert.cc (convert_expr): Handle casting from

[10, committed] d: Fix error: aggregate value used where floating point was expected (PR106139)

2022-07-05 Thread Iain Buclaw via Gcc-patches
Hi, This is the GCC-10 backport of the fix for PR106139 posted last week. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to releases/gcc-10. Regards, Iain. --- PR d/106139 gcc/d/ChangeLog: * d-convert.cc (convert_expr): Handle casting from

[PATCH] d: Move DSO registry support code from compiler to drtstuff in library (PR100062)

2022-07-08 Thread Iain Buclaw via Gcc-patches
Hi, Currently the DSO support for D runtime is generated by the compiler in every object, when really it is only required once per shared object. This patch moves that support logic from the compiler itself to the library as part of the drtstuff code. The object files drtbegin.o and drtend.o

<    4   5   6   7   8   9   10   11   >