Re: [SVE] PR91532

2019-10-03 Thread Richard Biener
On Thu, 3 Oct 2019, Prathamesh Kulkarni wrote: > On Wed, 2 Oct 2019 at 12:28, Richard Biener wrote: > > > > On Wed, 2 Oct 2019, Prathamesh Kulkarni wrote: > > > > > On Wed, 2 Oct 2019 at 01:08, Jeff Law wrote: > > > > > > > > On 10/1/19 12:40 AM, Richard Biener wrote: > > > > > On Mon, 30 Sep 20

Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-10-03 Thread Jakub Jelinek
On Thu, Oct 03, 2019 at 05:22:49PM -0500, Aaron Sawdey wrote: > --- gcc/expr.c(revision 276516) > +++ gcc/expr.c(working copy) > @@ -1624,9 +1624,8 @@ >set_mem_size (y, const_size); > } > > - bool pieces_ok = false; > - if (CONST_INT_P (size)) > -pieces_ok = can_

Re: Add std::copy_n overload for istreambuf_iterator

2019-10-03 Thread François Dumont
On 9/27/19 1:00 PM, Jonathan Wakely wrote: On 19/07/19 23:37 +0200, François Dumont wrote: It sounds reasonable to overload std::copy_n for istreambuf_iterator. I wonder whether it's worth doing: #if __cplusplus >= 201703L    if constexpr (is_same_v<_OutputIterator, _CharT*>) return __res

Re: [C++ PATCH] Improve cxx_fold_indirect_ref (PR c++/71504, take 2)

2019-10-03 Thread Jason Merrill
On 10/3/19 4:57 PM, Jakub Jelinek wrote: On Thu, Oct 03, 2019 at 03:57:17PM -0400, Jason Merrill wrote: That sounds better. Ok. And, second comment, not 100% sure about the unions, e.g. whether we shouldn't somehow try to figure what is the active union member and only use the active one rat

[PATCH] Add std::__iterator_category_t

2019-10-03 Thread François Dumont
Hi     May I add this convenient function ? I'll also use it in coming patches.     Note that I removed a template parameter in __is_random_access_iter in C++11.     * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define     for C++11.     (__is_random_access_iter): Ada

[PATCH] Add std::copy_n debug checks

2019-10-03 Thread François Dumont
Hi     We are missing obvious debug checks in std::copy_n. Moreover I'll need them when I'll remove the Debug layer in a coming patch.     Tested under Linux x86_64.     * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment     debug checks.     * testsuite/25_algorithms

Re: [SVE] PR91532

2019-10-03 Thread Prathamesh Kulkarni
On Wed, 2 Oct 2019 at 12:28, Richard Biener wrote: > > On Wed, 2 Oct 2019, Prathamesh Kulkarni wrote: > > > On Wed, 2 Oct 2019 at 01:08, Jeff Law wrote: > > > > > > On 10/1/19 12:40 AM, Richard Biener wrote: > > > > On Mon, 30 Sep 2019, Prathamesh Kulkarni wrote: > > > > > > > >> On Wed, 25 Sep 2

Re: [PATCH 2/3] Remove the old implementation of -Wclobbered

2019-10-03 Thread Jeff Law
On 10/3/19 5:59 AM, Vladislav Ivanishin wrote: > This patch removes the old implementation of the warning on RTL. > > Note: regstat_get_setjmp_crosses() and the associated data seems to be > needed for the RA itself, so I am not touching that. > > > 0002-Remove-the-old-implementation-of-Wclobber

Re: [PATCH 1/3] Make gsi_next_nonvirtual_phi do what one expects

2019-10-03 Thread Jeff Law
On 10/3/19 5:58 AM, Vladislav Ivanishin wrote: > This refactoring makes gsi_next_nonvirtual_phi() always advance the > gimple phi iterator (regardless of whether the current phi is virtual or > not). It matches the behavior of other gsi_next functions. > > It can be applied independently of the o

Re: [PATCH] Update documentation of -Wshadow

2019-10-03 Thread Jeff Law
On 10/3/19 9:16 AM, Bernd Edlinger wrote: > Hi, > > I've noticed that the documentation of -Wshadow=x has some > missing bits, and I want to add an negative example to > -Wshadow=compatble-local. > > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk? > > > Thanks > Ber

Re: [PATCH] diagnose more out-of-bounds char writes (PR 91977)

2019-10-03 Thread Jeff Law
On 10/3/19 5:28 PM, Martin Sebor wrote: > The count_nonzero_bytes() function that computes the range of bytes > stored by a multi-byte assignment is overly conservative and fails > to determine the number of bytes to store for expressions involving > MEM_REF with DECL operands without a constant in

Re: [RFH][libgcc] fp-bit bit ordering (PR 78804)

2019-10-03 Thread Jeff Law
On 9/28/19 8:14 PM, Oleg Endo wrote: > Hi, > > I've been dragging this patch along with me for a while. > At the moment, I don't have the resources to fully test it as requested > by Ian in the PR discussion. > > So I would like to ask for general comments on this one and hope that > folks with b

Re: [PATCH] IPA-CP release transformation summary (PR jit/91928)

2019-10-03 Thread Jeff Law
On 10/3/19 6:47 AM, Andrea Corallo wrote: > > Jeff Law writes: > >> On 10/1/19 4:11 AM, Andrea Corallo wrote: >>> Martin Jambor writes: >>> Hi, On Mon, Sep 30 2019, Andrea Corallo wrote: > Hi all, > I'd like to submit this patch. > It release the ipa cp transformation s

Re: [PATCH] mention referenced object in more -Wstringop-overflow instances

2019-10-03 Thread Jeff Law
On 10/2/19 5:15 PM, Martin Sebor wrote: > The attached patch adds an optional argument to > compute_builtin_object_size to let it return the DECL of the object > whose size it's called to compute.  This lets -Wstringop-overflow > point to the object in more instances of the warning than it does > n

Re: [PATCH 3/3] Implementation of -Wclobbered on tree-ssa

2019-10-03 Thread Jeff Law
On 10/3/19 6:01 AM, Vladislav Ivanishin wrote: > What it does > > > A fundamental limitation of the new approach is that it requires phi > nodes for variables to perform the analysis it needs to issue the > warning for them. No phis - no warning. In particular, it doesn't deal > wit

Re: [PATCH, GO] Fix -Wshadow=local in go frontend

2019-10-03 Thread Ian Lance Taylor
On Thu, Oct 3, 2019 at 8:20 AM Bernd Edlinger wrote: > > this would normally be a trivial changes, but unless I am mistaken, > I cannot simply commit to the go subtree. Except the -Wshadow=local > warnings this fixes also a few minor memory leaks. > > > Bootstrapped and reg-tested on x86_64-pc-li

[committed] pa: Disable -Warray-bounds in fptr.c

2019-10-03 Thread John David Anglin
We do so non standard stuff in __canonicalize_funcptr_for_compare() to handle function pointer canonicalization. The updated -Warray-bounds now causes warnings about negative array offsets. This patch disables the warning in this code. Tested on hppa-unknown-linux-gnu. Committed to trunk. Dav

[PATCH][wwwdocs] Update GCC 9 release note

2019-10-03 Thread H.J. Lu
Here is the patch to update GCC 9 release note. Is it OK? -- H.J. --- Index: htdocs/gcc-9/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.77 diff -u -p -r1.77 changes.html --- htdocs/gc

[committed] pa: Adjust MAX_PCREL17F_OFFSET to match stub group size default for ELF

2019-10-03 Thread John David Anglin
There are still a few packages that fail to build on Debian linux because we end up with branches that can't reach their target. It turns out that the default maximum stub group size in binutils is smaller than what we allow in gcc. This patch reduces the maximum offset in gcc to match that in

Re: [PATCH] Remove extra lib directory from --with-advance-toolchain

2019-10-03 Thread Michael Meissner
On Thu, Oct 03, 2019 at 02:08:16PM -0300, Tulio Magno Quites Machado Filho wrote: > Remove the extra -L directory so that user directories specified at > build time have higher preference over the advance toolchain libraries. > > 2019-10-03 Tulio Magno Quites Machado Filho > > * config.

[PATCH] diagnose more out-of-bounds char writes (PR 91977)

2019-10-03 Thread Martin Sebor
The count_nonzero_bytes() function that computes the range of bytes stored by a multi-byte assignment is overly conservative and fails to determine the number of bytes to store for expressions involving MEM_REF with DECL operands without a constant initializer. Even though it's not possible to de

Mark C2x built-in functions as such

2019-10-03 Thread Joseph Myers
Various built-in functions that GCC has as extensions are now standard functions in C2x. This patch adds DEF_C2X_BUILTIN and uses it to mark them as such. Some of the so-marked functions were previously DEF_EXT_LIB_BUILTIN, while some DFP ones were DEF_GCC_BUILTIN (i.e. __builtin_* only); both se

[committed] pa: Remove 64-bit sibcall call sequence

2019-10-03 Thread John David Anglin
64-bit sibling calls are disabled on all PA-RISC targets. This is because the argument pointer handling is incompatible with doing sibcalls. Thus, we can remove the non-local sibcall sequence that was used in testing. Tested on hppa64-hp-hpux11.11. Dave 2019-10-03 John David Anglin

Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove()

2019-10-03 Thread Aaron Sawdey
On 10/2/19 5:44 PM, Aaron Sawdey wrote: > On 10/2/19 5:35 PM, Jakub Jelinek wrote: >> On Wed, Oct 02, 2019 at 09:21:23AM -0500, Aaron Sawdey wrote: > 2019-09-27 Aaron Sawdey > > * builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm. > (expand_builtin_memcpy):

Re: [PATCH] Remove some restrictions from rust-demangle.

2019-10-03 Thread Jeff Law
On 10/3/19 3:39 PM, Ian Lance Taylor wrote: > On Wed, Sep 25, 2019 at 10:27 AM Eduard-Mihai Burtescu wrote: >> >> 2019-09-25 Eduard-Mihai Burtescu >> libiberty/ChangeLog: >> * rust-demangle.c (looks_like_rust): Remove. >> (rust_is_mangled): Don't check escapes. >> (is_pr

Re: [PATCH] Remove some restrictions from rust-demangle.

2019-10-03 Thread Ian Lance Taylor
On Wed, Sep 25, 2019 at 10:27 AM Eduard-Mihai Burtescu wrote: > > 2019-09-25 Eduard-Mihai Burtescu > libiberty/ChangeLog: > * rust-demangle.c (looks_like_rust): Remove. > (rust_is_mangled): Don't check escapes. > (is_prefixed_hash): Allow 0-9a-f permutations. > (

[C++ PATCH] Improve cxx_fold_indirect_ref (PR c++/71504, take 2)

2019-10-03 Thread Jakub Jelinek
On Thu, Oct 03, 2019 at 03:57:17PM -0400, Jason Merrill wrote: > That sounds better. Ok. > > And, second comment, not 100% sure about the unions, e.g. whether we > > shouldn't somehow try to figure what is the active union member and only use > > the active one rather than trying all. > > Hmm, g

[Darwin, committed] Pick up SDKROOT as the sysroot fallback.

2019-10-03 Thread Iain Sandoe
Hi, For compatibility with xcrun (and the behaviour of the clang driver), make use of the setting of the SDKROOT environment variable when it is available. This applies to both finding headers and libraries (i.e. it is also passed to ld64). Priority: 1. User's command-line specified --sysroot= o

Re: [C++ PATCH] PR c++/91369 - Implement P0784R7: constexpr new

2019-10-03 Thread Jason Merrill
On 10/3/19 2:38 PM, Jakub Jelinek wrote: On Tue, Oct 01, 2019 at 05:56:00PM -0400, Jason Merrill wrote: + else if (DECL_NAME (var) == heap_deleted_identifier) + { + if (!ctx->quiet) + error_at (loc, "deallocation of alre

Re: ppc64le regressions due to recent change

2019-10-03 Thread Jeff Law
On 10/3/19 1:46 PM, Jan Hubicka wrote: >> >> >>> Tests that now fail, but worked before (15 tests): >>> >>> g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-times fre3 ";; >>> Function" 1 >>> g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-times fre3 "free" 14 >>> g++.dg/tree-ssa/pr

Re: Reimplementation of -Wclobbered on GIMPLE SSA

2019-10-03 Thread Jeff Law
On 10/3/19 5:54 AM, Vladislav Ivanishin wrote: > Hi! > > This series implements the -Wclobbered warning on GIMPLE in place of the > old RTL implementation. > > This cover letter contains a high-level explanation of what is going on > and why. The new implementation itself is in the patch 3. I w

Re: [C++ PATCH] Improve cxx_fold_indirect_ref (PR c++/71504)

2019-10-03 Thread Jason Merrill
On 10/3/19 2:25 PM, Jakub Jelinek wrote: Hi! On Tue, Oct 01, 2019 at 05:56:00PM -0400, Jason Merrill wrote: I think we want to factor this function more, so we don't have the same code in multiple places for handling an array, and an array member, and a pointer to array. Do you want to take a

Re: ppc64le regressions due to recent change

2019-10-03 Thread Jan Hubicka
> > > > Tests that now fail, but worked before (15 tests): > > > > g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-times fre3 ";; > > Function" 1 > > g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-times fre3 "free" 14 > > g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-

Re: [C++ PATCH] Fix up -fstrong-eval-order handling of call exprs (PR c++/91974)

2019-10-03 Thread Jason Merrill
On 10/3/19 12:16 PM, Jakub Jelinek wrote: C++17 and later say "The postfix-expression is sequenced before each expression in the expression-list and any default argument." As the following testcase shows, we don't honor that. Either cp_gimplify_expr gimplifies some arguments (if CALL_EXPR_REVER

Re: [C++ PATCH] PR c++/91369 - Implement P0784R7: constexpr new

2019-10-03 Thread Jakub Jelinek
On Tue, Oct 01, 2019 at 05:56:00PM -0400, Jason Merrill wrote: > > + else if (DECL_NAME (var) == heap_deleted_identifier) > > + { > > + if (!ctx->quiet) > > + error_at (loc, "deallocation of already deallocated " > > +

[C++ PATCH] Improve cxx_fold_indirect_ref (PR c++/71504)

2019-10-03 Thread Jakub Jelinek
Hi! On Tue, Oct 01, 2019 at 05:56:00PM -0400, Jason Merrill wrote: > I think we want to factor this function more, so we don't have the same code > in multiple places for handling an array, and an array member, and a pointer > to array. Do you want to take a look at bug 71504 while you're touchin

Re: [PATCH] Libgomp magic offset value self-documentation

2019-10-03 Thread Jakub Jelinek
On Thu, Oct 03, 2019 at 09:35:03AM -0700, Julian Brown wrote: > This patch provides some macros naming special offset field values used > in libgomp/target.c. It was previously posted as part of the series > supporting OpenACC 2.6 manual deep copy here: > > https://gcc.gnu.org/ml/gcc-patches/20

[PATCH] Remove extra lib directory from --with-advance-toolchain

2019-10-03 Thread Tulio Magno Quites Machado Filho
Remove the extra -L directory so that user directories specified at build time have higher preference over the advance toolchain libraries. 2019-10-03 Tulio Magno Quites Machado Filho * config.gcc: Remove an extra -L from --with-advance-toolchain. --- gcc/config.gcc | 6 ++ 1 file

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

2019-10-03 Thread Thomas Koenig
Steve, The attach patch silences -Wconversion and -Wconversion-extra warnings that had previously been issued for explicit conversions (see testcase for examples). The patch has been tested on x86-*-freebsd. OK to commit? OK. Thanks a lot for the patch! Regards Thomas

[PATCH] OpenACC reference count consistency checking

2019-10-03 Thread Julian Brown
This patch provides self-checking for consistency of the OpenACC reference-counting implementation in libgomp. Tested alongside (and dependent on) the patch posted adjacent to this one that overhauls said reference-counting implementation. Tested (with RC_CHECKING enabled) with offloading to NVPT

[PATCH] OpenACC reference count overhaul

2019-10-03 Thread Julian Brown
This patch has been broken out of the patch supporting OpenACC 2.6 manual deep copy last posted here: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01084.html As part of developing that patch, libgomp's OpenACC reference counting implementation proved to be somewhat inconsistent, especially whe

[PATCH] Libgomp magic offset value self-documentation

2019-10-03 Thread Julian Brown
This patch provides some macros naming special offset field values used in libgomp/target.c. It was previously posted as part of the series supporting OpenACC 2.6 manual deep copy here: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00825.html Parts of that patch were committed already by Thoma

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 04:26:55PM +0100, Richard Earnshaw (lists) wrote: > Well if that's how tightly ALL_REGS is defined, then really no back-end > should be defining it at all. Instead the build system (or the run-time > initialization code) should be constructing it on the fly. Similarly >

[C++ PATCH] Fix up -fstrong-eval-order handling of call exprs (PR c++/91974)

2019-10-03 Thread Jakub Jelinek
Hi! C++17 and later say "The postfix-expression is sequenced before each expression in the expression-list and any default argument." As the following testcase shows, we don't honor that. Either cp_gimplify_expr gimplifies some arguments (if CALL_EXPR_REVERSE_ARGS or CALL_EXPR_ORDERED_ARGS or fo

Re: [PATCH] Fix -Wshadow=local and undefined behavior in fortran/primary.c

2019-10-03 Thread Steve Kargl
On Thu, Oct 03, 2019 at 03:19:15PM +, Bernd Edlinger wrote: > > This fixes two -Wshadow=local warnings, and a undefined behavior that is > used in the loop termination logic here: > > for (p = c - 1; p >= buffer; p--) > { > if (*p == '.') > continue; > > In order to terminate the

Re: -O2 inliner retuning 3/n: make inline hints more systematic

2019-10-03 Thread Jan Hubicka
> On Thu, 2019-10-03 at 17:29 +0200, Jan Hubicka wrote: > > [...] > > > In this patch I however untangle it from the hinting mechanism. > > > [...] > > > Bootstrapped/regtested x86_64-linux. > > If I'm reading this right it looks like the patch is missing. Hi, patch is attached. * pa

Re: -O2 inliner retuning 3/n: make inline hints more systematic

2019-10-03 Thread David Malcolm
On Thu, 2019-10-03 at 17:29 +0200, Jan Hubicka wrote: [...] > In this patch I however untangle it from the hinting mechanism. > [...] > Bootstrapped/regtested x86_64-linux. If I'm reading this right it looks like the patch is missing. Dave

Re: [PATCH] Fix -Wshadow=local warnings in rtl.h

2019-10-03 Thread Bernd Edlinger
On 10/3/19 5:25 PM, Jakub Jelinek wrote: > On Thu, Oct 03, 2019 at 03:17:47PM +, Bernd Edlinger wrote: >> Hi, >> >> this fixes -Wshadow=local warnings in the RTL_FLAG_CHECKx macros, >> which happen when this macro is used recursively in a macro >> argument. The __typeof (RTX) const _rtx in the

-O2 inliner retuning 3/n: make inline hints more systematic

2019-10-03 Thread Jan Hubicka
Hi, the previous patch (which enabled -finline-functions with limited parameters at -O2) had bit unexpected effect on trashing tramp3d and dlv performance which as not caught by LNT testing but is clearly visible in legacy testers. I did know about the tramp3d problems but since LNT was happy I tou

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Richard Earnshaw (lists)
On 03/10/2019 15:15, Segher Boessenkool wrote: On Thu, Oct 03, 2019 at 09:26:45AM -0400, Paul Koning wrote: On Oct 3, 2019, at 9:12 AM, Richard Earnshaw (lists) wrote: On 03/10/2019 10:48, Segher Boessenkool wrote: ... But ALL_REGS should contain *all* registers. The union of any two regis

Re: [PATCH] Fix -Wshadow=local warnings in rtl.h

2019-10-03 Thread Jakub Jelinek
On Thu, Oct 03, 2019 at 03:17:47PM +, Bernd Edlinger wrote: > Hi, > > this fixes -Wshadow=local warnings in the RTL_FLAG_CHECKx macros, > which happen when this macro is used recursively in a macro > argument. The __typeof (RTX) const _rtx in the inner macro > expansions shadows the outer mac

[PATCH] Fix -Wshadow=local and undefined behavior in fortran/primary.c

2019-10-03 Thread Bernd Edlinger
Hi, This fixes two -Wshadow=local warnings, and a undefined behavior that is used in the loop termination logic here: for (p = c - 1; p >= buffer; p--) { if (*p == '.') continue; In order to terminate the loop p is decremented until it points to buffer-1 (buffer is alloca'd, so that

[PATCH, GO] Fix -Wshadow=local in go frontend

2019-10-03 Thread Bernd Edlinger
Hi, this would normally be a trivial changes, but unless I am mistaken, I cannot simply commit to the go subtree. Except the -Wshadow=local warnings this fixes also a few minor memory leaks. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Ian, can you please commit thi

[PATCH] Fix -Wshadow=local warnings in hash-table.h

2019-10-03 Thread Bernd Edlinger
Hi, this fixes a few -Wshadow=local warnings in hash-table.h. Since values of type size_t are assigned here to int variables an overflow may happen resulting in memory leaks or malfunction. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2019-10-03 Bern

[PATCH] Fix -Wshadow=local warnings and a minor bug in expr.c

2019-10-03 Thread Bernd Edlinger
Hi, this fixes a few -Wshadow=local warnings in expr.c, and a minor bug in expand_assignment. The problem is the value if to_mode is usually GET_MODE (to_rtx), concat_store_slow:; rtx temp = assign_stack_temp (to_mode, GET_MOD

[PATCH] Fix -Wshadow=local warnings in dumpfile.h

2019-10-03 Thread Bernd Edlinger
Hi, this fixes a -Wshadow=local warning when using AUTO_DUMP_SCOPE in nested blocks. Since NAME i a string I cannot use it to create a unique name for the auto_dump_scope object. So I used XCONCAT2 from good old symcat.h, to mangle the __LINE__ macro into the scope object name. Bootstrapped an

[PATCH] Fix -Wshadow=local warnings in cgraph.h

2019-10-03 Thread Bernd Edlinger
Hi, this fixes a -Wshadow=local warning in the FOR_EACH_ALIAS macro that happens when it is used in lto/lto-partition.c in a nested block. For now to keep the patch simple, using the fact that the ALIAS parameter is always a simple name, concatenate _iter_ to make the loop variable a reserved nam

[PATCH] Fix -Wshadow=local warnings in passes.c

2019-10-03 Thread Bernd Edlinger
Hi, this fixes -Wshadow=local warnings in passes.c. The non-trivial part is due to the PUSH_INSERT_PASSES_WITHIN is used recursively, and shadows the local value p in each invocation. Fixed by using a helper class that restores the saved content of p at the end of the block. The shadowing variab

[PATCH] Fix -Wshadow=local warnings in genmatch.c

2019-10-03 Thread Bernd Edlinger
Hi, this fixes -Wshadow=local warnings in genmatch.c itself and in generated files as well. The non-trivial part of this patch is renaming the generated local variables in the gimple-match.c, to use different names for variables in inner blocks, and use a depth index to access the right value. A

[PATCH] Fix -Wshadow=local warnings in rtl.h

2019-10-03 Thread Bernd Edlinger
Hi, this fixes -Wshadow=local warnings in the RTL_FLAG_CHECKx macros, which happen when this macro is used recursively in a macro argument. The __typeof (RTX) const _rtx in the inner macro expansions shadows the outer macro expansions. So reworked the macro to not use statement expressions but u

[PATCH] Add -Wshadow=local

2019-10-03 Thread Bernd Edlinger
Hi, this adds -Wshadow=local to the GCC build rules. It is to be applied after all other patches in this series including the trivial ones are applied. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2019-10-03 Bernd Edlinger * configure.ac (ACX_PROG

[PATCH] Update documentation of -Wshadow

2019-10-03 Thread Bernd Edlinger
Hi, I've noticed that the documentation of -Wshadow=x has some missing bits, and I want to add an negative example to -Wshadow=compatble-local. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2019-10-03 Bernd Edlinger * doc/invoke.texi (-Wshadow=globa

[obvious, PATCH 4/3][doc] -Wuninitialized doesn't do -Wclobbered's job

2019-10-03 Thread Vladislav Ivanishin
Oh, and this old documentation bug. (AFAICT this is a historical artifact from the pre-tree-ssa times when both -Wclobbered and -Wuninitialized were implemented on RTL.) This one is actually independent of the others and, I believe, is obvious enough. I am going to install tomorrow. >From 1ddc8

[PATCH] contrib: Add KPASS support to dg-extract-results.{sh,py}

2019-10-03 Thread Andrew Burgess
My motivation for the patch below comes from GDB. The binutils-gdb project maintains a copy of the contrib directory that it keeps in sync with upstream GCC, and patches to contrib/ are ideally first applied to GCC then backported to binutils-gdb. This patch extends the dg-extract-results.* scrip

Re: [PATCH] Fix non-reserved names in Parallel Mode headers

2019-10-03 Thread Jonathan Wakely
On 03/10/19 16:24 +0200, Rainer Orth wrote: _C is used in . Fixed as in other similar instances, tested on i386-pc-solaris2.11. Ok for mainline? Yes, thanks.

Re: [PATCH] Fix non-reserved names in Parallel Mode headers

2019-10-03 Thread Rainer Orth
Hi Jonathan, > * include/parallel/algo.h: Replace non-reserved names. > * include/parallel/multiway_merge.h: Likewise. > * include/parallel/multiway_mergesort.h: Likewise. > * include/parallel/numericfwd.h: Likewise. > * testsuite/17_intro/names.cc: Add RAI to test ma

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 09:26:45AM -0400, Paul Koning wrote: > > On Oct 3, 2019, at 9:12 AM, Richard Earnshaw (lists) > > wrote: > > > > On 03/10/2019 10:48, Segher Boessenkool wrote: > >>> ... > >> But ALL_REGS should contain *all* registers. The union of any two register > >> classes has to b

[PATCH] PR fortran/91497 -- Silence conversion warnings

2019-10-03 Thread Steve Kargl
The attach patch silences -Wconversion and -Wconversion-extra warnings that had previously been issued for explicit conversions (see testcase for examples). The patch has been tested on x86-*-freebsd. OK to commit? 2019-10-03 Steven G. Kargl PR fortran/91497 * simplify.c (gfc

[committed] Create ARM/Arm-9-branch

2019-10-03 Thread Joey Ye
Branch created for Arm GCC releases. - Joey

[testsuite] Check init_priority in g++.dg/cpp0x/gen-attrs-67.C

2019-10-03 Thread Rainer Orth
I found g++.dg/cpp0x/gen-attrs-67.C to FAIL on Solaris 11 when configuring with --disable-initfini-array: +FAIL: g++.dg/cpp0x/gen-attrs-67.C -std=c++14 (test for excess errors) +FAIL: g++.dg/cpp0x/gen-attrs-67.C -std=c++17 (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/gcc/

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Paul Koning
> On Oct 3, 2019, at 9:12 AM, Richard Earnshaw (lists) > wrote: > > On 03/10/2019 10:48, Segher Boessenkool wrote: >>> ... >> But ALL_REGS should contain *all* registers. The union of any two register >> classes has to be contained in some register class, so every register class >> has to be

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Richard Earnshaw (lists)
On 03/10/2019 10:48, Segher Boessenkool wrote: On Thu, Oct 03, 2019 at 10:35:15AM +0100, Richard Earnshaw (lists) wrote: On 03/10/2019 00:01, Segher Boessenkool wrote: The documentation says @findex ALL_REGS @findex NO_REGS In general, each register will belong to several classes. In fact, on

Re: [arm] Fix rtl-checking failure in arm_print_value

2019-10-03 Thread Richard Sandiford
Kyrill Tkachov writes: > Hi Richard, > > On 10/3/19 1:45 PM, Richard Sandiford wrote: >> Noticed while debugging the arm bootstrap failure. >> >> Tested on arm-linux-gnueabihf.  OK to install? >> >> Richard >> >> >> 2019-10-03  Richard Sandiford >> >> gcc/ >>     * config/arm/arm.c (arm_print

Re: [C++ Patch] Improve grokdeclarator error

2019-10-03 Thread Jason Merrill
On Mon, Sep 30, 2019 at 3:25 PM Paolo Carlini wrote: > > On 30/09/19 20:46, Jason Merrill wrote: > > On Mon, Sep 30, 2019 at 6:54 AM Paolo Carlini > > wrote: > >> On 28/09/19 04:05, Jason Merrill wrote: > >>> On 9/26/19 3:39 PM, Paolo Carlini wrote: > +template void foo( // { dg-error "15:

Re: [arm] Fix rtl-checking failure in arm_print_value

2019-10-03 Thread Kyrill Tkachov
Hi Richard, On 10/3/19 1:45 PM, Richard Sandiford wrote: Noticed while debugging the arm bootstrap failure. Tested on arm-linux-gnueabihf.  OK to install? Richard 2019-10-03  Richard Sandiford gcc/     * config/arm/arm.c (arm_print_value): Use real_to_decimal     to print CONST_DOU

Re: [PATCH] IPA-CP release transformation summary (PR jit/91928)

2019-10-03 Thread Andrea Corallo
Jeff Law writes: > On 10/1/19 4:11 AM, Andrea Corallo wrote: >> Martin Jambor writes: >> >>> Hi, >>> >>> On Mon, Sep 30 2019, Andrea Corallo wrote: Hi all, I'd like to submit this patch. It release the ipa cp transformation summary after functions being expanded. This i

[arm] Fix rtl-checking failure in arm_print_value

2019-10-03 Thread Richard Sandiford
Noticed while debugging the arm bootstrap failure. Tested on arm-linux-gnueabihf. OK to install? Richard 2019-10-03 Richard Sandiford gcc/ * config/arm/arm.c (arm_print_value): Use real_to_decimal to print CONST_DOUBLEs. Index: gcc/config/arm/arm.c

Re: [PATCH v4 2/7] Introduce can_vcond_compare_p function

2019-10-03 Thread Richard Sandiford
Ilya Leoshkevich writes: > z13 supports only non-signaling vector comparisons. This means we > cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. > However, we cannot express this restriction today: the code only checks > whether vcond$a$b optab exists, which does not contain inform

Re: [PATCH 4/4] Modifications to the testsuite

2019-10-03 Thread Martin Jambor
Hi, On Wed, Oct 02 2019, Andreas Schwab wrote: > FAIL: gcc.dg/ipa/ipa-sra-19.c (test for excess errors) > Excess errors: > /daten/gcc/gcc-20191001/gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c:19:3: error: > AltiVec argument passed to unprototyped function > /daten/gcc/gcc-20191001/gcc/testsuite/gcc.dg/i

[PATCH 3/3] Implementation of -Wclobbered on tree-ssa

2019-10-03 Thread Vladislav Ivanishin
What it does A fundamental limitation of the new approach is that it requires phi nodes for variables to perform the analysis it needs to issue the warning for them. No phis - no warning. In particular, it doesn't deal with register asm variables (see gcc.target/i386/attr-returns_tw

[PATCH 2/3] Remove the old implementation of -Wclobbered

2019-10-03 Thread Vladislav Ivanishin
This patch removes the old implementation of the warning on RTL. Note: regstat_get_setjmp_crosses() and the associated data seems to be needed for the RA itself, so I am not touching that. >From c86a8fdc3f91d3cd33d73c7063bb9be2a7ae7e1f Mon Sep 17 00:00:00 2001 From: Vladislav Ivanishin Date: Thu

[PATCH 1/3] Make gsi_next_nonvirtual_phi do what one expects

2019-10-03 Thread Vladislav Ivanishin
This refactoring makes gsi_next_nonvirtual_phi() always advance the gimple phi iterator (regardless of whether the current phi is virtual or not). It matches the behavior of other gsi_next functions. It can be applied independently of the other patches (but patch 3 depends on this one). I regstr

Reimplementation of -Wclobbered on GIMPLE SSA

2019-10-03 Thread Vladislav Ivanishin
Hi! This series implements the -Wclobbered warning on GIMPLE in place of the old RTL implementation. This cover letter contains a high-level explanation of what is going on and why. The new implementation itself is in the patch 3. I will post the details in the accompanying blurb. The most obv

Re: [PATCH target/86811] Mark VAX as not needing speculation barriers

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 12:16:46PM +0100, Maciej W. Rozycki wrote: > On Thu, 3 Oct 2019, Segher Boessenkool wrote: > > When a (conditional) branch executes, it is detected if the branch was > > mispredicted, and if so it (and everything after it) is flushed. This is > > similar to how it was done

Re: [PATCH target/86811] Mark VAX as not needing speculation barriers

2019-10-03 Thread Maciej W. Rozycki
On Thu, 3 Oct 2019, Segher Boessenkool wrote: > > I don't think this is right. As I have just mentioned in a related > > discussion elsewhere, the NVAX and NVAX+ implementations include a branch > > predictor in their microarchitecture[1], so obviously they do execute > > speculatively. I th

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 10:52:38AM +0100, Richard Sandiford wrote: > /* Certain fixed registers might be of the class NO_REGS. This means >that not only can they not be allocated by the compiler, but >they cannot be used in substitutions or canonicalizations >either.

Re: Enabling rtl checking by default (was Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove())

2019-10-03 Thread Richard Sandiford
Jakub Jelinek writes: > On Thu, Oct 03, 2019 at 11:14:25AM +0100, Richard Sandiford wrote: >> Confusingly, it needs to be --enable-checking=yes,extra,rtl for rtl >> to be a pure addition to the default. >> >> I guess it's time for a new entry in the semi-regular series >> "should rtl checking be

Re: [PATCH target/86811] Mark VAX as not needing speculation barriers

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 03:12:34AM +0100, Maciej W. Rozycki wrote: > On Fri, 20 Sep 2019, Jeff Law wrote: > > > > According to Bob Supnik (who is a very authoritative source on VAX), > > > > > >> Funny you should ask. The short answer is no. No VAX ever did > > >> speculative or out of order exec

Re: [PATCH] Remove some restrictions from rust-demangle.

2019-10-03 Thread Eduard-Mihai Burtescu
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01469.html On Wed, Sep 25, 2019, at 8:25 PM, Eduard-Mihai Burtescu wrote: > The main change here is in the treatment of $...$ escapes. > I've relaxed the treatment of unknown escapes, during > unescaping, to continue processing the input string,

Re: Enabling rtl checking by default (was Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove())

2019-10-03 Thread Jakub Jelinek
On Thu, Oct 03, 2019 at 11:14:25AM +0100, Richard Sandiford wrote: > Confusingly, it needs to be --enable-checking=yes,extra,rtl for rtl > to be a pure addition to the default. > > I guess it's time for a new entry in the semi-regular series > "should rtl checking be enabled by default for develop

Enabling rtl checking by default (was Re: [PATCH] Use movmem optab to attempt inline expansion of __builtin_memmove())

2019-10-03 Thread Richard Sandiford
Aaron Sawdey writes: > On 10/2/19 5:35 PM, Jakub Jelinek wrote: >> On Wed, Oct 02, 2019 at 09:21:23AM -0500, Aaron Sawdey wrote: > 2019-09-27 Aaron Sawdey > > * builtins.c (expand_builtin_memory_copy_args): Add might_overlap parm. > (expand_builtin_memcpy): Use might_overlap

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Richard Sandiford
Segher Boessenkool writes: > On Wed, Oct 02, 2019 at 10:22:22PM +0100, Richard Sandiford wrote: >> My change to the -fipa-ra bookkeeping used ALL_REGS as the supposedly >> safe default assumption, but ALL_REGS isn't literally all registers, >> just a close approximation. >> >> This caused a boots

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Segher Boessenkool
On Thu, Oct 03, 2019 at 10:35:15AM +0100, Richard Earnshaw (lists) wrote: > On 03/10/2019 00:01, Segher Boessenkool wrote: > >The documentation says > > > >@findex ALL_REGS > >@findex NO_REGS > >In general, each register will belong to several classes. In fact, one > >class must be named @code{ALL

Re: Fix ALL_REGS thinko in initialisation of function_used_regs

2019-10-03 Thread Richard Earnshaw (lists)
On 03/10/2019 00:01, Segher Boessenkool wrote: On Wed, Oct 02, 2019 at 10:22:22PM +0100, Richard Sandiford wrote: My change to the -fipa-ra bookkeeping used ALL_REGS as the supposedly safe default assumption, but ALL_REGS isn't literally all registers, just a close approximation. This caused a

Re: [PATCH][RFC] Add new ipa-reorder pass

2019-10-03 Thread Andrew Pinski
On Thu, Oct 3, 2019 at 12:46 AM Fangrui Song wrote: > > > On 2019-10-03, Andrew Pinski wrote: > >On Wed, Oct 2, 2019@9:52 PM Fangrui Song wrote: > >> > >> On 2019-09-24, Martin Liška wrote: > >> >On 9/19/19 10:33 AM, Martin Liška wrote: > >> >> - One needs modified binutils and I that would proba

Re: [PATCH][RFC] Add new ipa-reorder pass

2019-10-03 Thread Fangrui Song
On 2019-10-03, Andrew Pinski wrote: On Wed, Oct 2, 2019@9:52 PM Fangrui Song wrote: On 2019-09-24, Martin Liška wrote: >On 9/19/19 10:33 AM, Martin Liška wrote: >> - One needs modified binutils and I that would probably require a configure detection. The only way >> which I see is based o

Re: [PATCH][RFC] Add new ipa-reorder pass

2019-10-03 Thread Andrew Pinski
On Wed, Oct 2, 2019 at 9:52 PM Fangrui Song wrote: > > On 2019-09-24, Martin Liška wrote: > >On 9/19/19 10:33 AM, Martin Liška wrote: > >> - One needs modified binutils and I that would probably require a > >> configure detection. The only way > >> which I see is based on ld --version. I'm plan