Re: [PATCH] c++: Better diagnostic for decltype(auto) in C++11 [PR96103]

2020-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/20 6:40 PM, Marek Polacek wrote: + "% type specifier is a C++14 extension"); The usual phrasing is "...only available with %<-std=c++14%> or %<-std=gnu++14%>". OK with that change. Jason

Re: [PATCH] c++: ICE in is_really_empty_class [PR95497]

2020-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/20 3:36 PM, Patrick Palka wrote: On Tue, 7 Jul 2020, Jason Merrill wrote: On 7/7/20 9:33 AM, Patrick Palka wrote: We are ICEing in the testcase below because we pass the yet-uninstantiated class type A of the PARM_DECL b to is_really_empty_class from

Re: [PATCH] libbacktrace: configure check linker support for DWARF-5

2020-07-07 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jul 7, 2020 at 6:59 AM CHIGOT, CLEMENT wrote: > > Description: > On AIX, the compiler is able to handle DWARF-5 but not the linker. > > Changelog: > 2020-07-07 Clement Chigot > * configure.ac: Extend check to the linker for DWARF-5 support > * configure: Regenerate > > Please apply

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-07 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: Thanks all! > Hi! > > On Mon, Jul 06, 2020 at 03:13:13PM +0800, guojiufu wrote: >> For very small loops (< 6 insns), it would be fine to unroll 4 >> times to use cache line better. Like below loops: >> `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;` > > Yes,

Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310]

2020-07-07 Thread luoxhu via Gcc-patches
On 2020/7/8 05:31, Segher Boessenkool wrote: > Hi! > > On Tue, Jul 07, 2020 at 04:39:58PM +0800, luoxhu wrote: >>> Lots of questions, sorry! >> >> Thanks for the nice suggestions of the initial patch contains many issues:), > > Pretty much all of it should *work*, it just can be improved and

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-07 Thread Jiufu Guo via Gcc-patches
will schmidt writes: Thanks! > On Mon, 2020-07-06 at 15:13 +0800, guojiufu via Gcc-patches wrote: > > Hi, > > Assorted comments below. thanks :-) > >> For very small loops (< 6 insns), it would be fine to unroll 4 >> times to use cache line better. Like below loops: >> `while (i) a[--i] =

[PATCH] [RISC-V] Add support for TLS stack protector canary access

2020-07-07 Thread cooper via Gcc-patches
The linux kernel guys are discussing about supporting TLS register based stack proctector canary, the link is as follows: https://lore.kernel.org/linux-riscv/202007051820.DABE7F87D7@keescook/T/#t I implemented register based stack protector canary with reference to aarch64 and x86. When

Re: [PATCH] rs6000: Add execution tests for mma builtins.

2020-07-07 Thread Segher Boessenkool
On Tue, Jul 07, 2020 at 12:45:08PM -0500, Aaron Sawdey via Gcc-patches wrote: > Updated slightly, removed -Wno-psabi as requested and also fixed the > fact that it wasn't actually checking __builtin_cpu_is or > __builtin_cpu_supports. OK for trunk and backport to 10? But you don't need that, and

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-07 Thread Segher Boessenkool
Hi! On Mon, Jul 06, 2020 at 03:13:13PM +0800, guojiufu wrote: > For very small loops (< 6 insns), it would be fine to unroll 4 > times to use cache line better. Like below loops: > `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;` Yes, definitely. > And for very complex loops which may

Re: [PATCH 2/2] doc/implement-c.texi: About same-as-scalar-type volatile aggregate accesses, PR94600

2020-07-07 Thread Martin Sebor via Gcc-patches
On 7/6/20 10:02 PM, Hans-Peter Nilsson via Gcc-patches wrote: We say very little about reads and writes to aggregate / compound objects, just scalar objects (i.e. assignments don't cause reads). Let's lets say something safe about aggregate objects, but only for those that are the same size as

[committed] c++: Add new test [PR92427]

2020-07-07 Thread Marek Polacek via Gcc-patches
Fixed in r10-5578. PR c++/92427 * g++.dg/ext/flexary37.C: New test. --- gcc/testsuite/g++.dg/ext/flexary37.C | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/flexary37.C diff --git a/gcc/testsuite/g++.dg/ext/flexary37.C

[PATCH v3] RS6000, add VSX mask manipulation support

2020-07-07 Thread Carl Love via Gcc-patches
Segher: I have fixed the issues you mentioned in version 2. I also rebased the patch onto the latest mainline. This resulted in having to change FUTURE to P10 everywhere. I reran regression testing on Power 9 with no regression issues. I also ran test cases manually on mambo. Please let me

Re: Inconsistencies with associative/unordered containers

2020-07-07 Thread Jonathan Wakely via Gcc-patches
On 03/07/20 08:37 +0200, François Dumont via Libstdc++ wrote: Hi     Here is the patch to fix the 2nd point of this mail below.     I prefer to qualify _Rb_tree_impl move constructor based on std::is_nothrow_move_constructible<_Base_key_compare> so that the logic of copying _Compare

[PATCH] contrib: Don't pass wget options to curl

2020-07-07 Thread Mike Nolta via Gcc-patches
This is a harmless bug, as the script still works, but curl's '-O' option isn't the same as wget's. contrib/ChangeLog: * download_prerequisites: Don't pass wget options to curl. --- contrib/download_prerequisites | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [committed] libstdc++: Whitespace changes to keep lines below 80 columns

2020-07-07 Thread Jonathan Wakely via Gcc-patches
On 07/07/20 23:38 +0100, Jonathan Wakely wrote: Also remove leading spaces that are followed by tabs. libstdc++-v3/ChangeLog: * include/std/limits: Whitespace changes. I missed a couple of leading spaces, fixed with this one. Committed to trunk. commit

[PATCH] c++: Better diagnostic for decltype(auto) in C++11 [PR96103]

2020-07-07 Thread Marek Polacek via Gcc-patches
If you try to use decltype(auto) in C++11, we emit obscure error: expected primary-expression before 'auto' giving the user no hint as to what's wrong. This patch improves that diagnostic. Since we've been giving an error, I'm also using error(). Bootstrapped/regtested on

[committed] libstdc++: Replace __int_limits with __numeric_traits_integer

2020-07-07 Thread Jonathan Wakely via Gcc-patches
I recently added std::__detail::__int_limits as a lightweight alternative to std::numeric_limits, forgetting that the values it provides (digits, min and max) are already provided by __gnu_cxx::__numeric_traits. This change adds __int_traits as an alias for __numeric_traits_integer. This avoids

[committed] libstdc++: Whitespace changes to keep lines below 80 columns

2020-07-07 Thread Jonathan Wakely via Gcc-patches
Also remove leading spaces that are followed by tabs. libstdc++-v3/ChangeLog: * include/std/limits: Whitespace changes. Committed to trunk. commit 9ca8fefeb720c8a9dec58e9a99042e6727309251 Author: Jonathan Wakely Date: Tue Jul 7 23:26:38 2020 +0100 libstdc++: Whitespace changes

Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310]

2020-07-07 Thread Segher Boessenkool
Hi! On Tue, Jul 07, 2020 at 04:39:58PM +0800, luoxhu wrote: > > Lots of questions, sorry! > > Thanks for the nice suggestions of the initial patch contains many issues:), Pretty much all of it should *work*, it just can be improved and simplified quite a bit :-) > For this case, %1:SF matches

[committed] wwwdocs: Simplify a bit in c99status.html.

2020-07-07 Thread Gerald Pfeifer
The sourceware.org/ml/libc-hacker links being broken (as a consequence of the sourceware.org upgrade) brought my attention to this bit of c99status.html. This simplifies that section, uses active voice, and removes those three links from twenty years ago. Pushed. Gerald ---

Re: RFA: Fix combine.c combining a move and a non-move into two non-moves, PR93372

2020-07-07 Thread Segher Boessenkool
Hi! On Mon, Jul 06, 2020 at 03:11:17AM +0200, Hans-Peter Nilsson wrote: > TL;DR: fixing a misdetection of what is a "simple move". As set before, this is not a fix, not a "misdetection", it is plain and simple a behaviour change. "Use single_set for is_just_move" would be a fine subject. >

Re: RFA: Fix combine.c combining a move and a non-move into two non-moves, PR93372

2020-07-07 Thread Segher Boessenkool
Hi! On Tue, Jul 07, 2020 at 02:50:09AM +0200, Hans-Peter Nilsson wrote: > > On Mon, Jul 06, 2020 at 03:11:17AM +0200, Hans-Peter Nilsson wrote: > > > TL;DR: fixing a misdetection of what is a "simple move". > > > > That is not a very correct characterisation of what this does :-) > > That's

Re: [PATCH] correct memcmp expansion of constant representations containing embedded nuls (PR 95189)

2020-07-07 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549225.html On 6/30/20 6:23 PM, Martin Sebor wrote: An enhancement to GCC 10 to improve the expansion of strncmp calls with strings with embedded nuls introduced a regression in similar calls to memcmp.  A review of the changes that led

[PATCH] rs6000: Add execution tests for mma builtins. [v3]

2020-07-07 Thread Aaron Sawdey via Gcc-patches
This patch adds execution tests that use the MMA builtins and check for the right answer, and a new test that checks whether __builtin_cpu_supports and __builtin_cpu_is return sane answers. One final time now that I've gotten things sorted out. OK for trunk and backport to 10? Thanks, Aaron

Re: [PATCH] c++: ICE in is_really_empty_class [PR95497]

2020-07-07 Thread Patrick Palka via Gcc-patches
On Tue, 7 Jul 2020, Jason Merrill wrote: > On 7/7/20 9:33 AM, Patrick Palka wrote: > > We are ICEing in the testcase below because we pass the > > yet-uninstantiated class type A of the PARM_DECL b to > > is_really_empty_class from potential_rvalue_constant_expression when > > parsing the

Re: [PATCH] c++: ICE in is_really_empty_class [PR95497]

2020-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/20 9:33 AM, Patrick Palka wrote: We are ICEing in the testcase below because we pass the yet-uninstantiated class type A of the PARM_DECL b to is_really_empty_class from potential_rvalue_constant_expression when parsing the requirement t += b. Why are we getting to

[PATCH] expr: Fix REDUCE_BIT_FIELD for constants [PR95694]

2020-07-07 Thread Richard Sandiford
[Sorry, been sitting on this patch for a while and just realised I never sent it.] This is yet another PR caused by constant integer rtxes not storing a mode. We were calling REDUCE_BIT_FIELD on a constant integer that didn't fit in poly_int64, and then tripped the as_a assert on VOIDmode.

[PATCH] rs6000: fix power10_hw test [v2]

2020-07-07 Thread Aaron Sawdey via Gcc-patches
The code snippet for this test was returning 1 if power10 instructions executed correctly. It should return 0 if the test passes. Approved offline by Segher with slight change. Will push after posting. * lib/target-supports.exp (check_power10_hw_available): Return 0 for passing

Re: [PATCH] c++: wrong pretty printing of nested type [PR95303]

2020-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/20 9:33 AM, Patrick Palka wrote: In the testcase below, we pretty print the nested type A::B as A::B because we don't check that B is itself a class template before printing the innermost set of template arguments from B's TEMPLATE_INFO (which in this case belongs to A). This patch fixes

Re: [PATCH] c++: ICE in is_really_empty_class [PR95497]

2020-07-07 Thread Patrick Palka via Gcc-patches
On Tue, 7 Jul 2020, Patrick Palka wrote: > We are ICEing in the testcase below because we pass the > yet-uninstantiated class type A of the PARM_DECL b to > is_really_empty_class from potential_rvalue_constant_expression when > parsing the requirement t += b. > > This patch fixes the ICE by

[PATCH, part 2] PR fortran/95980 - ICE in get_unique_type_string, at fortran/class.c:485

2020-07-07 Thread Harald Anlauf
As Dominique pointed out in the PR, the committed patch (part 1) fixed only one of the provided testcases, but not the original one. That turned out to be a long and winding road, requiring further checks for NULL pointer dereferences. The resulting attached changes have been regtested on

Re: [PATCH] separate reading past the end from -Wstringop-overflow

2020-07-07 Thread Martin Sebor via Gcc-patches
Ping. Despite its size, there isn't much new in the patch, it pretty much just splits an existing warning into two, one for buffer overflow and another for "overread." https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html On 6/23/20 8:05 PM, Martin Sebor wrote: -Wstringop-overflow

Re: [PATCH] libgomp: Add OMPD process functions and datatypes.

2020-07-07 Thread y2s1982 . via Gcc-patches
Hello, On Tue, Jul 7, 2020 at 7:46 AM Jakub Jelinek wrote: > On Tue, Jul 07, 2020 at 07:38:13AM -0400, y2s1982 . wrote: > > > I have no idea what this function is doing, but e.g. from aliasing > point of > > > view trying to access something as short/int/long long is dangerous, > and > > >

testsuite: missed testcase

2020-07-07 Thread Nathan Sidwell
I discovered I'd missed applying a testcase when fixing up the EOF token location a while back. gcc/testsuite/ * c-c++-common/cpp/pragma-eof.c: New -- Nathan Sidwell diff --git c/gcc/testsuite/c-c++-common/cpp/pragma-eof.c w/gcc/testsuite/c-c++-common/cpp/pragma-eof.c new file

testsuite:missed testcase

2020-07-07 Thread Nathan Sidwell via Gcc-patches
I discovered I'd missed applying a testcase when fixing up the EOF token location a while back. gcc/testsuite/ * c-c++-common/cpp/pragma-eof.c: New -- Nathan Sidwell : Facebook diff --git c/gcc/testsuite/c-c++-common/cpp/pragma-eof.c

preprocessor: Better line info for &

2020-07-07 Thread Nathan Sidwell
With C++ module header units it becomes important to distinguish between macros defined in forced headers (& commandline & builtins) from those defined in the header file being processed. We weren't making that easy because we treated the builtins and command-line locations somewhat

[PATCH] rs6000: fix power10_hw test

2020-07-07 Thread Aaron Sawdey via Gcc-patches
The code snippet for this test was returning 1 if power10 instructions executed correctly. It should return 0 if the test passes. OK for trunk and backport to 10? Thanks, Aaron * lib/target-supports.exp (check_power10_hw_available): Return 0 for passing test. ---

[PATCH] rs6000: Add execution tests for mma builtins.

2020-07-07 Thread Aaron Sawdey via Gcc-patches
Updated slightly, removed -Wno-psabi as requested and also fixed the fact that it wasn't actually checking __builtin_cpu_is or __builtin_cpu_supports. OK for trunk and backport to 10? Thanks, Aaron 2020-06-30 Rajalakshmi Srinivasaraghavan Aaron Sawdey gcc/testsuite/

Re: [PATCH] fix detection of negative step DR groups

2020-07-07 Thread Richard Sandiford
Richard Biener writes: > This fixes a condition that caused all negative step DR groups to > be detected as single element interleaving. Such groups are > rejected by interleaving vectorization but miscompiled by SLP > which is fixed by forcing VMAT_STRIDED_SLP for now. > > Bootstrap & regtest

Re: [PATCH] rs6000: Refine RTL unroll adjust hook

2020-07-07 Thread will schmidt via Gcc-patches
On Mon, 2020-07-06 at 15:13 +0800, guojiufu via Gcc-patches wrote: Hi, Assorted comments below. thanks :-) > For very small loops (< 6 insns), it would be fine to unroll 4 > times to use cache line better. Like below loops: > `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;` > > And

Re: [PATCH] x86: Enable FMA in rsqrt2 expander

2020-07-07 Thread H.J. Lu via Gcc-patches
On Tue, Jul 7, 2020 at 8:56 AM Kirill Yukhin wrote: > > Hello HJ, > > On 28 июн 07:19, H.J. Lu via Gcc-patches wrote: > > Enable FMA in rsqrt2 expander and fold rsqrtv16sf2 expander into > > rsqrt2 expander which expands to UNSPEC_RSQRT28 for TARGET_AVX512ER. > > Although it doesn't show

Re: [PATCH] x86: Enable FMA in rsqrt2 expander

2020-07-07 Thread Kirill Yukhin via Gcc-patches
Hello HJ, On 28 июн 07:19, H.J. Lu via Gcc-patches wrote: > Enable FMA in rsqrt2 expander and fold rsqrtv16sf2 expander into > rsqrt2 expander which expands to UNSPEC_RSQRT28 for TARGET_AVX512ER. > Although it doesn't show performance change in our workloads, FMA can > improve other workloads. >

Re: [PATCH][RFC] __builtin_shuffle sometimes should produce zip1 rather than TBL (PR82199)

2020-07-07 Thread Dmitrij Pochepko
Hi, thank you for looking into this. I prepared new patch with all your comments addressed. Thanks, Dmitrij On Tue, Jun 23, 2020 at 05:53:00PM +0100, Richard Sandiford wrote: ... > > I think it would be simpler to do it in this order: > > - check for Advanced SIMD, bail out if not > -

Re: [PATCH] aarch64: Change costs for TX2 to expose more vectorization opportunities

2020-07-07 Thread Anton Youdkevitch
As I don't have the commit privilege, if this is a sufficient approval can someone commit it for me? -- Thanks, Anton On 06.7.2020 21:04 , Richard Sandiford wrote: Joel Jones writes: I approve of this patch. I'm responsible for GCC for TX2 at Marvell. Andrew Pinski should certainly

Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-07-07 Thread Richard Sandiford
xiezhiheng writes: >> -Original Message- >> From: Richard Sandiford [mailto:richard.sandif...@arm.com] >> Sent: Monday, July 6, 2020 5:31 PM >> To: xiezhiheng >> Cc: Richard Biener ; gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions >>

[PATCH] libbacktrace: configure check linker support for DWARF-5

2020-07-07 Thread CHIGOT, CLEMENT via Gcc-patches
Description:   On AIX, the compiler is able to handle DWARF-5 but not the linker. Changelog: 2020-07-07 Clement Chigot  * configure.ac: Extend check to the linker for DWARF-5 support  * configure: Regenerate Please apply for me if approved. Could it be backported in gcc-10 branch too, please ?

[PATCH] c++: wrong pretty printing of nested type [PR95303]

2020-07-07 Thread Patrick Palka via Gcc-patches
In the testcase below, we pretty print the nested type A::B as A::B because we don't check that B is itself a class template before printing the innermost set of template arguments from B's TEMPLATE_INFO (which in this case belongs to A). This patch fixes this by checking PRIMARY_TEMPLATE_P

[PATCH] c++: ICE in is_really_empty_class [PR95497]

2020-07-07 Thread Patrick Palka via Gcc-patches
We are ICEing in the testcase below because we pass the yet-uninstantiated class type A of the PARM_DECL b to is_really_empty_class from potential_rvalue_constant_expression when parsing the requirement t += b. This patch fixes the ICE by guarding the problematic call to is_really_empty_class

[PATCH][GCC][aarch64] Generation of adjusted ldp/stp for vector types

2020-07-07 Thread Przemyslaw Wirkus
Hi, Introduce simple peephole2 optimization which substitutes a sequence of four consecutive load or store (LDR, STR) instructions with two load or store pair (LDP, STP) instructions for 2 element supported vector modes (V2SI, V2SF, V2DI, and V2DF). Generated load / store pair instruction offset

[PATCH] fix detection of negative step DR groups

2020-07-07 Thread Richard Biener
This fixes a condition that caused all negative step DR groups to be detected as single element interleaving. Such groups are rejected by interleaving vectorization but miscompiled by SLP which is fixed by forcing VMAT_STRIDED_SLP for now. Bootstrap & regtest running on x86_64-unknown-linux-gnu.

RE: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-07-07 Thread xiezhiheng
> -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Monday, July 6, 2020 5:31 PM > To: xiezhiheng > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions > emitted at -O3 > > No, this is

Re: [PATCH][GCC][Arm] PR target/95646: Do not clobber callee saved registers with CMSE

2020-07-07 Thread Christophe Lyon via Gcc-patches
Hi, On Mon, 6 Jul 2020 at 16:31, Andre Vieira (lists) wrote: > > > On 30/06/2020 14:50, Andre Vieira (lists) wrote: > > > > On 29/06/2020 11:15, Christophe Lyon wrote: > >> On Mon, 29 Jun 2020 at 10:56, Andre Vieira (lists) > >> wrote: > >>> > >>> On 23/06/2020 21:52, Christophe Lyon wrote: >

Re: [PATCH] [og10] libgomp, Fortran: Fix OpenACC "gang reduction on an orphan loop" error message

2020-07-07 Thread Frederik Harwath
Thomas Schwinge writes: Hi Thomas, > (CC added, for everything touching gfortran.) Thanks! > On 2020-07-07T10:52:08+0200, Frederik Harwath > wrote: >> This patch fixes the check for reductions on orphaned gang loops > > This is the "Make OpenACC orphan gang reductions errors" functionality

Re: [PATCH] libgomp: Add OMPD process functions and datatypes.

2020-07-07 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 07, 2020 at 07:38:13AM -0400, y2s1982 . wrote: > > I have no idea what this function is doing, but e.g. from aliasing point of > > view trying to access something as short/int/long long is dangerous, and > > there might be alignment implications too. > > > > This function is used in

Re: [committed] amdgcn: Add fold_left_plus vector reductions

2020-07-07 Thread Andrew Stubbs
On 07/07/2020 12:03, Richard Sandiford wrote: Andrew Stubbs writes: This patch implements a floating-point fold_left_plus vector pattern, which gives a significant speed-up in the BabelStream "dot" benchmark. The GCN architecture can't actually do an in-order vector reduction any more

Re: [PATCH] libgomp: Add OMPD process functions and datatypes.

2020-07-07 Thread y2s1982 . via Gcc-patches
Hello Jakub, Thank you for the review. I had some questions. On Tue, Jul 7, 2020 at 4:13 AM Jakub Jelinek wrote: > On Fri, Jul 03, 2020 at 10:43:55PM -0400, y2s1982 via Gcc-patches wrote: > > > + switch (id_size) > > +{ > > +case 1: > > + *output_id = (_gompd_device_id)

Re: [pushed] c++: -fsanitize=vptr and -fstrong-eval-order. [PR95221]

2020-07-07 Thread Thomas Schwinge
Hi! On 2020-06-23T13:21:05+0200, I wrote: > On 2020-05-22T17:03:01-0400, Jason Merrill via Gcc-patches > wrote: >> [...] >> >> This issue suggests that we should be running the ubsan tests in multiple >> standard modes like the rest of the G++ testsuite, so I've made that change >> as well. >

Re: [committed] amdgcn: Add fold_left_plus vector reductions

2020-07-07 Thread Richard Sandiford
Andrew Stubbs writes: > This patch implements a floating-point fold_left_plus vector pattern, > which gives a significant speed-up in the BabelStream "dot" benchmark. > > The GCN architecture can't actually do an in-order vector reduction any > more efficiently than that equivalent scalar

Re: [PATCH PR95961] vect: ICE: in exact_div, at poly-int.h:2182

2020-07-07 Thread Richard Sandiford
"Yangfei (Felix)" writes: >> > +nscalars = (STMT_SLP_TYPE (stmt_info) >> > + ? vf * DR_GROUP_SIZE (stmt_info) : vf); >> >> …the indentation on this line. Hope you don't mind, but I also “reflowed” >> the commit message to make it fit within 72 chars. >> (The

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-07 Thread Richard Sandiford
"Kewen.Lin" writes: > on 2020/7/2 下午1:20, Kewen.Lin via Gcc-patches wrote: >> on 2020/7/1 下午11:17, Richard Sandiford wrote: >>> "Kewen.Lin" writes: on 2020/7/1 上午3:53, Richard Sandiford wrote: > "Kewen.Lin" writes: >> + /* Decide whether to use fully-masked approach. */

Re: [PATCH] [og10] libgomp, Fortran: Fix OpenACC "gang reduction on an orphan loop" error message

2020-07-07 Thread Thomas Schwinge
Hi Frederik! (CC added, for everything touching gfortran.) On 2020-07-07T10:52:08+0200, Frederik Harwath wrote: > This patch fixes the check for reductions on orphaned gang loops This is the "Make OpenACC orphan gang reductions errors" functionality originally added in gomp-4_0-branch

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-07 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi Richard, > > on 2020/7/1 下午11:17, Richard Sandiford wrote: >> "Kewen.Lin" writes: >>> on 2020/7/1 上午3:53, Richard Sandiford wrote: "Kewen.Lin" writes: >poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo); > + tree length_limit = NULL_TREE; > + /*

Re: [PATCH] Add -fld-path= to specify an arbitrary executable as the linker

2020-07-07 Thread Martin Liška
On 7/3/20 7:18 PM, Fāng-ruì Sòng wrote: On 2020-07-03, Martin Liška wrote: On 7/2/20 9:34 PM, Fāng-ruì Sòng wrote: On 2020-07-01, Fāng-ruì Sòng wrote: On 2020-07-01, Martin Liška wrote: On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path

[PATCH PR95804]Force reduction partition to be scheduled in the last

2020-07-07 Thread bin.cheng via Gcc-patches
Hi, This is a followup fix for PR95638 which changed the way post order numbers are maintained for partition graph. It missed one case that when SCC of reduction partition is broken by runtime alias checks, we do need to make sure the reduction partition be scheduled in the last. This patch

[PATCH] RISC-V: Implment __builtin_thread_pointer

2020-07-07 Thread Kito Cheng
RISC-V has a dedicate register for thread pointer which is specified in psABI doc, so we could support __builtin_thread_pointer in straightforward way. Note: clang/llvm was supported __builtin_thread_pointer for RISC-V port recently. -

[Ada] Fix typo in code to get a better error message

2020-07-07 Thread Pierre-Marie de Rodat
For illegal name of a generic unit in a USE clause we tailor the message based on the kind of the generic, but we failed to detect generic procedures. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Analyze_Use_Package): Replace low-level, error-prone

[Ada] Small adjustment in the handling of alignment for arrays

2020-07-07 Thread Pierre-Marie de Rodat
This moves the setting of the alignment of an array with known alignment and size for the component type from Freeze_Array_Type to Layout_Type. The rationale is that Layout_Type is invoked after Freeze_Array_Type during freezing and computes the component size from the size of the component type,

[Ada] Errors in handling of access_to_subprogram contracts

2020-07-07 Thread Pierre-Marie de Rodat
This patch fixes errors in the construction of wrappers for Access_To_Subprogram types that carry pre/postconditions. a) The formals of the subprogram body for the wrapper must be distinct from those of the corresponding declarationm to prevent spurious visibility errors when other homonyms

[Ada] ACATS 4.1K - C452003

2020-07-07 Thread Pierre-Marie de Rodat
This test generates an assertion failure when compiling c452003_root-child.adb and shows that we are missing a null check in membership tests. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Tagged_Membership): Generate a call to CW_Membership instead

[Ada] Assert failure on invalid Variable_Indexing

2020-07-07 Thread Pierre-Marie de Rodat
GNAT is getting confused and will either generate an assert failure or a confusing error message (when assertions are disabled) in case of an invalid Variable_Indexing. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Try_Container_Indexing): Add ??? comment.

[Ada] Use Is_Generic_Subprogram where possible

2020-07-07 Thread Pierre-Marie de Rodat
Replace low-level Ekind_In tests with high-level Is_Generic_Subprogram. Cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.adb, sem_ch10.adb, sem_ch12.adb, sem_ch8.adb: Use Is_Generic_Subprogram.diff --git

[Ada] Simplify statically known Max_Size_In_Storage_Elements attribute in more cases

2020-07-07 Thread Pierre-Marie de Rodat
Generalize the existing constant-folding code that is used for Size attribute references to handle Max_Size_In_Storage_Elements attribute references as well. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Eval_Attribute): Generalize static evaluation of

[Ada] ACATS 4.1J - B854003 - Subtype conformance check missed #2

2020-07-07 Thread Pierre-Marie de Rodat
This is a follow up of previous change, which didn't handle the case of Errmsg = False in Check_Conformance properly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Check_Formal_Subprogram_Conformance): New subprogram to handle checking without

[Ada] Avoid crash on node extension

2020-07-07 Thread Pierre-Marie de Rodat
If a Node_Id points to a node extension, rather than an actual node, avoid crashing in the various debugging printouts, but just print an indication that it's an extension. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * treepr.adb (Print_Node): Add code to test

[Ada] ACATS 4.1H - BC60005 - null exclusion matching for formal subprograms

2020-07-07 Thread Pierre-Marie de Rodat
This ACATS test shows that we had several inconsistencies in the checking of null exclusion matching. We also realized that some old code in sem_ch6.adb was wrong and no longer necessary, so removed it. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb

[Ada] Freeze aspect expression relocated to pragma Precondition

2020-07-07 Thread Pierre-Marie de Rodat
In Analyze_Aspect_Specification we relocate expression of a Pre aspect to pragma Precondition. From this point we now only process the relocated expression; in particular, we freeze it and then copy to a pragma Check (which will ultimately execute this expression when subprogram is called). This

[Ada] Hang on conditional expression as actual

2020-07-07 Thread Pierre-Marie de Rodat
This patch fixes the compiler whereby conditional expressions used as actuals for anonymous access type in subprogram calls may result in an infinite loop when one of the branches of said conditional expression expands to an N_Expression_With_Actions Tested on x86_64-pc-linux-gnu, committed on

[Ada] Move generation of range checks for entry families to expander

2020-07-07 Thread Pierre-Marie de Rodat
This converts the generation of range checks for entry families to the separate analysis and generation model: the semantic analyzer sets the Do_Range_Check flag on the node to be range-checked and then later the expander generates the actual range check. This also removes a useless conditional

[Ada] Use pragma Unsuppress in Time_IO

2020-07-07 Thread Pierre-Marie de Rodat
We are relying on language-defined checks (like slice out of bounds) to detect certain cases of incorrect syntax in time strings. But the run-time system is usually compiled with checks suppressed, so this is erroneous. We were doing something like: X := T'Value (A (Lo .. Hi)); -- Could

[Ada] Ada2020: AI12-0198 potentially unevaluated components of arrays

2020-07-07 Thread Pierre-Marie de Rodat
Minor reformatting: This patch reorders the routines of the internal package Interval_Lists. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Interval_Lists): Reordering routine. * sem_util.adb (Interval_Lists): Reordering routines

[Ada] Set range checks for for 'Update on arrays in GNATprove expansion

2020-07-07 Thread Pierre-Marie de Rodat
This is a follow-up of a recent change, where setting of range checks for 'Update on records was moved from Resolve_Attribute (where it was shared between GNAT and GNATprove) to custom expansion for GNATprove (and GNAT sets them as well in its own expansion). This patch does the same for 'Update

[Ada] Fix documentation of -gnatVa switch

2020-07-07 Thread Pierre-Marie de Rodat
Switch -gnatVa enables all validity checks, including for parameters, which can be specifically enabled with -gnatVp. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Validity Checking): Add "p" to the list of

[Ada] Allow aspect Relaxed_Initialization on protected entries

2020-07-07 Thread Pierre-Marie de Rodat
Fix the initial support for aspect Relaxed_Initialization based on the finalized SPARK RM wording. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Analyze_Relaxed_Parameter): Fix for protected entries.diff --git a/gcc/ada/sem_ch13.adb

[Ada] Ada2020: AI12-0198 potentially unevaluated components of arrays

2020-07-07 Thread Pierre-Marie de Rodat
This patch fixes a regression in the SPARK testsuite. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Is_Potentially_Unevaluated): Protect reading attribute Etype.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb --- a/gcc/ada/sem_util.adb +++

[Ada] Fix expansion of delta aggregates with slices

2020-07-07 Thread Pierre-Marie de Rodat
When creating an anonymous object of the delta aggregate, use the type of the base expression, not the type of the delta aggregate itself. This follows from Ada 2020 4.3.4(14/5): "The bounds of the anonymous object of an array_delta_aggregate and the discriminants and tag (if any) of the

[Ada] Ensure No_Specification_Of_Aspect forbids pragmas and repr. clauses

2020-07-07 Thread Pierre-Marie de Rodat
Section 13.12.1 of the Ada reference manual states the following: [The No_Specification_of_Aspect pragma] Identifies an aspect for which no aspect_specification, attribute_definition_clause, or pragma is given. GNAT already checks for aspects, this commit adds checks for attribute definitions and

[Ada] Add support for XDR streaming in the default runtime

2020-07-07 Thread Pierre-Marie de Rodat
Since we no longer need to distribute s-stratt__xdr.adb, some code in Makefile.rtl is now dead. Update the GNAT UG accordingly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl: Remove dead code. * doc/gnat_ugn/building_executable_programs_with_gnat.rst:

[Ada] Remove extra checks for non-static context from resolving 'Update

2020-07-07 Thread Pierre-Marie de Rodat
Choices in attribute Update are evaluated, which includes checks for non-static context, as part of their analysis and resolution, which happens in Analyze_Array_Component_Update. There is no need to repeat them while attribute is resolved. This is just a cleanup, with no impact on the compiler;

[Ada] Spurious elaboration warnings with -gnatc and null procedures

2020-07-07 Thread Pierre-Marie de Rodat
When expansion is disabled (-gnatc or gnatprove_mode), null procedures need to be taken into account explicitly since they are not expanded. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_elab.adb (Is_Guaranteed_ABE): Take into account null procedures.diff

[Ada] Checking type invariants on in params of procedures, not functions (AI12-0044)

2020-07-07 Thread Pierre-Marie de Rodat
AI12-0044 is a binding interpretation that restricts type-invariant checking to occur on in parameters of procedures but not functions after a call, because such checks done on function calls within type invariants could cause unbounded recursion. This modifies AI05-0289, which specified that

[Ada] Handle explicit dereferences in expression functions

2020-07-07 Thread Pierre-Marie de Rodat
An expression function that is a completion freezes the types that appear in the expression. This includes the types of all entities within. In most cases an access type does not freeze its designated type, but implicit dereferences in a dispatching call do freeze the designated type.

Re: [PATCH 5/7 v6] vect: Support vector load/store with length in vectorizer

2020-07-07 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2020/7/2 下午1:20, Kewen.Lin via Gcc-patches wrote: > on 2020/7/1 下午11:17, Richard Sandiford wrote: >> "Kewen.Lin" writes: >>> on 2020/7/1 上午3:53, Richard Sandiford wrote: "Kewen.Lin" writes: [...] >> Hmm, OK. But in that case can you update the names of the variables >> to

Re: [PATCH 1/7 v8] ifn/optabs: Support vector load/store with length

2020-07-07 Thread Richard Sandiford
"Kewen.Lin" writes: > gcc/ChangeLog: > > 2020-MM-DD Kewen Lin > > * doc/md.texi (len_load_@var{m}): Document. > (len_store_@var{m}): Likewise. > * internal-fn.c (len_load_direct): New macro. > (len_store_direct): Likewise. > (expand_len_load_optab_fn): Likewise. >

Re: [PATCH] Fix typo in the document of GCC Internals

2020-07-07 Thread Richard Sandiford
Qian Jianhua writes: > This patch fixes a typo in the document of GCC Internals. Pushed to trunk, thanks. Richard > > --- > gcc/doc/generic.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi > index 827c4232aef..fb98727928a

Re: [PATCH] pass correct parameters to c_parser_do_statement

2020-07-07 Thread Richard Sandiford
"zhoukaipeng (A)" writes: > Sorry for my mistake. > > The previous patch description is incorrect. A new patch was attached. > > Can anyone help me install this patch? Pushed to trunk, thanks. Richard > > Thanks, > Kaipeng Zhou > >> -Original Message- >> From: zhoukaipeng (A) >> Sent:

[wwwdocs PATCH] remove tree-browser page and links

2020-07-07 Thread Hu Jiangping
Hi, I'm trying Tree Browser during debugging, but failed. I found that tree-browser.c and tree-browser.def have been removed at 2015-07-25. So, to avoid misunderstanding, can we remove this tree-browser page too? Regards. hujp --- htdocs/projects/tree-ssa/index.html| 6 -

[PATCH] [og10] libgomp, Fortran: Fix OpenACC "gang reduction on an orphan loop" error message

2020-07-07 Thread Frederik Harwath
Hi, This patch fixes the check for reductions on orphaned gang loops in the Fortran frontend which (in contrast to the C, C++ frontends) erroneously rejects reductions on gang loops that are contained in "kernels" constructs and which hence are not orphaned. According to the OpenACC standard

Re: [PATCH] gcov: rename 2 options.

2020-07-07 Thread Martin Liška
On 7/4/20 9:12 PM, Fangrui Song wrote: Good idea! I've done that and made an alias for -i -> -j option. I'm going to push it to master. Martin -- next part -- A non-text attachment was scrubbed... Name: 0001-gcov-rename-2-options.patch Type: text/x-patch Size: 5457 bytes

Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310]

2020-07-07 Thread luoxhu via Gcc-patches
On 2020/7/7 08:18, Segher Boessenkool wrote: > Hi! > > On Sun, Jul 05, 2020 at 09:17:57PM -0500, Xionghu Luo wrote: >> For extracting high part element from DImode register like: >> >> {%1:SF=unspec[r122:DI>>0x20#0] 86;clobber scratch;} >> >> split it before reload with "and mask" to avoid

[PATCH] Fix typo in the document of GCC Internals

2020-07-07 Thread Qian Jianhua
Hi This patch fixes a typo in the document of GCC Internals. --- gcc/doc/generic.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi index 827c4232aef..fb98727928a 100644 --- a/gcc/doc/generic.texi +++ b/gcc/doc/generic.texi @@

  1   2   >