[PATCH libphobos] Committed merge with upstream druntime 7915b6a3

2020-03-14 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the libphobos implementation with upstream druntime 7915b6a3. Includes port fixes for Musl on ARM, AArch64, and SystemZ targets. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain. --- diff --git a/libphobos/libdruntime/MERGE

[PATCH d]: Committed merge with upstream dmd

2020-03-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd b061bd744. Fixes an ICE in the parser, and deprecates a previously allowed style of syntax that deviated from GNU-style extended asm. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain. ---

[PATCH libphobos]: Committed merge upstream druntime and phobos

2020-03-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the libphobos implementation with upstream druntime 6c45dd3a, and phobos 68cc18adb. This change surrounds the gcc-style asm operands with parentheses, as the old style of optionally omitting is now deprecated. This is being applied first before the changes to the compiler

[committed] libphobos: Remove --enable-unix configure option.

2020-04-08 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes --enable-unix, an old option that predates the D2 library, and now is not useful on its own as all posix modules require the compiler to predefine version(Posix) anyway. So the option has been removed, and the logic moved into DRUNTIME_OS_SOURCES, where the conditional

[committed] libphobos: Use libdruntime as a convenience library for libphobos.

2020-04-10 Thread Iain Buclaw via Gcc-patches
Hi, As a prerequesite for PR94304, it becomes easier to manage selectively compiling sublibraries when there's only one library to link to. So a druntime convenience library is built to be part of phobos, however separate druntime library is still built and installed, to allow linking only to

[committed] libphobos: Add --enable-libphobos-checking configure option (PR94305)

2020-04-08 Thread Iain Buclaw via Gcc-patches
Hi, As GDCFLAGS is overriden by the top-level make file with '-O2 -g', libphobos ends up always being built with all contracts, invariants, and asserts compiled in. This adds a new configurable that defaults to omit compiling any run-time checks into the library using '-frelease'. Other choices

[committed] libphobos: Remove --enable-thread-lib configure option.

2020-04-08 Thread Iain Buclaw via Gcc-patches
Hi, This is another old option that doesn't make sense as a configurable. So the option has been removed, and the check for AC_SEARCH_LIBS moved into the main configure.ac file. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. ---

Re: [PATCH, libphobos] Fix compilation dependencies on s390x-linux-musl

2020-04-13 Thread Iain Buclaw via Gcc-patches
On 08/04/2020 10:14, Iain Buclaw via Gcc-patches wrote: > On 28/01/2020 05:00, Mathias Lang wrote: >> diff -Nurp a/libphobos/configure.ac b/libphobos/configure.ac >> --- a/libphobos/configure.ac >> +++ b/libphobos/configure.ac >> @@ -140,6 +140,14 @@ case ${host} in

Re: [PATCH] testsuite: Add check_effective_target_d_runtime_has_std_library procedure

2020-04-15 Thread Iain Buclaw via Gcc-patches
On 15/04/2020 17:17, Richard Sandiford wrote: > Iain Buclaw via Gcc-patches writes: >> Hi, >> >> This patch adds an effect target d_runtime_has_std_library to >> target-supports.exp, and some preliminary uses of it. >> >> The current check_effective_t

Re: [PATCH] libiberty: Update D symbol demangling for latest ABI spec.

2020-04-15 Thread Iain Buclaw via Gcc-patches
Ping. On 04/04/2020 13:33, Iain Buclaw wrote: > Hi, > > Some small improvements and clarifications have been done in the D ABI > specification to remove all ambiguities found in the current grammar, > this implementation now more closely resembles the spec, whilst > maintaining compatibility

Re: [PATCH] testsuite: Add check_effective_target_d_runtime_has_std_library procedure

2020-04-18 Thread Iain Buclaw via Gcc-patches
On 15/04/2020 17:26, Rainer Orth wrote: > Hi Richard, > >> Iain Buclaw via Gcc-patches writes: >>> Hi, >>> >>> This patch adds an effect target d_runtime_has_std_library to >>> target-supports.exp, and some preliminary uses of it. >>> &

[PATCH] libphobos: Add --with-libphobos-druntime-only option.

2020-04-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds a new configure option --with-libphobos-druntime-only. The intended purpose of the option is both for targets that don't support phobos yet, and for gdc itself to support bootstrapping itself as a self-hosted D compiler. The libphobos testsuite has been updated to only add

Re: [PATCH] S/390: Fix PR91628

2020-04-07 Thread Iain Buclaw via Gcc-patches
On 07/04/2020 16:33, Stefan Liebler wrote: > On 4/1/20 6:20 PM, Stefan Liebler wrote: >> On 4/1/20 12:50 PM, Iain Buclaw wrote: >>> >>> >>> On 01/04/2020 08:28, Stefan Liebler wrote: ping >>> >>> Hi Stefan, >>> >>> As I've already said, I think that the name should be

[committed] libphobos: Merge upstream phobos fb4f6a713

2020-04-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the libphobos implementation with the upstream phobos fb4f6a713. Improves the versioning of IeeeFlags and FloatingPointControl code and unit-tests, making it clearer which targets can and cannot support it. Bootstrapped and regression tested on x86_64-linux-gnu, and

[committed] libphobos: Always build with warning flags enabled

2020-04-08 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves WARN_DFLAGS from GDCFLAGS to AM_DFLAGS so it is always included in the build and testsuite of libphobos. Currently, this doesn't happen as GDCFLAGS is overriden by it being set at the top-level. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to

Re: [PATCH, libphobos] Fix compilation dependencies on s390x-linux-musl

2020-04-08 Thread Iain Buclaw via Gcc-patches
On 28/01/2020 05:00, Mathias Lang wrote: > Hi, > > This patch fixes GDC on s390x-linux-musl targets. It was specifically > tested under Alpine Linux (see > https://gitlab.alpinelinux.org/alpine/aports/commit/c123e0f14ab73976a36c651d47d134f249413f29 > ). > The patch fixes two issues: First, Musl

[committed] libphobos: Fix option name for --with-libphobos-druntime-only.

2020-04-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes the option --with-libphobos-druntime-only to match the help text, as the prefixing 'libphobos' was intentional. Tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Fix

[committed] libphobos: Remove undefined DRUNTIME_GC from configure scripts

2020-04-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes up a previous commit that removed DRUNTIME_GC from m4/druntime.m4 Committed to mainline. Regards Iain. --- libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Remove DRUNTIME_GC. --- libphobos/configure| 1 - libphobos/configure.ac | 1 - 2

[committed 1/2] d/dmd: Merge upstream dmd 09be6ee14 (PR94653)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream 09be6ee14. Initializes ncost before use, which was caught by valgrind, fixing PR94653. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/dmd/MERGE | 2 +-

[committed] d: Fix FAIL in gdc.dg/runnable.d on X32 targets (PR94609)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, Patch fixes test failure seen on X32 where a nested struct was passed in registers, rather than via invisible reference. Now, all non-POD structs are passed by invisible reference, not just those with a user-defined copy constructor/destructor. Bootstrapped and regression tested on

[committed 2/2] d/dmd: Merge upstream dmd ba99ee345 (PR94642)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream ba99ee345. Initializes the VectorArrayExp::size field with the correct value, fixing PR94642. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/dmd/MERGE| 2

[committed] d/dmd: Merge upstream dmd 62ce36f37 (PR94623)

2020-04-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream 62ce36f37. Adjusts the hardcoded index of Error.bypassException. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain --- gcc/d/dmd/MERGE| 2 +- gcc/d/dmd/dinterpret.c |

[PATCH] doc: Document all D-specific configuration options.

2020-04-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds documentation for --enable-libphobos-checking and --with-libphobos-druntime-only options. Does it read and explain clearly enough? Regards Iain. gcc/ChangeLog: * doc/install.texi (D-Specific Options): Document --enable-libphobos-checking and

Re: [PATCH, libphobos] Fix compilation dependencies on s390x-linux-musl

2020-04-21 Thread Iain Buclaw via Gcc-patches
On 13/04/2020 15:36, Iain Buclaw via Gcc-patches wrote: > On 08/04/2020 10:14, Iain Buclaw via Gcc-patches wrote: >> On 28/01/2020 05:00, Mathias Lang wrote: >>> diff -Nurp a/libphobos/configure.ac b/libphobos/configure.ac >>> --- a/libphobos/configure.ac >&

[committed] libphobos: Merge upstream phobos 99003a75a

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges libphobos with upstream phobos 99003a75a. Fixes hasLength unittest to pass on X32. Bootstrapped and regression tested on x86_64-linux-gnu with target_board configurations {-m64,-m32,-mx32}. Committed to mainline. Regards Iain. --- libphobos/src/MERGE |

[committed] libphobos: Merge upstream phobos bf0d0a37c (PR94455)

2020-04-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges libphobos with upstream phobos bf0d0a37c. Fixes std.array.Appender and RefAppender to use .opSlice() instead of data() Previously, Appender.data() was used to extract a slice of the Appender's array. Now use the [] slice operator instead. The same goes for RefAppender.

[committed] d: Merge front-end with upstream dmd d0d4f02a0

2020-04-13 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd d0d4f02a0. Removes the implementation of __traits(argTypes), which only supported x86_64 targets. The only use of this trait is an unused va_arg() function, this has been removed as well. Bootstrapped and regression tested

Re: [committed] libphobos: Add --enable-libphobos-checking configure option (PR94305)

2020-04-09 Thread Iain Buclaw via Gcc-patches
On 09/04/2020 12:02, Matthias Klose wrote: > On 4/9/20 12:47 AM, Iain Buclaw via Gcc-patches wrote: >> Hi, >> >> As GDCFLAGS is overriden by the top-level make file with '-O2 -g', >> libphobos ends up always being built with all contracts, invariants, and >> asse

[committed] d: Always set ASM_VOLATILE_P on asm statements (PR94425)

2020-04-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the special treatment of 'asm pure' blocks, as the need for code correctness outweighs the need for optimization around these statements. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * toir.cc

Re: [PATCH] S/390: Fix layout of struct sigaction_t

2020-04-07 Thread Iain Buclaw via Gcc-patches
On 01/04/2020 18:20, Stefan Liebler wrote: > On 4/1/20 12:54 PM, Iain Buclaw wrote: >> On 01/04/2020 08:28, Stefan Liebler wrote: >>> ping >>> >> >> Thanks, I'll send the patch upstream, as it's the same there. >> >> Looks OK to me. >> >> Regards >> Iain. >> > > Thanks for committing the patch

[committed] libphobos: Remove --enable-druntime-gc configure option.

2020-04-09 Thread Iain Buclaw via Gcc-patches
Hi, This is yet another old option that would have been somewhat useful back before the D front-end implementation was able to support compiling without the Druntime library. Now however, -fno-druntime makes the gcstub package redundant, so the option has been removed, along with the package

[PATCH] libiberty: Update D symbol demangling for latest ABI spec.

2020-04-04 Thread Iain Buclaw via Gcc-patches
Hi, Some small improvements and clarifications have been done in the D ABI specification to remove all ambiguities found in the current grammar, this implementation now more closely resembles the spec, whilst maintaining compatibility with the old ABI. Three new rules have been added to the ABI.

Re: [PATCH] S/390: Fix layout of struct sigaction_t

2020-04-01 Thread Iain Buclaw via Gcc-patches
On 01/04/2020 08:28, Stefan Liebler wrote: > ping > Thanks, I'll send the patch upstream, as it's the same there. Looks OK to me. Regards Iain.

Re: [PATCH] S/390: Fix PR91628

2020-04-01 Thread Iain Buclaw via Gcc-patches
On 01/04/2020 08:28, Stefan Liebler wrote: > ping > Hi Stefan, As I've already said, I think that the name should be __ibmz_get_tls_offset to make clear that it is an internal function. Other than that, looks good to me. Iain.

[[committed]] d: Use d_comdat_linkage on generated internal decl.

2020-03-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds weak linkage to internal TypeInfo data on top of the existing DECL_COMDAT, which helps in the unlikely event that two of the same TypeInfo data ends up in multiple places. Tested on x86_64-linux-gnu and committed to mainline. Regards Iain --- gcc/d/ChangeLog: *

[committed] d: Use memset to fill alignment holes with zeroes.

2020-03-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the manual insertion of padding for fields in constructed struct literals, and instead uses memset() on the declaration being initialized. When compiling optimized builds, the intent is usually missed, and alignment holes end up with non-zero values in them anyway.

[committed] testsuite: Split up gdc-test.exp into each subdirectory

2020-03-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch splits up gdc-test.exp into multiple test scipts, one for each subdirectory containing test files, instead of having one test script to manage them all. This allows removing some workarounds, such as the need to create symlinks in the test run directory. Tested on

[committed] d: Add always_inline to the internal attribute table.

2020-03-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds always_inline to the d_langhook_common_attribute_table. The attribute is not directly accessible from user code, rather it is indirectly added from the @forceinline attribute. Even so, a handler should be present for it to prevent false positive warnings. Said warnings are

[committed] d: Merge UDAs between function prototype and definitions (PR90136)

2020-03-31 Thread Iain Buclaw via Gcc-patches
Hi, This change fixes the symbol merging in get_symbol_decl to also consider prototypes. This allows the ability to set user defined attributes on the prototype of a function, which then get applied to the definition, if found later in the compilation. The lowering of UDAs to GCC attributes has

[committed] testsuite: Handle more kinds of gdc.test test flags and directives.

2020-03-29 Thread Iain Buclaw via Gcc-patches
Hi, This is the last of the small QA improvements to the dejagnu test files for running the D2 testsuite. This patch adds cases for JSON and D header file generation flags in the testsuite, and sets up the test accordingly to only compile, then check that the expected output file exists.

[committed] testsuite: Move C++ tests in gdc.test into own subdirectory.

2020-03-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with dmd upstream 3e10e2dd2. Tests have been moved into runnable_cxx as part of the merge with dmd. The extra flags required for tests that mix C++ and D are now limited to only a small subset of tests, rather than applied to all across

[committed] d: Fix gdc.dg/pr92216.d FAILs on 32-bit targets

2020-04-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes the test for PR92216 to also succeed on 16 and 32-bit targets. The symbol being scanned for only matched on 64-bit targets where the this pointer offset is 16. Tested on x86_64-linux-gnu with -m32 and -mx32. Also checked avr-gcc for what output comes from a 16-bit

[committed] d: Fix new tests gdc.dg/pr93038.d and gdc.dg/pr93038b.d in r10-7320 fail

2020-04-01 Thread Iain Buclaw via Gcc-patches
Hi, This patch adjusts another test in gdc.dg that was reported to be failing in PR94315. The scan-file match is likely too strict to always succeed, so instead have split it up into a set of smaller matches. Tested on x86_64-linux-gnu and committed to mainline. Regards Iain. ---

[PATCH] libphobos: Fix builds for powerpc64 with multilib

2020-04-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch should fix builds on PPC with multilib enabled. Multilibs should not have been split up as two logically different CPU, so at configure time, powerpc64 was being detected, but none of the 32-bit support files were being compiled in. Segher, is this OK? Immediately to hand, I

Re: [PATCH] libphobos: Fix builds for powerpc64 with multilib

2020-04-28 Thread Iain Buclaw via Gcc-patches
On 28/04/2020 20:43, Iain Buclaw wrote: > On 28/04/2020 20:25, Segher Boessenkool wrote: >> Hi! >> >> On Tue, Apr 28, 2020 at 07:58:37PM +0200, Iain Buclaw wrote: >>> >>> +#if defined( __ppc__ ) || defined( __PPC__ ) || defined( __powerpc__ ) >> >> What is this for? Everything in

Re: [PATCH] libphobos: Fix builds for powerpc64 with multilib

2020-04-28 Thread Iain Buclaw via Gcc-patches
On 28/04/2020 20:25, Segher Boessenkool wrote: > Hi! > > On Tue, Apr 28, 2020 at 07:58:37PM +0200, Iain Buclaw wrote: >> This patch should fix builds on PPC with multilib enabled. >> >> Multilibs should not have been split up as two logically different CPU, >> so at configure time, powerpc64 was

[committed] libphobos: Backport extern(C) bindings from druntime 2.091

2020-04-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D runtime library with upstream druntime 47688279. Backports latest extern(C) bindings from druntime, fixing PR90718 and PR90719. Both of which should be cherry-picked into the gcc-9 branch. Bootstrapped and regression tested on x86_64-linux-gnu, and commited to

[committed] d: Recognize pragma(inline) in the code generator.

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds recognition of pragma(inline) in the code generator. Pragma inline affects whether functions are inlined or not. If at the declaration level, it affects the functions declared in the block it controls. If inside a function, it affects the function it is enclosed by.

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

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds power*-*-linux* as a supported target for libphobos. As there is no support for IBM real (long double) types in the std.math module, full phobos support has been switched off. This is not needed currently anyway in order to be able to bootstrap a self-hosted front-end

Re: [committed] d: Merge upstream dmd 09db0c41e, druntime e68a5ae3.

2020-04-26 Thread Iain Buclaw via Gcc-patches
On 25/04/2020 22:50, Segher Boessenkool wrote: > Hi! > > On Sat, Apr 25, 2020 at 02:20:19AM +0200, Iain Buclaw via Gcc-patches wrote: >> +// Parse DoubleDoubles as a pair of doubles. >> +// The layout of the type is: >> +//

[committed] libphobos: Remove GDCFLAGSX variable from configure scripts.

2020-04-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch changes the testsuite to compile all tests with the same GDCFLAGS as used to build the library. Notably, this would now be using "-O2", whereas before the testsuite was compiling all tests with "-O0". That we are now compiling with "-O2", there is a possibility of previously

[PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-04-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds a section on the D front-end about all changes that have gone into the GCC 10 release. W3 validator reports there are no errors or warnings to show. Any comments or clarifications required on what's written up? Or is it OK to commit to the website? Regards Iain. ---

Ping: [PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-05-04 Thread Iain Buclaw via Gcc-patches
Ping Another thing that forgot to mention was added __traits(getLinkage) support for class/struct types. Will include that too. Iain On 28 April 2020 01:12:19 CEST, Iain Buclaw wrote: >Hi, > >This patch adds a section on the D front-end about all changes that have >gone into the GCC 10

[committed] d: Fix order of precedence for -defaultlib and -debuglib

2020-04-24 Thread Iain Buclaw via Gcc-patches
Hi, The order of precedence used by the upstream reference compiler for determining what library to link against is: - No library if -nophoboslib or -fno-druntime was seen. - The library passed to -debuglib if -g was also seen. - The library passed to -defaultlib - The in-tree libgphobos library.

Re: [committed] d: Merge upstream dmd 09db0c41e, druntime e68a5ae3.

2020-04-26 Thread Iain Buclaw via Gcc-patches
On 26/04/2020 18:41, Segher Boessenkool wrote: > On Sun, Apr 26, 2020 at 10:38:57AM +0200, Iain Buclaw wrote: >> On 25/04/2020 22:50, Segher Boessenkool wrote: >>> On Sat, Apr 25, 2020 at 02:20:19AM +0200, Iain Buclaw via Gcc-patches wrote: >>>> +//

[committed] libphobos: Remove AC_CACHE_CHECK from network library tests.

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch simplifies the socket library checks, as LIBS is the target variable ultimately being assigned to. The original comments from the deleted libjava directories have been restored as well. Regression tested on x86_64-linux-gnu, committed to mainline. Regards Iain. ---

[committed] d: Merge upstream dmd f8a1a5153, druntime 2b5c0b27 (PR89418)

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end impleentation with upstream dmd f8a1a5153, and the D runtime library with upstream druntime 2b5c0b27. Adds a new test directive COMPILABLE_MATH_TEST, and support has been added for it in gdc-convert-test so that they are skipped if phobos is not present on

[committed] d: Fix ICE in assign_temp, at function.c:984 (PR94777)

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in the D front-end when passing non-trivially copyable types to variadic functions. Named arguments were being passed around by invisible reference, just not variadic arguments. There is a need to de-duplicate the routines that handle declaration/parameter promotion

[committed] libphobos: Add hppa-*-linux* as a supported target

2020-04-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch add hppa-*-linux* as a supported target for libphobos. This is has been done based off early testing done back in GCC-9 development by John, and recent testing inside a QEMU container. The hppa64-*-* target has been left out due to thread local storage being completely unusable

[committed] libphobos: Fix KERNEL_VERSION condition in libphobos testsuite

2020-04-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an effective target check in the libphobos testsuite. A typo in the macro call meant that the #error always triggered. Regression tested on x86_64-linux-gnu with multilib configurations {-m64,-m32,-mx32}, committed to mainline. Regards Iain. --- libphobos/ChangeLog:

Re: [committed] libphobos: Add power*-*-linux* as a supported target

2020-04-29 Thread Iain Buclaw via Gcc-patches
On 28/04/2020 19:12, Segher Boessenkool wrote: > Hi! > > On Sun, Apr 26, 2020 at 11:35:21AM +0200, Iain Buclaw wrote: >> This patch adds power*-*-linux* as a supported target for libphobos. > > Many thanks for doing this! > > A problem though: libphobos/libdruntime is built for -m32 as well,

[committed] d: Merge bug fix from upstream dmd 06160ccae

2020-04-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds classKind information to the front-end AST, which in turn allows us to fix code generation of type names for extern(C) and extern(C++) structs and classes. Inspecting such types inside a debugger now just works without the need to cast(module_name.cxx). Bootstrapped on

[committed] d: Merge upstream dmd 934df6f8c, druntime 7bdd83d7 (PR90719, PR94825)

2020-04-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch corrects a previous change made to the SPARC stdc bindings, and backports PPC-related fixes. The library and language testsuite now passes fully on powerpc64le-linux-gnu. Backported from upstream dmd 934df6f8c, and druntime 7bdd83d7. Bootstrapped and regression tested on

[committed] d: Fix documentation of -defaultlib= and -debuglib=

2020-04-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch corrects the documentation of -defaultlib= and -debuglib=. >From the generated manpages, it was not clear that its usage is '-debuglib='. Verified the contents of the generated manpage, committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * gdc.texi (Options for

[committed] d: Merge upstream dmd 09db0c41e, druntime e68a5ae3.

2020-04-24 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 09db0c41e, and the D runtime library with upstream druntime e68a5ae3. * New core.math.toPrec templates have been added as an intrinsic. Some floating point algorithms, such as Kahan-Babuska-Neumaier Summation, require

[PATCH] testsuite: Add check_effective_target_d_runtime_has_std_library procedure

2020-04-14 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds an effect target d_runtime_has_std_library to target-supports.exp, and some preliminary uses of it. The current check_effective_target_d_runtime procedure returns false if the target is without any core runtime library for D. This additional procedure is for targets where

Ping: [PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-05-13 Thread Iain Buclaw via Gcc-patches
Ping. On 07/05/2020 16:04, Iain Buclaw via Gcc-patches wrote: > Hi, > > Updated the patch to include missed changes, and slighted reworded some > entries > to make them clearer/read easier. > > OK to commit? > > Iain. > > --- &

Re: [PATCH] libiberty: Handle function return type and variable declaration type in D demangler.

2020-05-16 Thread Iain Buclaw via Gcc-patches
On 16/05/2020 01:42, Witold Baryluk via Gcc-patches wrote: > Adds support for DMGL_RET_POSTFIX in D demangler, so it shows the type > of the declared variable, or function return type. Postfix notation is > used with space. > Hi, Thanks for your contribution, it would be good to have a

[committed][GCC9] d: Fix wrong vtable offset in virtual function call

2020-05-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes PR95155, which prevented the D front-end in gcc-9 from being able to bootstrap a self-hosted D compiler. The Semantic (pass 1) analysis for classes is handled by ClassDeclaration::semantic. For a given class, this method may be ran multiple times in order to resolve forward

[committed][GCC9] libphobos: Fix struct layout of stat_t on sparc-*-solaris*

2020-05-16 Thread Iain Buclaw via Gcc-patches
Hi, The last change to the bindings removed the st_pad3 field from the wrong struct. It should have been stat64_t that needed updating instead. Patch backported from r10-8066, committed to gcc-9 branch. Iain. --- libphobos/ChangeLog PR d/90719 *

[committed][GCC10] d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959

2020-05-17 Thread Iain Buclaw via Gcc-patches
Hi, This patch has been backported from mainline r11-154. The ICE is also present on the gcc-9 branch, and this applies cleanly there as well, so will send out another email for that backport. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to the gcc-10 branch. Regards

[committed][GCC9] d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959

2020-05-17 Thread Iain Buclaw via Gcc-patches
Hi, This patch is the gcc-9 backport of mainline r11-154 / gcc-10 r10-8149. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to the gcc-9 branch. Regards Iain --- gcc/d/ChangeLog: PR d/94970 * d-codegen.cc (force_target_expr): Move create_temporary_var

[committed][GCC10] libphobos: Backport library fixes from mainline

2020-05-17 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r11-445 to the gcc-10 release branch. Bootstrapped and regression tested on x86_64-linux-gnu, and committed. Regards, Iain. --- libphobos/ChangeLog: PR d/95166 * libdruntime/core/cpuid.d (cpuidX86): Do not use i7 detection on AMD processors.

[PATCH] libphobos: Merge upstream druntime 5cc061a8, phobos 64ed4684f

2020-05-17 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D runtime library with upstream druntime 5cc061a8, and the D standard library with upstream phobos 64ed4684f. Fixes included within are: - core.cpuid has been fixed to not use i7 detection on AMD processors (fixes PR95166). - std.net.curl has been fixed to

[committed] d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959

2020-05-06 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes all related helper functions around BIND_EXPR generation in the D front-end, which were the cause of an ICE. Both array concat and array new expressions wrapped any temporaries created into a BIND_EXPR. This does not work if an expression used to construct the result

Ping: [PATCH] libiberty: Update D symbol demangling for latest ABI spec.

2020-05-10 Thread Iain Buclaw via Gcc-patches
Ping On 03/05/2020 09:37, Iain Buclaw via Gcc-patches wrote: > Ping. > > There is a new mangle string "Nm" in the abi to denote the @live attribute, > however will add support in a follow up patch. > > > On 15 April 2020 12:04:29 CEST, Iain Buclaw via

[committed][GCC9] d: Fix multiple definition error when using mixins and interfaces (PR92216, PR95184)

2020-05-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch for PR d/92216 was already applied to mainline before the GCC-10 release, however due to a second bug report (PR d/95184) against the GCC-9 release, I've decided it's best to apply it there too. Backport is a merge of r10-7199 and r10-7504. Bootstrapped and regression tested on

[PATCH] contrib: Remove rs6000-ibm-aix5.3.0 from config-list.mk

2020-05-18 Thread Iain Buclaw via Gcc-patches
Hi, Looking at the results of building all targets (with D the front-end), I noticed this configuration failed due to support being removed in SVN r263506. OK? Regards, Iain. --- contrib/ChangeLog: * config-list.mk (LIST): Remove rs6000-ibm-aix5.3.0. --- contrib/config-list.mk | 2 +-

Re: Ping: [PATCH] libiberty: Update D symbol demangling for latest ABI spec.

2020-05-14 Thread Iain Buclaw via Gcc-patches
On 14/05/2020 16:36, Jeff Law wrote: > On Sun, 2020-05-10 at 11:10 +0200, Iain Buclaw via Gcc-patches wrote: >> Ping >> >> On 03/05/2020 09:37, Iain Buclaw via Gcc-patches wrote: >>> Ping. >>> >>> There is a new mangle string "Nm" in t

[committed] libiberty: Handle @live attribute in D demangler.

2020-05-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds support for demangling D functions annotated with the new ownership/borrowing system attribute. Following Jeff's advice from the last patch review, this has been regression tested and committed to mainline. Firstly, as it is assumed this falls under my D front-end maintainer

Re: Ping: [PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-05-14 Thread Iain Buclaw via Gcc-patches
On 07/05/2020 16:04, Iain Buclaw via Gcc-patches wrote: > Hi, > > Updated the patch to include missed changes, and slighted reworded some > entries > to make them clearer/read easier. > I've gone ahead and pushed it, after someone else did a review of the wording. Iain.

Re: Ping: [PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-05-14 Thread Iain Buclaw via Gcc-patches
On 14/05/2020 17:04, Gerald Pfeifer wrote: > On Thu, 14 May 2020, Jeff Law wrote: >>> OK to commit? >> OK. In fact, this seems like you shouldn't need reviews -- you're just >> updating the docs for D. > > Agreed, though always happy to help and provide review and feedback > - sometimes just a

[PATCH d/92309] Committed fix for assignment to anonymous union member corrupts sibling members in struct

2020-03-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a logic bug in the adjustment of nested fields in anonymous aggregates in the D front-end, closing PR d/92309. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain. --- gcc/d/ChangeLog: PR d/92309 * types.cc

Re: [PATCH, d] Committed merge with upstream dmd e9420cfbf

2020-03-19 Thread Iain Buclaw via Gcc-patches
On 15/03/2020 14:32, Rainer Orth wrote: > Hi Ian, > >> This patch merges the D front-end implementation with dmd upstream e9420cfbf. > [...] >> Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. > > this merge introduced a regression on Solaris (SPARC and x86): > >

[PATCH d] Committed merge upstream dmd d1a606599

2020-03-19 Thread Iain Buclaw via Gcc-patches
Fixes long standing regression in the D front-end implemention, adds a new field to allow retrieving a list of all content imports from the code generator, and fixes a recently introduced test to use old-style syntax for contracts. Bootstrapped and tested on x86_64-linux-gnu, and committed to

[PATCH lto/91027][D] Committed fix for SEGV in hash_table::find_slot_with_hash

2020-03-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes LTO bug with the D front-end. As DECL_ASSEMBLER_NAME is set on the TYPE_DECL, so TYPE_CXX_ODR_P must also be set on the type. The addition of merge_aggregate_types is not strictly needed now, but it fixes a problem introduced in newer versions of the dmd front-end where

[PATCH d] Committed fix for ICE in add_symbol_to_partition_1 at lto/lto-partition.c:215 (PR94920)

2020-03-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch addresses two problems with TypeInfo initializer generation. 1. D array fields pointing to compiler generated data are referencing public symbols with no unique prefix, which can lead to duplicate definition errors in some hard to reduce cases. To avoid name clashes, all symbols

[PATCH] d: Fix missing dependencies in depfile for imported files (PR93038)

2020-03-21 Thread Iain Buclaw via Gcc-patches
Hi, A new field for tracking imported files was added to the front-end, this makes use of it by writing all such files in the make dependency list, fixing PR 93038. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain. --- gcc/d/ChangeLog: 2020-03-22 Iain Buclaw

[committed] d: Generate phony targets for content imported files (PR93038)

2020-03-22 Thread Iain Buclaw via Gcc-patches
Hi, This patch is an addition to the last change, which started including content imported files in the make dependency list. Now phony targets are also written out if -MP is given. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk. Regards Iain. --- gcc/d/ChangeLog:

[PATCH PR d/92792]: Committed reset libtool_VERSION to 1:0:0

2020-03-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch resets the libphobos soversion. Firstly, because Phobos, being template heavy, makes no attempt at being backwards compatible with previous versions. Even improvements in attribute inference in the compiler can have the effect of changing the mangling of many symbols, which is

[PATCH] d: Committed fix multiple definition error when using mixins and interfaces.

2020-03-16 Thread Iain Buclaw via Gcc-patches
Hi, When generating thunks in the D front-end, they need not necesarily be in the same compilation unit as the module where the target function is declared. When this happens, don't make the thunk public. Later on expand_thunk will be called with force_gimple_thunk=true, so the thunk can never

Ping: [PATCH] wwwdocs: Add D front-end section for GCC 10 changes

2020-05-07 Thread Iain Buclaw via Gcc-patches
Hi, Updated the patch to include missed changes, and slighted reworded some entries to make them clearer/read easier. OK to commit? Iain. --- htdocs/gcc-10/changes.html | 35 +++ 1 file changed, 35 insertions(+) diff --git a/htdocs/gcc-10/changes.html

Re: [PATCH 0/3] Add CET support to libphobos

2020-05-08 Thread Iain Buclaw via Gcc-patches
On 08/05/2020 22:10, H.J. Lu wrote: > This patch set adds CET support to libphobos. Since libphobos uses zlib > target library, CET is also enabled in zlib. > > OK for master? > I have no problem with the libphobos parts. Regards Iain.

Re: [PATCH 0/3] Add CET support to libphobos

2020-05-09 Thread Iain Buclaw via Gcc-patches
On 9 May 2020 00:16:54 CEST, "H.J. Lu" wrote: >On Fri, May 8, 2020 at 2:50 PM Iain Buclaw wrote: >> >> On 08/05/2020 22:10, H.J. Lu wrote: >> > This patch set adds CET support to libphobos. Since libphobos uses zlib >> > target library, CET is also enabled in zlib. >> > >> > OK for master? >> >

Re: [PATCH] libiberty: Update D symbol demangling for latest ABI spec.

2020-05-03 Thread Iain Buclaw via Gcc-patches
Ping. There is a new mangle string "Nm" in the abi to denote the @live attribute, however will add support in a follow up patch. On 15 April 2020 12:04:29 CEST, Iain Buclaw via Gcc-patches wrote: >Ping. > >On 04/04/2020 13:33, Iain Buclaw wrote: >> Hi, >&

Re: ubsan: d-demangle.c:214 signed integer overflow

2020-09-03 Thread Iain Buclaw via Gcc-patches
Excerpts from Alan Modra's message of September 3, 2020 3:01 pm: > Running the libiberty testsuite > ./test-demangle < libiberty/testsuite/d-demangle-expected > libiberty/d-demangle.c:214:14: runtime error: signed integer overflow: > 922337203 * 10 cannot be represented in type 'long int' > > On

[committed] d: Warn when casting from a D class to a C++ class.

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a missed warning opportunity when casting from a D class to a C++ class, and adds tests covering warnings within the code generator. Before, the warning was only issued when casting in the other direction. Now a warning is printed for both directions. Bootstrapped and

[committed] d: Enable miscellaneous warnings by -Wextra flag

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch turns on all warnings handled by the D front-end code generator with -Wextra. These warnings are handled outside of the D core language front-end, so shouldn't be enabled by -Wall. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-x32. Committed to mainline. Regards

[committed] d: Don't warn about variables initialized with 'void'

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes a useless warning in the D front-end. There is no problem with using `T var = void', it is if the variable remains uninitialized on first use that a warning should be issued. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-x32. Committed to mainline. Regards

[PATCH] libphobos: libdruntime doesn't support shadow stack (PR95680)

2020-09-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes whatever CET support was in the switchContext routine for x86 D runtime, and instead uses the ucontext fallback, which propely handles shadow stack handling. Rather than implementing support within D runtime itself, use libc getcontext/setcontext functions if CET is

  1   2   3   4   5   6   >