Re: [PATCH] match.pd: Add ~(X - Y) -> ~X + Y simplification [PR96685]

2021-01-09 Thread Maciej W. Rozycki
On Mon, 21 Dec 2020, Jakub Jelinek wrote: > > > This patch adds the ~(X - Y) -> ~X + Y simplification requested > > > in the PR (plus also ~(X + C) -> ~X + (-C) for constants C that can > > > be safely negated. > > > > This regresses VAX code produced by the cmpelim-eq-notsi.c test case (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: 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

[PATCH] c++: Fix ICE with CTAD in concept [PR98611]

2021-01-09 Thread Patrick Palka via Gcc-patches
This patch teaches find_template_parameters to visit the template represented by a CTAD placeholder, which is normally not visited by for_each_template_parm. This template may be a template template parameter (as in the first testcase), or it may implicitly use the template parameters of an enclos

Re: [patch] fix -Wformat-diag warnings in rs6000-call.c

2021-01-09 Thread Jakub Jelinek via Gcc-patches
On Sat, Jan 09, 2021 at 07:44:31PM +0100, Matthias Klose wrote: > These warnings, including the suggested fixes are seen on power*-linux builds. > > warning: misspelled term 'builtin function' in format; use 'bult-in function' Are you sure it printed bult-in ? > fatal_error (input_location,

Re: make FOR_EACH_IMM_USE_STMT safe for early exits

2021-01-09 Thread Alexandre Oliva
On Jan 7, 2021, Richard Biener wrote: > On Wed, Jan 6, 2021 at 12:34 PM Alexandre Oliva wrote: >> >> On Jan 4, 2021, Richard Biener wrote: >> >> > Thus, please remove uses of BREAK_FROM_IMM_USE_STMT >> > together with this patch. >> >> And RETURN_FROM_IMM_USE_STMT, I suppose? > Sure. Don

--enable-link-serialization=1 doesn't work

2021-01-09 Thread Matthias Klose
The attached patch makes the link targets a little bit more verbose. Ok to commit? It shows that --enable-link-serialization=1 doesn't work: $ grep ^Linking ../log Linking gnat1 |==-- | 9% Linking cc1 |--| 0% Linking cc1 |==| 9% Linking gn

Re: [PATCH v3] libgcc: Thumb-1 Floating-Point Library for Cortex M0

2021-01-09 Thread Daniel Engel
On Sat, Jan 9, 2021, at 5:09 AM, Christophe Lyon wrote: > On Sat, 9 Jan 2021 at 13:27, Daniel Engel wrote: > > > > -- snip -- > > > > To reiterate what I said above, I intend to push forward and incorporate > > your current recommendations plus any further feedback I may get. I > > expect you to

[patch] fix -Wformat-diag warnings in rs6000-call.c

2021-01-09 Thread Matthias Klose
These warnings, including the suggested fixes are seen on power*-linux builds. warning: misspelled term 'builtin function' in format; use 'bult-in function' instead [-Wformat-diag] warning: spurious trailing punctuation sequence '].' in format [-Wformat-diag] warning: misspelled term 'floating p

Re: [PATCH v3] libgcc: Thumb-1 Floating-Point Library for Cortex M0

2021-01-09 Thread Daniel Engel
On Sat, Jan 9, 2021, at 5:09 AM, Christophe Lyon wrote: > On Sat, 9 Jan 2021 at 13:27, Daniel Engel wrote: > > > > On Thu, Jan 7, 2021, at 4:56 AM, Richard Earnshaw wrote: > > > On 07/01/2021 00:59, Daniel Engel wrote: > > > > --snip-- > > > > > > > > On Wed, Jan 6, 2021, at 9:05 AM, Richard Earns

Support the PGO build for binutils+gdb (2.36 Branch imminent)

2021-01-09 Thread H.J. Lu via Gcc-patches
On Thu, Jan 7, 2021 at 4:10 AM Nick Clifton wrote: > > Hi H.J. > > > I got no feedbacks for my current patch set: > > https://sourceware.org/pipermail/gdb-patches/2020-December/174216.html > > Right - in which case I would like to do this: > >1. Do not apply the patch now. But when the 2.36 b

[PATCH] doc: Fix typos in C++ Modules documentation

2021-01-09 Thread Jonathan Wakely via Gcc-patches
gcc/ChangeLog: * doc/invoke.texi (C++ Modules): Fix typos. I plan to commit this as obvious. The s/it/they/ change is because the previous sentence says "Modules are" so we should consistently refer to them as plural, not singular. commit 142b67a620e343c62524c170682f4b50980ee0a0 Author

Re: [PATCH v3] libgcc: Thumb-1 Floating-Point Library for Cortex M0

2021-01-09 Thread Christophe Lyon via Gcc-patches
On Sat, 9 Jan 2021 at 13:27, Daniel Engel wrote: > > On Thu, Jan 7, 2021, at 4:56 AM, Richard Earnshaw wrote: > > On 07/01/2021 00:59, Daniel Engel wrote: > > > --snip-- > > > > > > On Wed, Jan 6, 2021, at 9:05 AM, Richard Earnshaw wrote: > > > > > >> > > >> Thanks for working on this, Daniel. > >

Re: [PATCH v3] libgcc: Thumb-1 Floating-Point Library for Cortex M0

2021-01-09 Thread Daniel Engel
On Thu, Jan 7, 2021, at 4:56 AM, Richard Earnshaw wrote: > On 07/01/2021 00:59, Daniel Engel wrote: > > --snip-- > > > > On Wed, Jan 6, 2021, at 9:05 AM, Richard Earnshaw wrote: > > > >> > >> Thanks for working on this, Daniel. > >> > >> This is clearly stage1 material, so we've got time for a co

[PATCH] widening_mul: Pattern recognize also signed multiplication with overflow check [PR95852]

2021-01-09 Thread Jakub Jelinek via Gcc-patches
Hi! On top of the previous widening_mul patch, this one recognizes also (non-perfect) signed multiplication with overflow, like: int f5 (int x, int y, int *res) { *res = (unsigned) x * y; return x && (*res / x) != y; } The problem with such checks is that they invoke UB if x is -1 and y is INT

Re: [PATCH] vregs: Fix up instantiate_virtual_regs_in_insn for asm goto with outputs [PR98603]

2021-01-09 Thread Richard Biener
On January 9, 2021 10:22:22 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >If an asm insn fails constraint checking during vregs, it is just >deleted. >We don't delete asm goto though because of the edges to the labels, so >instantiate_virtual_regs_in_insn would just remove the inputs and their >cons

Re: [PATCH] tree-cfg: Allow enum types as result of POINTER_DIFF_EXPR [PR98556]

2021-01-09 Thread Richard Biener
On January 9, 2021 10:32:52 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As conversions between signed integers and signed enums with the same >precision are useless in GIMPLE, it seems strange that we require that >POINTER_DIFF_EXPR result must be INTEGER_TYPE. > >If we really wanted to require th

[PATCH] tree-cfg: Allow enum types as result of POINTER_DIFF_EXPR [PR98556]

2021-01-09 Thread Jakub Jelinek via Gcc-patches
Hi! As conversions between signed integers and signed enums with the same precision are useless in GIMPLE, it seems strange that we require that POINTER_DIFF_EXPR result must be INTEGER_TYPE. If we really wanted to require that, we'd need to change the gimplifier to ensure that, which it isn't th

[PATCH] vregs: Fix up instantiate_virtual_regs_in_insn for asm goto with outputs [PR98603]

2021-01-09 Thread Jakub Jelinek via Gcc-patches
Hi! If an asm insn fails constraint checking during vregs, it is just deleted. We don't delete asm goto though because of the edges to the labels, so instantiate_virtual_regs_in_insn would just remove the inputs and their constraints, the pattern etc. This worked fine when asm goto couldn't have o

[PATCH] widening_mul: Pattern recognize unsigned multiplication with overflow check [PR95852]

2021-01-09 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch pattern recognizes some forms of multiplication followed by overflow check through division by one of the operands compared to the other one, with optional removal of guarding non-zero check for that operand if possible. The patterns are replaced with effectively __builtin