Re: [PATCH] i386: Define __ILP32__ and _ILP32 for all 32-bit targets

2020-05-07 Thread Uros Bizjak via Gcc-patches
On Fri, May 8, 2020 at 12:58 AM Gerald Pfeifer wrote: > > A user reported that gcc -m32 on x86-64 does not define __ILP32__ > and I found the same on i686 (with gcc -x c -dM -E /dev/null). > > The code has > > if (TARGET_X32) > { > cpp_define (parse_in, "_ILP32"); >

[PATCH PR94991] aarch64: ICE: Segmentation fault with option -mgeneral-regs-only

2020-05-07 Thread Yangfei (Felix)
Hi, Witnessed another ICE with option -mgeneral-regs-only. I have created a bug for that: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94991 For the given testcase, we are doing FAIL for scalar floating move expand pattern since TARGET_FLOAT is false with option -mgeneral-regs-only.

[PATCH] rs6000: Add vgnb

2020-05-07 Thread Bill Schmidt via Gcc-patches
From: Kelvin Nilsen Add support for the vgnb instruction, which gathers every Nth bit per vector element. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this okay for master? Thanks, Bill [gcc] 2020-05-07 Kelvin Nilsen Bill Schmidt

[PATCH] rs6000: Add pdep/pext

2020-05-07 Thread Bill Schmidt via Gcc-patches
From: Kelvin Nilsen Add support for the vpdepd and vpextd instructions which perform vector parallel bit deposit and vector parallel bit extract. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this okay for master? Thanks, Bill 2020-05-07 Kelvin Nilsen

[PATCH] rs6000: Add vector count under mask

2020-05-07 Thread Bill Schmidt via Gcc-patches
From: Kelvin Nilsen Add support for new vclzdm and vctzdm vector instructions that count leading and trailing zeros under control of a mask. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this okay for master? Thanks, Bill [gcc] 2020-05-07 Kelvin Nilsen

[PATCH] rs6000: powerpc_future_ok and powerpc_future_hw

2020-05-07 Thread Bill Schmidt via Gcc-patches
From: Kelvin Nilsen Dejagnu targets for these. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this okay for master? Patch shepherded by Bill Schmidt on behalf of Kelvin Nilsen. Thanks! Bill 2020-03-04 Kelvin Nilsen *

Re: [C++ Patch] PR 90915 [9/10 Regression] ICE in has_attribute, at c-family/c-attribs.c:4221

2020-05-07 Thread Marek Polacek via Gcc-patches
On Thu, May 07, 2020 at 06:09:30PM -0600, Martin Sebor wrote: > On 5/7/20 5:03 PM, Marek Polacek via Gcc-patches wrote: > > On Wed, Jan 29, 2020 at 10:06:51PM +0100, Paolo Carlini wrote: > > > Hi, > > > > > > On 29/01/20 19:00, Jason Merrill wrote: > > > > On 1/29/20 4:31 AM, Paolo Carlini wrote:

Re: [C++ Patch] PR 90915 [9/10 Regression] ICE in has_attribute, at c-family/c-attribs.c:4221

2020-05-07 Thread Martin Sebor via Gcc-patches
On 5/7/20 5:03 PM, Marek Polacek via Gcc-patches wrote: On Wed, Jan 29, 2020 at 10:06:51PM +0100, Paolo Carlini wrote: Hi, On 29/01/20 19:00, Jason Merrill wrote: On 1/29/20 4:31 AM, Paolo Carlini wrote: Hi, in this regression we issue a diagnostic about an incomplete type (only a warning

Re: [C++ Patch] PR 90915 [9/10 Regression] ICE in has_attribute, at c-family/c-attribs.c:4221

2020-05-07 Thread Marek Polacek via Gcc-patches
On Wed, Jan 29, 2020 at 10:06:51PM +0100, Paolo Carlini wrote: > Hi, > > On 29/01/20 19:00, Jason Merrill wrote: > > On 1/29/20 4:31 AM, Paolo Carlini wrote: > > > Hi, > > > > > > in this regression we issue a diagnostic about an incomplete type > > > (only a warning by default) and then we

[PATCH] i386: Define __ILP32__ and _ILP32 for all 32-bit targets

2020-05-07 Thread Gerald Pfeifer
A user reported that gcc -m32 on x86-64 does not define __ILP32__ and I found the same on i686 (with gcc -x c -dM -E /dev/null). The code has if (TARGET_X32) { cpp_define (parse_in, "_ILP32"); cpp_define (parse_in, "__ILP32__"); } so -mx32 does define

[committed] Simplifications in H8 patterns, use md include facilities a bit

2020-05-07 Thread Jeff Law via Gcc-patches
This has a few pattern cleanups that are made possible now that the original H8/300 support is gone. It also moves all the peepholes into their own file. That's a trend that will continue with follow-up patches. Doing that allows me to disable large chunks of code during the conversion with

[committed] Remove original H8/300 support

2020-05-07 Thread Jeff Law via Gcc-patches
OK. So a more substantial patch this time. The original 8 bit H8/300 part is horrifically old. They probably haven't been made in 20 years or longer. While the tester builds multilibs for that part, we don't test them. Dropping support for the original H8/300 part ultimately allows for some

[committed] Dropping more COFF support

2020-05-07 Thread Jeff Law via Gcc-patches
I keep finding these tidbits... In the case of these two macros, they are always provided by elf.h and/or linux.h. Committing to the trunk. Jeff commit b9cb3bb9ad0dd1bc780a857b96e7bd9c82ba58e6 Author: Jeff Law Date: Thu May 7 17:25:30 2020 -0400 Drop more COFF support from H8 port

[committed] Drop remnants of H8/300 COFF support

2020-05-07 Thread Jeff Law via Gcc-patches
We dropped support for COFF from the H8 port over 10 years ago. These tidbits were missed. Committing to the trunk, Jeff commit 7764bebb9f772337bcb065aa290ca355083e31ce Author: Jeff Law Date: Thu Apr 23 13:10:48 2020 -0600 Drop remnants of COFF support diff --git

Re: [PATCH] Improve std::fill for vector

2020-05-07 Thread Jonathan Wakely via Gcc-patches
On 06/05/20 20:35 +0100, Jonathan Wakely wrote: On 06/05/20 20:46 +0200, François Dumont via Libstdc++ wrote: Hi I am not clear about current stage so I am proposing this trivial patch to find out if we are back in stage 1. The current status is always shown on the front page of gcc.gnu.org

[committed] libstdc++: Fix some C++20 algorithms to work in parallel mode

2020-05-07 Thread Jonathan Wakely via Gcc-patches
Some new algorithms need to use _GLIBCXX_STD_A to refer to the "normal" version of the algorithm, to workaround the namespace dance done for parallel mode. PR libstdc++/94971 (partial) * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify std::sample using macro to

Re: [PATCH 4/4] Use const for template argument.

2020-05-07 Thread Jonathan Wakely via Gcc-patches
On 06/05/20 11:01 +0100, Jonathan Wakely wrote: On 04/02/20 14:55 +0100, Martin Liska wrote: diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h index 983c7b2bd9a..97a9ce0feb7 100644 --- a/libstdc++-v3/include/parallel/multiway_merge.h

Re: [PATCH] c++: Fix spelling of non-static

2020-05-07 Thread Martin Sebor via Gcc-patches
On 5/7/20 12:44 PM, Marek Polacek wrote: On Thu, May 07, 2020 at 12:34:44PM -0600, Martin Sebor wrote: On 5/7/20 11:24 AM, Marek Polacek wrote: On Thu, Mar 19, 2020 at 12:51:42PM -0400, Marek Polacek via Gcc-patches wrote: On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches

Re: [PATCH] c++: Fix spelling of non-static

2020-05-07 Thread Marek Polacek via Gcc-patches
On Thu, May 07, 2020 at 12:34:44PM -0600, Martin Sebor wrote: > On 5/7/20 11:24 AM, Marek Polacek wrote: > > On Thu, Mar 19, 2020 at 12:51:42PM -0400, Marek Polacek via Gcc-patches > > wrote: > > > On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches > > > wrote: > > > > On

Re: [PATCH] c++: Fix spelling of non-static

2020-05-07 Thread Martin Sebor via Gcc-patches
On 5/7/20 11:24 AM, Marek Polacek wrote: On Thu, Mar 19, 2020 at 12:51:42PM -0400, Marek Polacek via Gcc-patches wrote: On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches wrote: On 3/19/20 9:48 AM, Marek Polacek via Gcc-patches wrote: I was looking at DR 296 and noticed

Re: [PATCH] tree-optimization/57359 - rewrite SM code

2020-05-07 Thread H.J. Lu via Gcc-patches
On Wed, May 6, 2020 at 6:26 AM Richard Biener wrote: > > On Tue, 5 May 2020, Richard Biener wrote: > > > > > This rewrites store-motion to process candidates where we can > > ensure order preserving separately and with no need to disambiguate > > against all stores. Those candidates we cannot

Re: set_rtx_cost used wrongly, should be set_src_cost

2020-05-07 Thread Jeff Law via Gcc-patches
On Tue, 2020-04-21 at 13:41 +0100, Richard Sandiford wrote: > Alan Modra via Gcc-patches writes: > > I believe set_rtx_cost is meant to handle a SET, not a PLUS as is > > passed in these two locations. Using the proper function for a PLUS > > doesn't make a huge difference: the only arg change

Re: [PATCH, vect] Check alignment for no peeling gaps handling

2020-05-07 Thread Jeff Law via Gcc-patches
On Tue, 2020-04-28 at 09:30 +0200, Richard Biener via Gcc-patches wrote: > On Fri, Apr 10, 2020 at 11:28 AM Kewen.Lin wrote: > > Hi, > > > > This is one fix following Richi's comments here: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542232.html > > > > I noticed the current half

Re: gcc.dg testsuite glitches

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 13:44 -0400, Nathan Sidwell wrote: > On 5/7/20 1:34 PM, Jeff Law wrote: > > On Tue, 2020-04-28 at 10:36 -0400, Nathan Sidwell wrote: > > > On 4/28/20 5:12 AM, Manfred Schwarb wrote: > > > > Hi, > > > > > > > > first, I do not have commit rights, so please somebody check and

Re: [PATCH] tree-pretty-print: Handle boolean types

2020-05-07 Thread Richard Biener via Gcc-patches
On Thu, May 7, 2020 at 7:24 PM Richard Sandiford wrote: > > AVX512-style masks and SVE-style predicates can be difficult > to debug in gimple dumps, since the types are printed like this: > > vector(4) foo; > > Some important details are hidden by that , > such as the number of bits in an

Re: [PATCH v3] [Stage1] Refactor tree-ssa-operands.c

2020-05-07 Thread Jeff Law via Gcc-patches
On Mon, 2020-05-04 at 19:00 -0300, Giuliano Belinassi via Gcc-patches wrote: > Hi, > > This patch Refactors tree-ssa-operands.c by wrapping the global > variables into a class, and also removes unused code. > > The difference between this version and v2 is: > * Disable the copy of

Re: gcc.dg testsuite glitches

2020-05-07 Thread Nathan Sidwell
On 5/7/20 1:34 PM, Jeff Law wrote: On Tue, 2020-04-28 at 10:36 -0400, Nathan Sidwell wrote: On 4/28/20 5:12 AM, Manfred Schwarb wrote: Hi, first, I do not have commit rights, so please somebody check and commit, I guess this goes under the obvious and trivial rules. There are several

Re: gcc.dg testsuite glitches

2020-05-07 Thread Jeff Law via Gcc-patches
On Tue, 2020-04-28 at 10:36 -0400, Nathan Sidwell wrote: > On 4/28/20 5:12 AM, Manfred Schwarb wrote: > > Hi, > > > > first, I do not have commit rights, so please somebody check and commit, > > I guess this goes under the obvious and trivial rules. > > > > There are several malformed dejagnu

Re: [PATCH] c++: Fix spelling of non-static

2020-05-07 Thread Marek Polacek via Gcc-patches
On Thu, Mar 19, 2020 at 12:51:42PM -0400, Marek Polacek via Gcc-patches wrote: > On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches wrote: > > On 3/19/20 9:48 AM, Marek Polacek via Gcc-patches wrote: > > > I was looking at DR 296 and noticed that we say "nonstatic" instead of >

Re: [PATCH] tree-ssa-structalias.c: Fix comments

2020-05-07 Thread Jeff Law via Gcc-patches
On Wed, 2020-05-06 at 13:57 +0200, Richard Biener via Gcc-patches wrote: > On Wed, May 6, 2020 at 1:07 PM Erick Ochoa > wrote: > > This patch fixes some quotations inside comments. The change in syntax > > highlighting was bothering me. I also found a typo. > > OK I don't think Erick has commit

Re: [PATCH] tree-pretty-print: Handle boolean types

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 17:40 +0100, Richard Sandiford wrote: > AVX512-style masks and SVE-style predicates can be difficult > to debug in gimple dumps, since the types are printed like this: > > vector(4) foo; > > Some important details are hidden by that , > such as the number of bits in an

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-05-07 Thread Segher Boessenkool
Hi! On Wed, May 06, 2020 at 08:57:52AM +, Yangfei (Felix) wrote: > > This looks promising. I'll try it out, see what it does on other targets. > > (It will > > have to wait for GCC 11 stage 1, of course). > > I see GCC11 stage 1 opens for commits now. > I have rebased the patch on the

[PATCH] c++: explain fn template argument type/value mismatch failures

2020-05-07 Thread Patrick Palka via Gcc-patches
In fn_type_unifcation, we are passing NULL_TREE as the 'in_decl' parameter to coerce_template_parms, and this is causing template type/value mismatch error messages to get suppressed regardless of the value of 'complain'. This means that when substitution into a function template fails due to a

Re: [PATCH v2] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 17:39 +0200, Richard Biener wrote: > On May 7, 2020 4:27:26 PM GMT+02:00, Jakub Jelinek wrote: > > On Thu, May 07, 2020 at 09:59:57AM +0200, Richard Biener wrote: > > > Maybe write A - B + -1 >= A to actually match what you match below > > ... > > > on the plus :c is not

[PATCH] tree-pretty-print: Handle boolean types

2020-05-07 Thread Richard Sandiford
AVX512-style masks and SVE-style predicates can be difficult to debug in gimple dumps, since the types are printed like this: vector(4) foo; Some important details are hidden by that , such as the number of bits in an element and whether the type is signed or unsigned. This patch uses an

Re: [PATCH] libstdc++: Implement integer-class types as defined in [iterator.concept.winc]

2020-05-07 Thread Patrick Palka via Gcc-patches
On Mon, 2 Mar 2020, Patrick Palka wrote: > On Mon, 24 Feb 2020, Patrick Palka wrote: > > > On Mon, 24 Feb 2020, Patrick Palka wrote: > > > > > This implements signed and unsigned integer-class types, whose width is > > > one bit > > > larger than the widest native signed and unsigned integral

Re: [PATCH] OpenACC reference count consistency checking

2020-05-07 Thread Julian Brown
Sorry about the delay replying to this email! On Thu, 30 Jan 2020 16:21:20 +0100 Thomas Schwinge wrote: > Hi Julian! > > Notwithstanding the open question about how to implement this > checking in libgomp in a non-intrusive (performance-wise) yet > maintainable (avoid '#if 0') way, I have two

avoid infinite loops in rpo fre

2020-05-07 Thread Alexandre Oliva
gnat.dg/opt83.adb compiled with -O2+ would enter an infinite loop with memory allocation within fre. I don't think there is anything Ada-specific in the bug, but the exact inlining and loop unrolling circumstances needed to trigger the bug are quite fragile, so I didn't try very hard to

Re: [PATCH] implement pre-c++20 contracts

2020-05-07 Thread Jeff Chapman via Gcc-patches
Hello, On 12/10/19, Jason Merrill wrote: > On 11/13/19, Jeff Chapman wrote: >> Attached is a patch that implements pre-c++20 contracts. This comes >> from a long running development branch which included ChangeLog entries >> as we went, which are included in the patch itself. The repo and >>

RE: [PATCH] aarch64: prefer using csinv, csneg in zero extend contexts

2020-05-07 Thread Alex Coplan
> -Original Message- > From: Richard Sandiford > Sent: 06 May 2020 11:28 > To: Alex Coplan > Cc: gcc-patches@gcc.gnu.org; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; nd > Subject: Re: [PATCH] aarch64: prefer using csinv, csneg in zero extend > contexts > > Alex Coplan

Re: [PATCH v2] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Richard Biener
On May 7, 2020 4:34:59 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, May 07, 2020 at 10:12:12AM +0200, Richard Biener wrote: >> I think unconditionally using (abs @0) is simplifying things enough >> (getting rid of one xor and one plus) to not worry about keeping >> the (x >> (prec - 1))? > >Ok. >

Re: [PATCH v2] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Richard Biener
On May 7, 2020 4:27:26 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, May 07, 2020 at 09:59:57AM +0200, Richard Biener wrote: >> Maybe write A - B + -1 >= A to actually match what you match below >... >> on the plus :c is not needed, canonicalization will put the constant >> literal second >> >>

Re: [PATCH v2] match.pd: Optimize ffs of known non-zero arg into ctz + 1 [PR94956]

2020-05-07 Thread Richard Biener
On May 7, 2020 4:25:45 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, May 07, 2020 at 10:04:35AM +0200, Richard Biener wrote: >> On Thu, 7 May 2020, Jakub Jelinek wrote: >> > The ffs expanders on several targets (x86, ia64, aarch64 at least) >> > emit a conditional move or similar code to handle the

Re: [PATCH] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 10:12 +0200, Richard Biener wrote: > On Thu, 7 May 2020, Jakub Jelinek wrote: > > > Hi! > > > > The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M > > for signed integral types into ABS_EXPR (X). For X == min it is already > > UB because M is -1 and min +

Re: [PATCH v2] c++: ICE with -Wall and constexpr if [PR94937]

2020-05-07 Thread Marek Polacek via Gcc-patches
On Wed, May 06, 2020 at 05:26:32PM -0400, Jason Merrill wrote: > On 5/5/20 6:17 PM, Marek Polacek wrote: > > An ICE arises here because we call cp_get_callee_fndecl_nofold in a > > template, and we've got a CALL_EXPR whose CALL_EXPR_FN is a BASELINK. > > This tickles the INDIRECT_TYPE_P assert in

Re: [PATCH v2] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 16:27 +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, May 07, 2020 at 09:59:57AM +0200, Richard Biener wrote: > > Maybe write A - B + -1 >= A to actually match what you match below > ... > > on the plus :c is not needed, canonicalization will put the constant > >

Re: [PATCH] tree: Avoid variable sharing in get_narrower [PR94724]

2020-05-07 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-07 at 16:13 +0200, Jakub Jelinek via Gcc-patches wrote: > Hi! > > On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote: > > > > + for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR; > > > > ..., and new 'op' variable here. > > > > > > +op = TREE_OPERAND

[PATCH v2] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 10:12:12AM +0200, Richard Biener wrote: > I think unconditionally using (abs @0) is simplifying things enough > (getting rid of one xor and one plus) to not worry about keeping > the (x >> (prec - 1))? Ok. > Do you really need the TYPE_OVERFLOW_UNDEFINED check? Probably

[PATCH v2] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 09:59:57AM +0200, Richard Biener wrote: > Maybe write A - B + -1 >= A to actually match what you match below ... > on the plus :c is not needed, canonicalization will put the constant > literal second > > The previous pattern has a single_use check on the minus, since >

[PATCH v2] match.pd: Optimize ffs of known non-zero arg into ctz + 1 [PR94956]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 10:04:35AM +0200, Richard Biener wrote: > On Thu, 7 May 2020, Jakub Jelinek wrote: > > The ffs expanders on several targets (x86, ia64, aarch64 at least) > > emit a conditional move or similar code to handle the case when the > > argument is 0, which makes the code longer.

[PATCH] tree: Avoid variable sharing in get_narrower [PR94724]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote: > >>+ for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR; > > ..., and new 'op' variable here. > > >>+op = TREE_OPERAND (op, 1)) > >>+ v.safe_push (op); > >>+ FOR_EACH_VEC_ELT_REVERSE (v, i, op) > >>+

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

[PATCH][DOC] Fix optindex entries for 2 options.

2020-05-07 Thread Martin Liška
Hi. It's an obvious documentation fix. I'm going to install it also to gcc-10 branch. Martin gcc/ChangeLog: 2020-05-07 Martin Liska * doc/invoke.texi: Fix 2 optindex entries. --- gcc/doc/invoke.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH][RFC] extend DECL_GIMPLE_REG_P to all types

2020-05-07 Thread Richard Biener
On Thu, 23 Apr 2020, Richard Biener wrote: > On Wed, 22 Apr 2020, Richard Sandiford wrote: > > > Richard Biener writes: > > > On Wed, 22 Apr 2020, Richard Biener wrote: > > > > > >> > > >> This extends DECL_GIMPLE_REG_P to all types so we can clear > > >> TREE_ADDRESSABLE even for integers

[Patch] (general Fortran + OpenMP) [Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672)

2020-05-07 Thread Tobias Burnus
The main purpose of this patch is to fix OpenMP, but it modifies the general Fortran handling of assumed-shape optional arguments. For assumed shape, gfortran generates an "arg.0 = arg->data" artificial variable – and with optional one has something like if (arg != NULL && arg->data != NULL)

Re: [PATCH] testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]

2020-05-07 Thread Nathan Sidwell
On 5/7/20 4:03 AM, Jakub Jelinek wrote: Hi! On Wed, May 06, 2020 at 02:14:03PM -0400, Nathan Sidwell wrote: --- /dev/null +++ w/gcc/testsuite/g++.dg/ext/attr-parm-1.C @@ -0,0 +1,7 @@ +// { dg-do compile { target { i?86-*-* x86_64-*-* } } } +// { dg-options -m32 } +// PR 94946 +class a { +

Re: [PATCH] tree: Fix up get_narrower [PR94724]

2020-05-07 Thread Thomas Schwinge
Hi! On 2020-04-23T21:04:35+0200, Richard Biener wrote: > On April 23, 2020 8:19:55 PM GMT+02:00, Jakub Jelinek > wrote: >>[patch] instead uses an auto_vec and builds them in the reverse >>order >>so when they are built, they are built with the correct operands. >> >>Bootstrapped/regtested on

[PATCH 2/2] ipa/94947 - avoid using externally_visible_p ()

2020-05-07 Thread Richard Biener
externally_visible_p wasn't the correct predicate to use (even if it worked), instead we should use DECL_EXTERNAL || TREE_PUBLIC. 2020-05-07 Richard Biener PR ipa/94947 * tree-ssa-structalias.c (refered_from_nonlocal_fn): Use DECL_EXTERNAL || TREE_PUBLIC instead of

Re: [PATCH] tree-optimization/94865 - combine BIT_INSERT_EXPR of BIT_FIELD_REF

2020-05-07 Thread Richard Biener
On Thu, 7 May 2020, Richard Sandiford wrote: > Richard Biener writes: > > On Thu, 7 May 2020, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > This implements patterns combining vector element insertion of > >> > vector element extraction to a VEC_PERM_EXPR of both vectors > >> >

Re: [PATCH] c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968]

2020-05-07 Thread Marek Polacek via Gcc-patches
On Thu, May 07, 2020 at 09:42:32AM +0200, Jakub Jelinek wrote: > Hi! > > If the second argument of __builtin_speculation_safe_value is > error_mark_node (or has such a type), we ICE during > useless_typ_conversion_p. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for

Re: [PATCH] tree-optimization/94865 - combine BIT_INSERT_EXPR of BIT_FIELD_REF

2020-05-07 Thread Richard Sandiford
Richard Biener writes: > On Thu, 7 May 2020, Richard Sandiford wrote: > >> Richard Biener writes: >> > This implements patterns combining vector element insertion of >> > vector element extraction to a VEC_PERM_EXPR of both vectors >> > when supported. Plus it adds the more generic identity

Re: [PATCH] libstdc++: Update {x86_64, i?86, powerpc64, s390x, aarch64}-linux baselines for GCC 10.1

2020-05-07 Thread Jonathan Wakely via Gcc-patches
On 07/05/20 13:11 +0200, Eric Botcazou wrote: It looks like gcc-9 needs the same update too. Attached, but results are identical with those of gcc-10, is that expected? Yes, there have been no changes since 9.3.0 OK for gcc-9 - thanks.

Re: [PATCH] c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968]

2020-05-07 Thread Richard Biener via Gcc-patches
On Thu, May 7, 2020 at 9:48 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > If the second argument of __builtin_speculation_safe_value is > error_mark_node (or has such a type), we ICE during > useless_typ_conversion_p. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,

Re: [PATCH] tree-optimization/94865 - combine BIT_INSERT_EXPR of BIT_FIELD_REF

2020-05-07 Thread Richard Biener
On Thu, 7 May 2020, Richard Sandiford wrote: > Richard Biener writes: > > This implements patterns combining vector element insertion of > > vector element extraction to a VEC_PERM_EXPR of both vectors > > when supported. Plus it adds the more generic identity transform > > of inserting a piece

Re: [PATCH] libstdc++: Update {x86_64, i?86, powerpc64, s390x, aarch64}-linux baselines for GCC 10.1

2020-05-07 Thread Eric Botcazou
> It looks like gcc-9 needs the same update too. Attached, but results are identical with those of gcc-10, is that expected? Using built-in specs. COLLECT_GCC=gcc/xgcc Target: sparc64-linux-gnu Configured with: /home/ebotcazou/src-9/configure --build=sparc64-linux-gnu --

Re: [PATCH] tree-optimization/94865 - combine BIT_INSERT_EXPR of BIT_FIELD_REF

2020-05-07 Thread Richard Sandiford
Richard Biener writes: > This implements patterns combining vector element insertion of > vector element extraction to a VEC_PERM_EXPR of both vectors > when supported. Plus it adds the more generic identity transform > of inserting a piece of itself at the same position. > > Richard - is there

RE: AArch32: fix bootstrap failure

2020-05-07 Thread Kyrylo Tkachov
Hi Alex, > -Original Message- > From: Alex Coplan > Sent: 07 May 2020 11:31 > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov ; nd > Subject: AArch32: fix bootstrap failure > > Hello, > > The attached patch fixes a

AArch32: fix bootstrap failure

2020-05-07 Thread Alex Coplan
Hello, The attached patch fixes a bootstrap failure on AArch32 introduced by https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=308bc496884706af4b3077171cbac684c7a6f7c6 This makes the declaration of arm_add_stmt_cost match the definition, and removes the redundant class keyword from the definition.

Re: [PATCH v2] csa: Fix --enable-checking=yes, df bootstrap failure in csa [PR94961]

2020-05-07 Thread Eric Botcazou
> I'll try following then. > > 2020-05-07 Jakub Jelinek > > PR bootstrap/94961 > PR rtl-optimization/94516 > * rtl.h (remove_reg_equal_equiv_notes): Add a bool argument defaulted > to false. > * rtlanal.c (remove_reg_equal_equiv_notes): Add no_rescan

Re: [PATCH] wwwdocs: Document the C++ ABI changes in GCC 10

2020-05-07 Thread Jonathan Wakely via Gcc-patches
On 07/05/20 11:08 +0200, Jakub Jelinek wrote: Hi! This is my humble attempt to document the C++ ABI changes. Or do you have something better? Not sure e.g. how C++ calls the TREE_ADDRESSABLE types which are passed/returned by invisible reference, perhaps it would be nice to make it clear that

[PATCH] tree-optimization/94865 - combine BIT_INSERT_EXPR of BIT_FIELD_REF

2020-05-07 Thread Richard Biener
This implements patterns combining vector element insertion of vector element extraction to a VEC_PERM_EXPR of both vectors when supported. Plus it adds the more generic identity transform of inserting a piece of itself at the same position. Richard - is there anything I can do to make this SVE

[PATCH v2] csa: Fix --enable-checking=yes, df bootstrap failure in csa [PR94961]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 10:40:12AM +0200, Eric Botcazou wrote: > OK, let's add a parameter no_rescan to remove_reg_equal_equiv_notes and > update > the two callers accordingly. I'll try following then. 2020-05-07 Jakub Jelinek PR bootstrap/94961 PR rtl-optimization/94516

[PATCH] wwwdocs: Document the C++ ABI changes in GCC 10

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! This is my humble attempt to document the C++ ABI changes. Or do you have something better? Not sure e.g. how C++ calls the TREE_ADDRESSABLE types which are passed/returned by invisible reference, perhaps it would be nice to make it clear that those aren't affected. As the release tarballs

Re: [PATCH] csa: Fix --enable-checking=yes, df bootstrap failure in csa [PR94961]

2020-05-07 Thread Eric Botcazou
> But I can surely do > if (ret) > df_notes_rescan (insn); > before > return ret; > in remove_reg_equal_equiv_notes. > > Though, combine.c doesn't need that, as it shortly afterward the > remove_reg_equal_equiv_notes call calls full df_insn_rescan, postreload.c > has > if

Re: [PATCH] libgcc: aarch64: Get hwcap for FreeBSD

2020-05-07 Thread Andreas Tobler
On 07.05.20 09:25, Kyrylo Tkachov wrote: Hi Andreas, -Original Message- From: Gcc-patches On Behalf Of Andreas Tobler Sent: 06 May 2020 21:17 To: GCC Patches Subject: [PATCH] libgcc: aarch64: Get hwcap for FreeBSD Hi all, Since FreeBSD 12, FreeBSD has a sys/auxv.h header too but it

Re: [PATCH] csa: Fix --enable-checking=yes,df bootstrap failure in csa [PR94961]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 10:23:24AM +0200, Eric Botcazou wrote: > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, plus > > tested with yes,df checking build/regtest on x86_64-linux (which previously > > failed), ok for trunk? > > > > 2020-05-06 Jakub Jelinek > > > >

Re: [PATCH] csa: Fix --enable-checking=yes, df bootstrap failure in csa [PR94961]

2020-05-07 Thread Eric Botcazou
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, plus > tested with yes,df checking build/regtest on x86_64-linux (which previously > failed), ok for trunk? > > 2020-05-06 Jakub Jelinek > > PR bootstrap/94961 > PR rtl-optimization/94516 > *

Re: [PATCH] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Richard Biener
On Thu, 7 May 2020, Jakub Jelinek wrote: > Hi! > > The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M > for signed integral types into ABS_EXPR (X). For X == min it is already > UB because M is -1 and min + -1 is UB, so we can use ABS_EXPR rather than > say ABSU_EXPR + cast. >

Re: [PATCH] match.pd: Optimize ffs of known non-zero arg into ctz + 1 [PR94956]

2020-05-07 Thread Richard Biener
On Thu, 7 May 2020, Jakub Jelinek wrote: > Hi! > > The ffs expanders on several targets (x86, ia64, aarch64 at least) > emit a conditional move or similar code to handle the case when the > argument is 0, which makes the code longer. > If we know from VRP that the argument will not be zero, we

[PATCH] testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! On Wed, May 06, 2020 at 02:14:03PM -0400, Nathan Sidwell wrote: > --- /dev/null > +++ w/gcc/testsuite/g++.dg/ext/attr-parm-1.C > @@ -0,0 +1,7 @@ > +// { dg-do compile { target { i?86-*-* x86_64-*-* } } } > +// { dg-options -m32 } > +// PR 94946 > +class a { > + template a(b (*)()); > +

Re: [PATCH] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Richard Biener
On Thu, 7 May 2020, Jakub Jelinek wrote: > Hi! > > Implemented thusly. The TYPE_OVERFLOW_WRAPS is there just because the > pattern above it has it too, if you want, I can throw it away from both. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2020-05-06 Jakub

[PATCH] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M for signed integral types into ABS_EXPR (X). For X == min it is already UB because M is -1 and min + -1 is UB, so we can use ABS_EXPR rather than say ABSU_EXPR + cast. The backend might then emit the abs code back using the

[PATCH] match.pd: Optimize ffs of known non-zero arg into ctz + 1 [PR94956]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! The ffs expanders on several targets (x86, ia64, aarch64 at least) emit a conditional move or similar code to handle the case when the argument is 0, which makes the code longer. If we know from VRP that the argument will not be zero, we can (if the target has also an ctz expander) just use

[PATCH] match.pd: Simplify unsigned A - B - 1 >= A to B >= A [PR94913]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! Implemented thusly. The TYPE_OVERFLOW_WRAPS is there just because the pattern above it has it too, if you want, I can throw it away from both. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-05-06 Jakub Jelinek PR tree-optimization/94913 *

[PATCH] csa: Fix --enable-checking=yes,df bootstrap failure in csa [PR94961]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! My recent combine-stack-adj.c change broke df checking bootstrap, while most of the changes are done through validate_change/confirm_changes which update df info, the removal of REG_EQUAL notes didn't update df info. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, plus

[PATCH] c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
Hi! If the second argument of __builtin_speculation_safe_value is error_mark_node (or has such a type), we ICE during useless_typ_conversion_p. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 202-05-06 Jakub Jelinek PR c/94968 * c-common.c

Re: [PATCH] lto-wrapper: split arguments of getenv ("MAKE").

2020-05-07 Thread Martin Liška
On 5/6/20 6:42 PM, Richard Biener wrote: Perfect if you checked freeargv is happy with a NULL argument! Yes, it is. Martin

[PATCH] Add caveat about parsing of .gcda and .gcno files.

2020-05-07 Thread Martin Liška
Hi. Let's discourage people from parsing of the coverage files. We invented `gcov --json-format` for those who need a machine readable format. I'm going to install the patch if there are no objections. Martin gcc/ChangeLog: 2020-05-07 Martin Liska PR gcov-profile/94928 *

RE: [PATCH] libgcc: aarch64: Get hwcap for FreeBSD

2020-05-07 Thread Kyrylo Tkachov
Hi Andreas, > -Original Message- > From: Gcc-patches On Behalf Of > Andreas Tobler > Sent: 06 May 2020 21:17 > To: GCC Patches > Subject: [PATCH] libgcc: aarch64: Get hwcap for FreeBSD > > Hi all, > > Since FreeBSD 12, FreeBSD has a sys/auxv.h header too but it doesn't > provide the

Re: [PATCH] PR preprocessor/94657: use $AR, not 'ar',

2020-05-07 Thread Sergei Trofimovich via Gcc-patches
On Wed, 22 Apr 2020 23:05:38 +0100 Sergei Trofimovich wrote: > From: Sergei Trofimovich > > On system with 'ar' and '${CHOST}-ar' the latter is preferred. > as it might not match default 'ar'. > > Bug is initially reported downstream as https://bugs.gentoo.org/718004. > > libcpp/ChangeLog: >

[PATCH] Extend std::copy/std::copy_n char* overload to deque iterator

2020-05-07 Thread François Dumont via Gcc-patches
    This patch purpose is to make sure that existing std::copy/std::copy_n overloads for char* will also be used for std::deque iterators when dealing with istreambuf_iterator. It also make sure that it still works when _GLIBCXX_DEBUG is activated.     * include/bits/stl_algo.h (__copy_n_a):

Re: [PATCH] libstdc++: Update {x86_64, i?86, powerpc64, s390x, aarch64}-linux baselines for GCC 10.1

2020-05-07 Thread Richard Biener via Gcc-patches
On Thu, May 7, 2020 at 8:53 AM Jonathan Wakely via Gcc-patches wrote: > > On 07/05/20 00:22 +0200, Eric Botcazou wrote: > >> Oops, here are the updates from Fedora packages built during the weekend. > > > >The SPARC64/Linux bits are attached. OK for trunk and gcc-10? > > OK, pending RM approval

Re: [PATCH] libstdc++: Update {x86_64, i?86, powerpc64, s390x, aarch64}-linux baselines for GCC 10.1

2020-05-07 Thread Jonathan Wakely via Gcc-patches
On 07/05/20 00:22 +0200, Eric Botcazou wrote: Oops, here are the updates from Fedora packages built during the weekend. The SPARC64/Linux bits are attached. OK for trunk and gcc-10? OK, pending RM approval for gcc-10, thanks. It looks like gcc-9 needs the same update too.