[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
4 # of unsupported tests 120 /build/gcc/gdc version 10.0.1 20200426 (experimental) (GCC) --- Tested on an emulated hppa-linux-gnu target, committed to mainline. Regards Iain. --- libphobos/ChangeLog: 2020-04-27 Iain Buclaw * configure.tgt: Add hppa-*-linux

[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/libdruntim

[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
(-) create mode 100644 gcc/testsuite/gdc.dg/pr94970.d diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 1a8bedfef2d..9cf976d97e1 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,23 @@ +2020-05-17 Iain Buclaw + + Backport from mainline + 2020-05-06 Iain Buclaw

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

2020-05-17 Thread Iain Buclaw via Gcc-patches
..5048d2ab400 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,23 @@ +2020-05-17 Iain Buclaw + + Backport from mainline + 2020-05-06 Iain Buclaw + + PR d/94970 + * d-codegen.cc (force_target_expr): Move create_temporary_var + implementation inline here

[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
100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,12 @@ +2020-05-18 Iain Buclaw + + Backport from mainline + 2020-03-16 Iain Buclaw + + PR d/92216 + * decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target + function is external to the current

[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
templated types could be sent more than once to the D code generator. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain --- gcc/d/ChangeLog: 2020-03-20 Iain Buclaw PR lto/91027 * d-tree.h (struct GTY): Add daggregate field

[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
this to the gcc-9 branch if there's no problem with that. Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards, Iain. --- gcc/d/ChangeLog: 2020-03-21 Iain Buclaw PR d/94290 * typeinfo.cc (class TypeInfoVisitor): Replace type_ field with decl_

[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
: 2020-03-22 Iain Buclaw PR d/93038 * d-lang.cc (deps_write): Generate phony targets for content imported files. gcc/testsuite/ChangeLog: 2020-03-22 Iain Buclaw PR d/93038 * gdc.dg/pr93038b.d: New test. --- gcc/d/d-lang.cc | 39

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

2020-03-16 Thread Iain Buclaw via Gcc-patches
-10/10-20200312-2/debian/patches/libphobos-soversion.diff/ Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. Regards Iain. --- libphobos/ChangeLog: 2020-03-16 Iain Buclaw PR d/92792 * Makefile.in: Regenerate. * configure: Regenerate

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

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

Re: [PATCH] libphobos: Include to generate the CET marker for -fcf-protection

2020-09-09 Thread Iain Buclaw via Gcc-patches
Excerpts from H.J. Lu's message of September 9, 2020 7:08 pm: > On Mon, Sep 7, 2020 at 7:09 PM H.J. Lu wrote: >> >> On Mon, Sep 7, 2020 at 2:35 PM Iain Buclaw wrote: >> > >> > Hi, >> > >> > This patch removes whatever CET support was

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

2020-09-08 Thread Iain Buclaw via Gcc-patches
Excerpts from H.J. Lu's message of September 8, 2020 4:09 am: > On Mon, Sep 7, 2020 at 2:35 PM Iain Buclaw wrote: >> >> Hi, >> >> This patch removes whatever CET support was in the switchContext routine >> for x86 D runtime, and instead uses the ucontext fallback

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

2020-09-09 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of September 8, 2020 11:34 pm: > Hi Iain, > --- libphobos/ChangeLog: PR d/95680 * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (DCFG_ENABLE_CET): Substitute. *

[committed] d: Build TYPE_DECLs for non-numeric enum types.

2020-09-12 Thread Iain Buclaw via Gcc-patches
Hi, This patch alters TYPE_DECL generation to also build one for enums whose member type is non-numeric. This is done so that the DWARF pass will emit a DW_TAG_typedef where the member type of an enum can't be represented in an ENUMERAL_TYPE. Bootstrapped and regression tested on

[committed] d: Return promoted types in d_type_promotes_to when linkage is not D

2020-09-12 Thread Iain Buclaw via Gcc-patches
Hi, This enables warnings to be shown when a wrong type is passed to va_arg inside an extern(C) or extern(C++) function. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32. Committed to mainline. Regards Iain --- gcc/d/ChangeLog: PR d/97002 * d-codegen.cc

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

2020-09-04 Thread Iain Buclaw via Gcc-patches
Excerpts from Alan Modra's message of September 4, 2020 2:59 am: > On Thu, Sep 03, 2020 at 11:02:50PM +0200, Iain Buclaw wrote: >> Excerpts from Alan Modra's message of September 3, 2020 3:01 pm: >> > Running the libiberty testsuite >> > ./test-demangle < libiberty

[committed] d: Move all runnable tests in gdc.dg to gdc.dg/torture

2020-09-03 Thread Iain Buclaw via Gcc-patches
Hi, This patch creates a new test subdirectory gdc.dg/torture, moving all runnable tests into it. Tests that are not executed do not need to be compiled as torture tests, they are only present for testing for a certain bug or ICE. Tested on x86_64-linux-gnu, and committed to mainline. Regards

[committed] d: Only test with default permutation flags for runnable tests.

2020-09-03 Thread Iain Buclaw via Gcc-patches
Hi, This patch alters the way the D2 testsuite is ran. - All compilable tests now default to being compiled, rather than assembled. A new directive has been added "LINK" to set the test action to link. - Unless the test explicitly requests, all compilable tests as well as

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

2020-09-04 Thread Iain Buclaw via Gcc-patches
Excerpts from Alan Modra's message of September 4, 2020 3:34 pm: > So this one is on top of the previously posted patch. > > * d-demangle.c (string_need): Take a size_t n arg, and use size_t tem. > (string_append): Use size_t n. > (string_appendn, string_prependn): Take a size_t

[committed] d: Fix ICE in create_tmp_var, at gimple-expr.c:482

2020-09-04 Thread Iain Buclaw via Gcc-patches
Hi, Array concatenate expressions were creating more SAVE_EXPRs than what was necessary. The internal error itself was the result of a forced temporary being made on a TREE_ADDRESSABLE type. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32. Committed to mainline and backported

[committed] d: Fix ICEs in the front-end when pointer size is 16-bit.

2020-08-31 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a couple of ICEs seen when compiling D source code for a 16-bit target. The one I used for testing was xstormy16-elf. In the lowering of `bt*' intrinsics, some integer constants had mismatched types, and bitsize was set to the wrong value. In base_vtable_offset, the base

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

2020-09-07 Thread Iain Buclaw via Gcc-patches
Excerpts from Alan Modra's message of September 7, 2020 2:56 am: > On Fri, Sep 04, 2020 at 06:23:10PM +0200, Iain Buclaw wrote: >> If we're already using limits.h, I guess it should be fine to also add >> >> #define UINT_MAX ((unsigned) ~0U) > > Yes, except that I'l

Re: [PATCH] MIPS/libphobos: Fix switchcontext.S assembly for MIPS I ISA

2020-10-08 Thread Iain Buclaw via Gcc-patches
Excerpts from Maciej W. Rozycki's message of October 7, 2020 9:45 pm: > Correct MIPS I assembly build errors in switchcontext.S: > > .../libphobos/libdruntime/config/mips/switchcontext.S: Assembler messages: > .../libphobos/libdruntime/config/mips/switchcontext.S:50: Error: opcode not >

[committed] d: Merge upstream dmd 3a9790525

2020-10-12 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 3a9790525. Fixes the return codes to match the documentation of Target::isVectorTypeSupported. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog:

[committed] libphobos: Override tool_timeout value in testsuite

2020-10-12 Thread Iain Buclaw via Gcc-patches
Hi, Some of the larger tests in the phobos testsuite on occasion trigger the default timeout limit. Increasing the limit to 10 minutes should give compilation enough time to finish. Regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog:

[committed] d: Fix alias protection being ignored if used before declaration.

2020-10-12 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 3a9790525. Fixes a symbol resolver bug where a private alias becomes public if used before its declaration. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline, and backported to the gcc-10 and

[committed] d: Move d_gimplify_expr and dependencies to d-gimplify.cc

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves D-specific tree lowering parts to its own file. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards Iain --- gcc/d/ChangeLog: * Make-lang.in (D_OBJS): Add d-gimplify.o. * d-lang.cc (empty_modify_p): Move to

[committed] d: Merge upstream dmd cb4a96fae

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd cb4a96fae. Fixes both a bug where compilation would hang, and an issue where recursive template limits are hit too early. Regstrapped on x86_64-linux-gnu/-m32/-mx32, committed to mainline, and cherry-picked to the

[committed] d: Merge upstream dmd e49192807

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd e49192807. 1. Removes prelude assert for constructors and destructors. To trigger these asserts one needed to construct or destruct an aggregate at the null memory location. This would crash upon any data member access,

[committed] d: Fix no RVO when returning struct literals initialized with constructor.

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports a change from upstream dmd that moves front-end NRVO checking from ReturnStatement semantic to the end of FuncDeclaration semantic. In the codegen, retStyle has been partially implemented so that only structs and static arrays return RETstack. This isn't accurate, but

[committed] d: Use read() to load contents of stdin into memory.

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces getc() with read(), which would be an improvement over reading one character at a time. An ICE was also discovered when mixing reading from stdin with `-v', this has been fixed in upstream DMD and backported as well. Regstrapped on x86_64-linux-gnu/-m32/-mx32, committed

[committed] d: Fix small struct literals that have non-deterministic hash values

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch addresses the same issue as the first patch for PR96153, only this time, fix it also for structs that are not returned in memory. Tests have been added that triggered an assertion on x86_64, however the original test was failing on SPARC 64-bit targets. Regstrapped on

[committed] d: Move lowering of each tree node to separate functions

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves each lowering in d_gimplify_expr to separate functions. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards Iain --- gcc/d/ChangeLog: * d-gimplify.cc (d_gimplify_expr): Move lowering of each tree node to

[committed] d: Fix no NRVO when returning an array of a non-POD struct

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes another NRVO bug in the D front-end where arrays of non-POD types were not being returns by reference. TREE_ADDRESSABLE was not propagated from the RECORD_TYPE to the ARRAY_TYPE, so NRVO code generation was not being triggered. Regstrapped on x86_64-linux-gnu/-m32/-mx32,

[committed] d: Don't run all permutations for fail_compilation tests.

2020-08-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch turns off permutations for fail_compilatation tests if the test file did not request its own options. Fail compilation tests only check for language errors from the front-end, all default option switches do nothing to alter the error. Regression tested on

[committed] d: Fix ICE Segmentation fault during RTL pass: expand on armhf/armel/s390x

2020-08-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE that occurred when RTL was expanding D front-end generated code. Now DECL_BY_REFERENCE is only ever set if the return type is TREE_ADDRESSABLE. Regstrapped on x86_64-linux-gnu{-m64,-m32,-mx32} configurations, committed to mainline and backported to releases/gcc-10.

Re: [PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-18 Thread Iain Buclaw via Gcc-patches
Excerpts from Olivier Hainque's message of August 18, 2020 10:01 am: > Hello Iain, > >> On 17 Aug 2020, at 10:08, Iain Buclaw wrote: >> >> Hi, >> >> Currently when building a cross-compiler targeting arm-wrs-vxworks7, the >> selftests fail unle

Re: [PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-19 Thread Iain Buclaw via Gcc-patches
Excerpts from Olivier Hainque's message of August 18, 2020 2:25 pm: > Hi Iain, > >> On 18 Aug 2020, at 13:45, Iain Buclaw wrote: >> >> Attached is the change as per your proposal. >> >> * config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Replace

[committed] d: Merge upstream dmd 1b5a53d01.

2020-08-20 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in setValue at dmd/dinterpret.c:7046 This was originally seen when running the testsuite for a 16-bit target, however, it could be reproduced on 32-bit using long[] as well. Regstrapped on x86_64-linux-gnu/-m32/-mx32, committed to mainline and backported to gcc-10

Re: [PATCH] c++: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-08-27 Thread Iain Buclaw via Gcc-patches
Excerpts from Jakub Jelinek's message of August 27, 2020 12:06 pm: > On Fri, Jul 31, 2020 at 04:28:05PM -0400, Jason Merrill via Gcc-patches wrote: >> On 7/31/20 6:06 AM, Jakub Jelinek wrote: >> > On Fri, Jul 31, 2020 at 10:54:46AM +0100, Jonathan Wakely wrote: >> > > > Does the standard require

[PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-17 Thread Iain Buclaw via Gcc-patches
Hi, Currently when building a cross-compiler targeting arm-wrs-vxworks7, the selftests fail unless the VSB_DIR environment variable is set. The same !nostdinc condition is used for VXWORKS_ADDITIONAL_CPP_SPEC. OK for mainline? Iain. --- gcc/ChangeLog: * config/vxworks.h

[PING][PATCH] tilepro: Update generator file to define IN_TARGET_CODE in target file.

2020-08-17 Thread Iain Buclaw via Gcc-patches
Ping. On 31/05/2020 12:48, Iain Buclaw wrote: > Hi, > > The target files tilegx/mul-tables.c and tilepri/mul-tables.c were > updated in SVN r255743, but the generator file that produces them > wasn't, so it was reverting this change during builds. > > Only tested by running

[PING][PATCH 6/6] contrib: Add OPT-enable-obsolete to tile*-*-*

2020-08-17 Thread Iain Buclaw via Gcc-patches
Ping. On 31/05/2020 12:20, Iain Buclaw wrote: > The tile*-*-* targets were marked as obsolete in SVN r259724. > > OK? > > Regards > Iain > > --- > contrib/ChangeLog: > > * config-list.mk (LIST): Add OPT-enable-obsolete to tilegx-linux-gnu, > t

Re: [PATCH] PR target/96347: non-delegitimized UNSPEC UNSPEC_TP (19) found in variable location

2020-08-20 Thread Iain Buclaw via Gcc-patches
Excerpts from Richard Sandiford's message of August 19, 2020 1:22 pm: > Iain Buclaw via Gcc-patches writes: >> Hi, >> >> On x86, a memory reference reference to a TLS address can be broken out >> and stored in a register, for instance: >> >>

Re: [PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-20 Thread Iain Buclaw via Gcc-patches
Excerpts from Olivier Hainque's message of August 20, 2020 11:01 am: > Hello Iain, > >> On 19 Aug 2020, at 14:17, Iain Buclaw wrote: > >> Ah, no worries, attached updated patch. > >> As we have discussed this off the lists though, we agreed to com

[PATCH 1/6] contrib: Remove cris-linux and crisv32-* from config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
Hi, Continuing from the previous update to config-list.mk, I realize that there are a few other more additions/removals to be done. To start off, support for crisv32-*-* and cris-*-linux* was removed in git 2b36e4dc813/r11-214. OK? Regards Iain --- contrib/ChangeLog: * config-list.mk

[PATCH 4/6] contrib: Add or1k-elf, or1k-linux-*, and or1k-rtems to config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
Support for OpenRISC target was added in SVN r265963. The target configurations were taken from the list of supported toolchains[1], so seems sensible to include them all. OK? Regards Iain [1]: https://www.openrisc.io/software --- contrib/ChangeLog: * config-list.mk (LIST): Add

[PATCH 5/6] contrib: Add v850e1-elf to config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
This comment was added in SVN r173410, v850e1-* was added to config.sub in SVN r174691i (around 2011). So it should no longer apply. OK? Regards Iain --- contrib/ChangeLog: * config-list.mk (LIST): Add v850e1-elf. --- contrib/config-list.mk | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH] tilepro: Update generator file to define IN_TARGET_CODE in target file.

2020-05-31 Thread Iain Buclaw via Gcc-patches
Hi, The target files tilegx/mul-tables.c and tilepri/mul-tables.c were updated in SVN r255743, but the generator file that produces them wasn't, so it was reverting this change during builds. Only tested by running make all-gcc for all tile*-*-* targets present in config-list.mk. OK? Regards

[PATCH 2/6] contrib: Remove arm-wrs-vxworks from config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
Support for arm-wrs-vxworks was removed in git 27204060db5/r10-4684. Looking at the commit, it seems that it can instead be replaced with arm-wrs-vxworks7, however this target doesn't pass selftests due to an unrecognized CPU (PR 95420). Nor does the previous default CPU work either

[PATCH 3/6] contrib: Add pru-elf to config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
Support for the TI PRU target was added in SVN r272202. Judging from the testsuite results posted at the time[1], the only supported target is pru-elf. OK? Regards Iain. [1]: http://dinux.eu/gnupru/testresults/index.html --- contrib/ChangeLog: * config-list.mk (LIST): Add pru-elf.

[PATCH 6/6] contrib: Add OPT-enable-obsolete to tile*-*-*

2020-05-31 Thread Iain Buclaw via Gcc-patches
The tile*-*-* targets were marked as obsolete in SVN r259724. OK? Regards Iain --- contrib/ChangeLog: * config-list.mk (LIST): Add OPT-enable-obsolete to tilegx-linux-gnu, tilegxbe-linux-gnu, and tilepro-linux-gnu. --- contrib/config-list.mk | 3 ++- 1 file changed, 2

Re: [PATCH 4/6] contrib: Add or1k-elf, or1k-linux-*, and or1k-rtems to config-list.mk

2020-05-31 Thread Iain Buclaw via Gcc-patches
On 31/05/2020 22:53, Stafford Horne wrote: > On Sun, May 31, 2020 at 12:19:16PM +0200, Iain Buclaw wrote: >> Support for OpenRISC target was added in SVN r265963. >> >> The target configurations were taken from the list of supported >> toolchains[1], so seems sensible to

[PATCH] Fix unrecognised -mcpu target: armv7-a on arm-wrs-vxworks7 (PR95420)

2020-05-31 Thread Iain Buclaw via Gcc-patches
Hi, In the removal of arm-wrs-vxworks, the default cpu was updated from arm8 to armv7-a, but this is not recognized as a valid -mcpu target. There is however generic-armv7-a, which was likely the intended cpu that should have been used instead. Tested by building a cross-compiler targetting

[committed] d: Fix segfault in build_frontend_type on alpha-*-*

2020-06-02 Thread Iain Buclaw via Gcc-patches
Hi, The va_list type for Alpha includes a nameless dummy field for alignment purposes. To transpose this into D, a field named "__pad%d" is inserted into the struct definition. It was also noticed that in the D front-end AST copy of the backend type, all offsets for fields generated by

Re: [PATCH] Fix unrecognised -mcpu target: armv7-a on arm-wrs-vxworks7 (PR95420)

2020-06-02 Thread Iain Buclaw via Gcc-patches
On 01/06/2020 19:00, Olivier Hainque wrote: > Hello Iain, > >> On 01 Jun 2020, at 00:40, Iain Buclaw wrote: >> >> Hi, >> >> In the removal of arm-wrs-vxworks, the default cpu was updated from arm8 >> to armv7-a, but this is not recognized as a valid

[PATCH] contrib: Add gdc.test to list of ignored prefixes

2020-06-02 Thread Iain Buclaw via Gcc-patches
The files in this subdirectory are part of the D2 test suite maintained in the upstream DMD code repository. OK? contrib/ChangeLog: * gcc-changelog/git_commit.py (ignored_prefixes): Add gcc/testsuite/gdc.test/. --- contrib/gcc-changelog/git_commit.py | 1 + 1 file changed, 1

[committed] d: Set up input_location before lowering Dsymbol AST

2020-06-02 Thread Iain Buclaw via Gcc-patches
Hi, Like a similarly named function in the visitor class for statements, this ensures that the current input_location is set to the correct source file location of the decl. It is likely that there are a number of cases where declarations have ended up with no location without this.

[committed] d: Merge upstream dmd 0fcdaab32

2020-10-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 0fcdaab32, fixing a bug where there was undefined template references when compiling upstream dmd mainline. In `TemplateInstance::semantic`, there exists special handling of matching template instances for the same template

[committed] d: Remove the d_critsec_size target hook.

2020-10-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the d_critsec_size target hook from the D front-end and all related target support code. Its replacement is implemented in the merge of upstream dmd bec5973b0 and druntime 58560d51. The allocation of mutex objects for synchronized statements has been moved to the library

[committed] d: Fix ICE using non-local variable: internal compiler error: Segmentation fault

2020-08-03 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves no frame access error to own function, adding use of it for both when get_framedecl() cannot find a path to the outer function frame, and guarding get_decl_tree() from recursively calling itself. Bootstrapped and regression tested on x86_64-linux-gnu with multilib

[committed] d: Fix PR96429: Pointer subtraction uses TRUNC_DIV_EXPR

2020-08-04 Thread Iain Buclaw via Gcc-patches
Hi, This patch detects the pattern for pointer substraction in the front-end AST and uses EXACT_DIV_EXPR rather than TRUNC_DIV_EXPR. Bootstrapped and regression tested on x86_64-linux-gnu with multilib configurations -m32/-mx32. Committed to mainline. Regards Iain --- gcc/d/ChangeLog:

[PATCH] PR target/96347: non-delegitimized UNSPEC UNSPEC_TP (19) found in variable location

2020-08-07 Thread Iain Buclaw via Gcc-patches
Hi, On x86, a memory reference reference to a TLS address can be broken out and stored in a register, for instance: movq%fs:8+testYearsBC@tpoff, %rdx Subsequently becomes: pushq %rbp leaq8+testYearsBC@tpoff, %rbp // later... movq%fs:0(%rbp),

[PATCH] libiberty: Add support for 'in' and 'in ref' storage classes.

2020-08-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds support for 'in' as a first-class storage class with its own mangle symbol, of which also permits 'in ref'. Previously, 'in' was an alias to 'const [scope]', which is a type constructor. The mangle symbol repurposed for this is 'I', which was originally used by identifier

[committed] d: Refactor matching and lowering of intrinsic functions.

2020-07-30 Thread Iain Buclaw via Gcc-patches
Hi, This patch cleans up D intrinsic handling in the front-end. Intrinsics are now matched explicitly, rather than through a common alias where there are multiple overrides for a common intrinsic. Where there is a corresponding DECL_FUNCTION_CODE, that is now stored in the D intrinsic array.

<    1   2   3   4   5   6   7   8   9   10   >