[committed] d: Merge upstream dmd 48d704f08

2020-06-04 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 47ed0330f. Updates the Array interface in dmd/root/array to use a DArray internally. Splits out BitArray into a separate header. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iai

[committed] d: Merge upstream dmd 6d5bffa54

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 6d5bffa54. Removes an unused parameter from Condition::include(), all callers have been updated in the front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/Chang

[committed] d: Merge upstream dmd 56f0a65c4.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 56f0a65c4. Updates the Target interface, removing static from all members, so all field accesses and member function calls go through a a single global 'target'. Information relating to extern ABI are now in TargetC, TargetCP

[committed] d: Fix ICE in gimplify_expr, at gimplify.c (PR98277)

2020-12-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE during gimplify_expr for code generated by the D front-end. The DMD front-end shouldn't, but can sometimes leak manifest constants in the AST passed to the code generator. To prevent this being an issue, the setting of DECL_INITIAL has been moved to the point where th

[PATCH] d: Fix ICE in in force_decl_die, at dwarf2out.c with -gdwarf-2 -gstrict-dwarf [PR98067]

2020-12-15 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in dwarf2out.c that occurs when compiling a selective import declaration in D with strict dwarf2 in effect. Manifest constants in D are represented as CONST_DECLs, which can be imported from one module to another. However, when compiling on strict dwarf2 targets such

[committed] d: Force TYPE_MODE of classes and non-POD structs as BLKmode (PR98427)

2020-12-23 Thread Iain Buclaw via Gcc-patches
Hi, This patch forces the TYPE_MODE of non-POD types as BLKmode. Without this being forced, the optimizer could still make decisions that require objects of the non-POD types to need a temporary, which would result in an ICE during the expand to RTL passes. Bootstrapped and regression tested on

[committed] d: Give the result of evaluated expressions a location

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, CST trees that were converted back to a D front-end AST node lost all location information of the original expression. With this patch, now this is propagated on to the literal expression. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. ---

[committed] d: Simplify quoting characters in deps_add_target

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, The implementation of deps_add_target in d-lang.cc was based on what was present in libcpp. This patch synchronizes the escaping logic to match the current version. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards Iain --- gcc/d/ChangeLog: * d

[committed] d: Mangled Symbols now back reference types and identifiers

2020-12-30 Thread Iain Buclaw via Gcc-patches
Hi, With this patch, symbols with `extern(D)` linkage are now mangled using back references to types and identifiers if these occur more than once in the mangled name as emitted before. This reduces symbol length, especially with chained expressions of templated functions with Voldemort return ty

[committed] d: Merge upstream dmd a5c86f5b9

2021-01-05 Thread Iain Buclaw via Gcc-patches
This patch merges the D front-end implementation with upstream dmd a5c86f5b9, adding the following new `__traits' to the D language. - isDeprecated: used to detect if a function is deprecated. - isDisabled: used to detect if a function is marked with @disable. - isFuture: used to detect if a

[PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler

2021-01-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the disabling of libphobos when the Solaris/x86 assembler is being used. Since r11-6373, D symbols are now compressed using back references, this helped reduce the average symbol length by a factor of about 3, while the longest symbol shrank from 416133 to 1142 characters.

Re: [PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler

2021-01-07 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of January 6, 2021 2:57 pm: > Hi Iain, > >>> This patch removes the disabling of libphobos when the Solaris/x86 >>> assembler is being used. >>> >>> Since r11-6373, D symbols are now compressed using back references, this >>> helped reduce the average symbol len

[committed] d: Merge upstream dmd 9038e64c5.

2021-01-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds support for using user-defined attributes on function arguments and single-parameter alias declarations. These attributes behave analogous to existing UDAs. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards Iain. --- gcc/

Re: [PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler

2021-01-07 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of January 7, 2021 5:17 pm: > Hi Iain, > >>> The Solaris assemblers don't support UTF-8 identifiers. Unless gdc can >>> encode them in some way for toolchains like this (no idea if this is >>> worth the effort), it may be possible to guard the tests with the uc

[committed] d: Implement expression-based contract syntax

2021-01-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd e598f69c0, adding support for an expression-based contract syntax. Contracts that consist of a single assertion can now be written more succinctly and multiple `in` or `out` contracts can be specified for the same function. Bootstrapped and

[committed] d: Support deprecated, @disable, and user-defined attributes on enum members

2021-01-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd 9bba772fa, adding support for `deprecated`, `@disable` and user-defined attributes to be applied to enum members. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards Iain. --- gcc/d/ChangeL

[committed] d: Remove visibility and lookup deprecation

2021-01-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 2d3d13748, removing the visibility and lookup deprecation. The deprecation phase for access checks is finished. The `-ftransition=import` and `-ftransition=checkimports` switches no longer have an effect and are now removed.

Re: [committed] d: Support deprecated, @disable, and user-defined attributes on enum members

2021-01-11 Thread Iain Buclaw via Gcc-patches
Excerpts from Andreas Schwab's message of January 10, 2021 9:08 am: > ../../gcc/d/dmd/parse.c: In member function 'Dsymbols* > Parser::parseDeclDefs(int, Dsymbol**, PrefixAttributes*)': > ../../gcc/d/dmd/parse.c:647:29: error: unused variable 'e' > [-Werror=unused-variable] > 647 |

Re: [PATCH] libphobos: Allow building libphobos using Solaris/x86 assembler

2021-01-11 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of January 7, 2021 6:48 pm: > Excerpts from Rainer Orth's message of January 7, 2021 5:17 pm: >> Hi Iain, >> The Solaris assemblers don't support UTF-8 identifiers. Unless gdc can encode them in some way for toolchains like this (no idea if this is >>

[committed] d: Merge upstream dmd f5638c7b8.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd f5638c7b8. Adds a CHECKENABLE enum, uses it for all contract parameters for consistency in state checking. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog:

[committed] d: Merge upstream dmd 740f3d1ea.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 740f3d1ea. Backports the conversion of the parameter fields debugids and versionids to Identifiers. The idea is that Identifiers should be used instead of C strings where ever possible. Bootstrapped and regression tested on

[committed] d: Merge upstream dmd cef1e7991.

2020-06-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd cef1e7991. Adds a DString type, a struct that has a compatible layout with D strings. Many parameters in the Global struct have been switched over to this type, and users of these params have been adjust to use the length or

[committed] d: Merge upstream dmd 1831b24ff.

2020-06-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 1831b24ff. Converts some global and param fields from pointers to value types. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog: * dmd/MERGE: Merge

[committed] d: Merge upstream dmd b0df0e982

2020-06-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd b0df0e982. Adds a struct ParameterList to encapulate parameter and vararg information in the front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog:

[committed] d: Merge upstream dmd 108ca1bcd.

2020-06-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd b0df0e982. Renames OutBuffer::peekString to OutBuffer::peekChars, and OutBuffer::extractString to OutBuffer::extractChars. All callers have been updated as appropriate. Bootstrapped and regression tested on x86_64-linux-gnu,

[committed] d: Merge upstream dmd 73d8e2fec.

2020-06-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 73d8e2fec. Renames the enum PROTKIND to Prot::Kind, updates all uses of the original enum accordingly. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog:

[committed] d: Merge upstream dmd 955b8b36f.

2020-06-08 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 955b8b36f. Merges AndAndExp and OrOrExp into a LogicalExp AST node. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd

[committed] d: Fix regression caused by recent refactoring (PR95573)

2020-06-08 Thread Iain Buclaw via Gcc-patches
Hi, This parch merges the D front-end implementation with upstream dmd 5041e56f1. Fixing a small regression made by one of the refactorings. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog: PR d/95573 * dmd/MERG

[committed] d: Merge upstream dmd 13d67c575.

2020-06-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 13d67c575. Contains many small API changes, most contained within the front-end, but some spill out into the codegen. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/C

[committed][GCC10/11] testsuite: Re-add gdc.test prefix in test names (PR testsuite/95575)

2020-06-14 Thread Iain Buclaw via Gcc-patches
Hi, When moving the gdc-test.exp test script into multiple test scripts (c76df72f1a9), this subdir handling got removed. This patch re-adds that, adjusted to handle the new $subdir path. Regression tested on x86_64-linux-gnu, committed to mainline, and backported to releases/gcc-10. Regards Iai

[committed] d: Fix line lengths after mechanical field renames.

2020-06-14 Thread Iain Buclaw via Gcc-patches
Hi, This patch adjusts a few overflowed lines after the recent refactorings done in the upstream front-end that caused renames of many fields - in this case, dim -> length. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog:

[committed] d: Move generation of array bounds error to own function.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves a couple code duplications into its own routine, the checkAction global parameter is now initialized and properly adjusted. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-codegen.cc (build_array_b

[committed] d: Use toTypeFunction instead of explicit cast

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to TypeFunction with toTypeFunction, which takes care of asserting that `ty' is a `Tfunction'. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-frontend.cc (eval_builtin): Use toT

[committed] d: Use toStringExp instead of explicit cast

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to StringExp with toStringExp. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (build_attributes): Use toStringExp instead of cast. * toir.cc (IRVisitor::visit

[committed] d: Use new isXxxxExp helpers where possible

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to Expression nodes with the newly introduced isXxxxExp functions. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (build_attributes): Use isXxxxExp helpers instead of

[committed] d: Remove names of unused function parameters.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces ARG_UNUSED and ATTRIBUTE_UNUSED with unnamed parameters. As the unused attribute was being used incorrectly. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (handle_noreturn_attribut

[committed] d: Consistently format quotations in comments.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates comments to consistently format quotations in code comments throughout the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-builtins.cc: Update quotation formatting of comments.

[committed] d: Remove dependency on front-end File type for json and deps file generation.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces some uses of File with FILE. Memory allocated by the DMD front-end is never freed due to the bump pointer allocator used internally. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-lang.cc (d_p

[committed] d: Remove dependency on front-end OutBuffer for diagnostic and deps file generation.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces some uses of OutBuffer with obstack. Memory allocated by the DMD front-end is never freed due to the bump pointer allocator used internally. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-diag

[committed] d: Update code formatting in a consistent style.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch is a mechanical update of various formatting to make it consistent throughout the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc: Update code formatting in a consistant style.

[committed] d: Use new isTypeXxxx helpers where possible.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to Type nodes with the newly introduced isTypeXxxx functions. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-builtins.cc (d_eval_constant_expression): Use isTypeXxxx helpers

[committed] d: Fix ICE in uda_attribute_p when looking up unknown attribute

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in uda_attribute_p when looking up an unknown attribute. The target attribute table is not guaranteed to be set by all backends. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: PR d/95173

[committed] d: Don't set DECL_INITIAL if initializer is 'void'.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a logic bug in the code-gen for variable declarations. Declarations initialized with `= void` were being default initialized. That is not really the intent, and misses the small optimization that should have been gained from using void initializations. Bootstrapped and regre

[committed] d: Merge upstream dmd 4be011355.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 4be011355. Fixes self-assignment warnings seen when compiling with clang. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: PR d/95075 * d

[committed] d: Do not implicitly set DECL_DECLARED_INLINE_P on member functions.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes the implicit setting of DECL_DECLARATED_INLINE_P on member function. This has been questionable behaviour since it was added, and though it has no effect on wider discussions around what should be the correct semantics of pragma(inline) within D modules, doing this tree-lev

[committed] d: Merge upstream dmd 5fc1806cd.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 5fc1806cd. Backports the OutBuffer interface from upstream dmd master, removing another difference this and the self-hosted D branch that is purely refactoring, and doesn't introduce any mechanical changes. Bootstrapped and r

[committed] d: Merge upstream dmd 4f1046222.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 4f1046222. Renames OnScopeStatement to ScopeGuardStatement. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 4f10

[committed] d: Merge upstream dmd 90450f3ef.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 90450f3ef. Fixes a regression caused by an incomplete backport of converting the Expression semantic pass to a Visitor. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gc

[committed] d: Move d_signed_type and d_unsigned_type to types.cc

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves d_signed_type and d_unsigned_type to types.cc. These two functions are not tied to the language-specific part of the front-end in any way. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * d-lan

[committed] d: Turn on deprecation warnings by default.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch makes deprecation warnings the default in gdc, fixing both the library and any tests that are currently using deprecated styles. This is the default in the upstream reference compiler, and can reduce some confusion when comparing warning/error messages of gdc and dmd side by side.

[committed] d: Remove another dependency on the front-end OutBuffer type.

2020-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes another dependency on the front-end OutBuffer type. As the DMD front-end never frees allocated memory, the glue layer between the DMD front-end and GCC should generally avoid using DMD types and interfaces if the purpose is internal only. Bootstrapped and regression tested

Re: [committed] d: Fix ICE in uda_attribute_p when looking up unknown attribute

2020-06-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch has been backported, bootstrapped and regression tested on the releases/gcc-9 and releases/gcc-10 branches. Regards Iain. On 25/06/2020 17:38, Iain Buclaw wrote: > Hi, > > This patch fixes an ICE in uda_attribute_p when looking up an unknown > attribute. The targ

Re: [committed] d: Merge upstream dmd 90450f3ef.

2020-06-26 Thread Iain Buclaw via Gcc-patches
Hi, This patch has been backported, bootstrapped and regression tested on the releases/gcc-9 and releases/gcc-10 branches. Regards Iain. On 25/06/2020 17:41, Iain Buclaw wrote: > Hi, > > This patch merges the D front-end implementation with upstream dmd > 90450f3ef. Fixes a regre

[committed] d: Merge upstream dmd 8508c4e68.

2020-06-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 8508c4e68. Fixes a performance bug where 'static foreach' would take an exponentially long time to expand during CTFE. In the following example: static foreach (i; 0..3) {} Compilation time had been reduced from aro

[committed] libphobos: Merge upstream phobos 7948e0967.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the libphobos library with upstream phobos 7948e0967, removing all deprecated functions from std.string module. Regression tested and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 7948e0967. --- libphobos/src/ME

[PATCH] d: Fix a couple of ICEs found in the dmd front-end (PR97842)

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd b6a779e49, fixing two segmentation faults. One when encountering an incomplete static if, and another when resolving typeof() expressions whilst gagging is on. Bootstrapped and regression tested on x86_64-linux-gnu, committed

[PATCH] d: Fix LHS of array concatentation evaluated before the RHS.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, In an array append expression: array ~= fun(array); The array in the left hand side of the expression was extended before evaluating the result of the right hand side, which resulted in the newly uninitialized array index being used before set. This fixes that so that the result of the

[committed][GCC-10 backport] d: Explicitly determine which built-in copysign function to call.

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r11-4980 to GCC-10, as it fixes an ICE that could occur on some targets. Regression tested on x86_64-linux-gnu and committed to branch. Regards Iain --- gcc/d/ChangeLog: * intrinsics.cc (expand_intrinsic_copysign): Explicitly determine which built-in co

[committed][GCC-10 backport] d: Fix undefined template references with circular module imports

2020-11-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch backports r11-4424 to GCC-10, as it fixes a critical link-time error that occurred whilst bootstrapping the D implementation of the DMD front-end. Regression tested on x86_64-linux-gnu and committed to branch. Regards Iain --- gcc/d/ChangeLog: * dmd/dtemplate.c (Template

[committed] d: Fix OutOfMemoryError thrown when appending to an array with a side effect (PR97889)

2020-11-22 Thread Iain Buclaw via Gcc-patches
Hi, When appending a character to an array, the result of that concat assignment was not the new value of the array, similarly, when appending an array to another array, side effects were evaluated in reverse to the expected order of evaluation. As of this change, the address of the left-hand sid

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Iain Buclaw via Gcc-patches
Excerpts from H.J. Lu's message of November 27, 2020 8:28 pm: > On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose wrote: >> >> On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote: >> > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener wrote: >> >> >> >> OK. >> >> >> >> On Fri, 27 Nov 2020, H.J. Lu wrot

[committed] d: Add float and double overloads for all core.math intrinsics

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, For the math intrinsics: cos, fabs, ldexp, rint, rndtol, and sin, new overloads have been added to the core.math module for matching float and double types. These have been implemented in the compiler. A recent change to dump_function_to_file started triggering some scan-tree-dump tests to F

[committed] libphobos: Merge upstream phobos 38873fe6e.

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D standard library with upstream phobos 38873fe6e, adding support for FreeBSD/x86 53-bit precision reals, and removing all support code and tests for the extern(Pascal) calling convention. Bootstrapped and regression tested on x86_64-linux-gnu with -mx32/-m32, committed

[committed] libphobos: Merge upstream druntime d37ef985.

2020-11-27 Thread Iain Buclaw via Gcc-patches
eal80; +} else static if (T.mant_dig == 64) enum floatFormat = FloatFormat.Real80; else static if (T.mant_dig == 106) diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d new file mode 100644 index 000

[committed] d: Merge upstream dmd db0df3f7e.

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream DMD db0df3f7e, removing all support code and tests for the extern(Pascal) calling convention. Bootstrapped and regression tested on x86_64-linux-gnu with -mx32/-m32, committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * dmd/MERG

[committed] libphobos: Fix segfault at run-time when using custom Fibers (PR 98025)

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, When libphobos is configured with --enable-cet, this adds extra fields to the Fiber class to support the ucontext_t fallback implementation. These fields get omitted when compiling user code unless they also used `-fversion=CET' to build their project, which resulted in data being overwritten

[PATCH] d: Add freebsd support for D compiler and runtime

2020-11-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds the necessary version conditions and configure rules in place to allow building the D compiler on FreeBSD. Running the testsuite on both i386 and x86_64, all tests except for one passes (gdc.test/runnable/test17338.d, though the problem appears to be the linker producing a cor

[PATCH] configure: Support building D front-end on *-*-darwin*

2020-11-28 Thread Iain Buclaw via Gcc-patches
Hi, The bootstrap has been succeeding for some time now, there's no need to set it as an unsupported language. OK for mainline? Regards Iain. --- ChangeLog: PR d/87788 * configure.ac: Don't disable D for *-*-darwin*. * configure: Regenerate. --- configure| 3 --- c

[PATCH] d: Add darwin support for D language front-end

2020-11-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds necessary predefined version symbols and support for moduleinfo sections for darwin to allow testing libphobos support. OK for mainline? Regards Iain. --- gcc/ChangeLog: * config.gcc (*-*-darwin*): Set d_target_objs and target_has_targetdm. * config/elfos.h

[committed] d: Remove d_size_t from front-end sources (PR 87788)

2020-11-29 Thread Iain Buclaw via Gcc-patches
Hi, The typedef for d_size_t assumes that the implementation of the front-end is written in D itself, where size_t can map only to uint32_t or uint64_t. As that is not the case for the current D front-end, the typedef should be removed. This would fix the bootstrap on targets where in C++ size_t

Re: [committed] d: Remove d_size_t from front-end sources (PR 87788)

2020-11-29 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 29, 2020 1:54 pm: > Iain Buclaw via Gcc-patches wrote: >> >> The typedef for d_size_t assumes that the implementation of the >> front-end is written in D itself, where size_t can map only to uint32_t >> or uint64_t.

Re: [PATCH] configure: Support building D front-end on *-*-darwin*

2020-11-29 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 29, 2020 10:35 am: > Hi Iain > > Iain Buclaw wrote: > >> The bootstrap has been succeeding for some time now, there's no need to >> set it as an unsupported language. >> >> OK for mainline? > >

Re: [PATCH] configure: Support building D front-end on *-*-darwin*

2020-11-29 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 29, 2020 10:35 am: > Hi Iain > > Iain Buclaw wrote: > >> The bootstrap has been succeeding for some time now, there's no need to >> set it as an unsupported language. >> >> OK for mainline? > >

Re: [PATCH] d: Add darwin support for D language front-end

2020-11-29 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 29, 2020 1:49 pm: > Hi Iain > > Iain Buclaw wrote: > >> This patch adds necessary predefined version symbols and support for >> moduleinfo sections for darwin to allow testing libphobos support. >> >> OK fo

Re: [PATCH] d: Add freebsd support for D compiler and runtime

2020-11-30 Thread Iain Buclaw via Gcc-patches
Excerpts from Jeff Law's message of November 30, 2020 2:16 am: > > > On 11/28/20 9:04 AM, Iain Buclaw via Gcc-patches wrote: >> Hi, >> >> This patch adds the necessary version conditions and configure rules in >> place to allow building the D compiler on F

Re: [pushed] c++: Implement C++20 'using enum'. [PR91367]

2020-11-30 Thread Iain Buclaw via Gcc-patches
Excerpts from Jason Merrill via Gcc-patches's message of November 13, 2020 7:35 pm: > > The changes to dwarf2out revealed an existing issue with the D front-end: we > were doing the wrong thing for importing a D CONST_DECL, because > dwarf2out_imported_module_or_decl_1 was looking through it to i

Re: [PATCH] d: Add darwin support for D language front-end

2020-12-07 Thread Iain Buclaw via Gcc-patches
gt; You can reach the person managing the list at >> gcc-patches-ow...@gcc.gnu.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Gcc-patches digest..." >> Today's Topics: >> >>1.

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

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

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

[PATCH] d: Add dragonflybsd support for D compiler and runtime

2020-10-29 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds the necessary version conditions and configure rules in place to allow building the D compiler on DragonFlyBSD. Running the testsuite, all core tests pass, with a couple failures relating to CTFE math support which are not blocking the library from being usable, and will be fi

[committed] d: Add support for vector comparison operators

2022-11-05 Thread Iain Buclaw via Gcc-patches
Hi, The front-end added semantic support to permit comparing two vector expressions. This removes the restriction in the code generator, as well as the intrisics that previously exposed the same operation. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline.

[committed] d: Adjust attr_register2.d to pass when compiling with -m32

2022-11-05 Thread Iain Buclaw via Gcc-patches
Hi, Noticed when running on x86_64-linux-gnu with `-m32', this test triggered a different kind of error. Adjusted the test to use a different register that is common between x86 and x86_64. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain.

Re: [PATCH] IBM zSystems: Fix TARGET_D_CPU_VERSIONS

2023-01-23 Thread Iain Buclaw via Gcc-patches
Excerpts from Stefan Schulze Frielinghaus via Gcc-patches's message of Januar 13, 2023 6:54 pm: > In the context of D the interpretation of S390, S390X, and SystemZ is a > bit fuzzy. The wording S390X was wrongly deprecated in favour of > SystemZ by commit > https://github.com/dlang/dlang.org/com

Re: Ping^3: [PATCH] d: Update __FreeBSD_version values [PR107469]

2023-01-23 Thread Iain Buclaw via Gcc-patches
Excerpts from Lorenzo Salvadore's message of Januar 10, 2023 5:10 pm: > Hello, > > Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html > > I would like to remind that Gerald Pfeifer already volunteered to commit this > patch > when it is approved. However the patch has not b

Re: [PATCH v2] IBM zSystems: Fix TARGET_D_CPU_VERSIONS

2023-01-24 Thread Iain Buclaw via Gcc-patches
Excerpts from Stefan Schulze Frielinghaus's message of Januar 24, 2023 9:47 am: > In the context of D the interpretation of S390, S390X, and SystemZ is a > bit fuzzy. The wording S390X was wrongly deprecated in favour of > SystemZ by commit > https://github.com/dlang/dlang.org/commit/3b50a4c3faf01

Re: [PATCH 3/7] **/*.texi: Reorder index entries

2023-01-27 Thread Iain Buclaw via Gcc-patches
Excerpts from Arsen Arsenović via Gcc-patches's message of Januar 27, 2023 1:18 am: > > gcc/d/ChangeLog: > > * implement-d.texi: Reorder index entries around @items. > > --- > gcc/d/implement-d.texi | 66 ++--- > > diff --git a/gcc/d/implement-d.texi b/gcc/d/implement-d.texi >

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

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

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

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

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

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

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

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

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

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

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

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

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

[committed] d: Set TYPE_ARTIFICIAL on internal TypeInfo types

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

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

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

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

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

<    5   6   7   8   9   10   11   >