[committed][nvptx] Fix UB in nvptx_assemble_value

2020-09-10 Thread Tom de Vries
[ was: Re: [committed][nvptx] Fix printing of 128-bit constant ] On 9/10/20 10:26 PM, Jakub Jelinek wrote: > On Thu, Sep 10, 2020 at 09:31:33PM +0200, Tom de Vries wrote: >> Currently, for this code from c-c++-common/spec-barrier-1.c: >> ... >> __int128 g = 9; >> ... >> we generate: >> ... >> //

[committed][nvptx] Fix printing of 128-bit constant (negative case)

2020-09-10 Thread Tom de Vries
[ was: Re: [committed][nvptx] Fix printing of 128-bit constant ] On 9/10/20 10:26 PM, Jakub Jelinek wrote: > On Thu, Sep 10, 2020 at 09:31:33PM +0200, Tom de Vries wrote: >> Currently, for this code from c-c++-common/spec-barrier-1.c: >> ... >> __int128 g = 9; >> ... >> we generate: >> ... >> //

[PATCH][PR96791] disable POImode ld/st for memcpy [committed]

2020-09-10 Thread Aaron Sawdey via Gcc-patches
This is a (hopefully temporary) fix to PR96791. This will make the default be -mno-block-ops-vector-pair even on power10, so we will not hit the issue of DSE trying to truncate a POImode register. I am still concerned it will be possible to hit this because the MMA builtins will also generate

[PATCH] c++: Remove LOOKUP_CONSTINIT.

2020-09-10 Thread Marek Polacek via Gcc-patches
Since we now have DECL_DECLARED_CONSTINIT_P, we no longer need LOOKUP_CONSTINIT. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: * cp-tree.h (LOOKUP_CONSTINIT): Remove. (LOOKUP_REWRITTEN): Adjust. * decl.c (duplicate_decls): Set

[committed] analyzer: stricter handling of non-pure builtins [PR96798]

2020-09-10 Thread David Malcolm via Gcc-patches
Amongst other things PR analyzer/96798 notes that region_model::on_call_pre treats any builtin that hasn't been coded yet as a no-op (albeit with an unknown return value), which is wrong for non-pure builtins. This patch updates that function's handling of such builtins so that it instead

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Qing Zhao via Gcc-patches
> On Sep 10, 2020, at 5:05 PM, Segher Boessenkool > wrote: > > On Tue, Sep 08, 2020 at 11:43:30AM -0500, Qing Zhao wrote: >>> On Sep 7, 2020, at 10:58 AM, H.J. Lu wrote: >>> On Mon, Sep 7, 2020 at 7:06 AM Segher Boessenkool >>> mailto:seg...@kernel.crashing.org>> wrote: On Fri, Sep 04,

[PATCH] fortran, openmp: PR fortran/93660 Fix ICE when coarrays used with 'omp declare simd'

2020-09-10 Thread Kwok Cheung Yeung
Hello The ICE from the test case in PR93660 is due to the hidden caf_token and caf_offset parameters generated by the Fortran front end due to the use of coarrays: chain >> ... arguments type integer(kind=4)> ... readonly used unsigned DI

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Qing Zhao via Gcc-patches
> On Sep 10, 2020, at 2:07 PM, Kees Cook wrote: > > [tried to clean up quoting...] > > On Tue, Sep 08, 2020 at 10:00:09AM -0500, Qing Zhao wrote: >> >>> On Sep 7, 2020, at 8:06 AM, Rodriguez Bahena, Victor >>> wrote: >>> > On Thu, Sep 03, 2020 at 09:29:54AM -0500, Qing Zhao wrote:

Re: [PATCH V2] libgccjit: Add new gcc_jit_context_new_blob entry point

2020-09-10 Thread David Malcolm via Gcc-patches
On Wed, 2020-08-19 at 09:17 +0200, Andrea Corallo wrote: > David Malcolm writes: > > > Thanks for the updated patch. Comments inline below. > > Hi Dave, > > sorry for the late reply. Likewise, sorry. [...] > > Why the non-void return type? Looking at libgccjit.c I see it returns > >

[PATCH] c++: Fix P0846 (ADL and function templates) in template [PR97010]

2020-09-10 Thread Marek Polacek via Gcc-patches
To quickly recap, P0846 says that a name is also considered to refer to a template if it is an unqualified-id followed by a < and name lookup finds either one or more functions or finds nothing. In a template, when parsing a function call that has type-dependent arguments, we can't perform ADL

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Segher Boessenkool
On Tue, Sep 08, 2020 at 11:43:30AM -0500, Qing Zhao wrote: > > On Sep 7, 2020, at 10:58 AM, H.J. Lu wrote: > > On Mon, Sep 7, 2020 at 7:06 AM Segher Boessenkool > > mailto:seg...@kernel.crashing.org>> wrote: > >> On Fri, Sep 04, 2020 at 11:52:13AM -0700, H.J. Lu wrote: > >>> On Fri, Sep 4, 2020

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Segher Boessenkool
On Tue, Sep 08, 2020 at 09:55:19AM -0500, Qing Zhao wrote: > Downloading this paper form IEEE needs a fee. Yes, and we cannot discuss it here. > What other information you need to show the effective of mitigation ROP > attack? Anything that we *can* talk about. Stuff we cannot talk about does

[PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-10 Thread Peter Bergner via Gcc-patches
Generating arbitrary 64-bit constants on POWER can take up to 5 instructions. However, some special constants can be generated in fewer instructions. One special class of constants we don't handle, is constants that have one set of consecutive 1-bits. These can be generated with a "li rT,-1"

Re: [PATCH 3/4] PowerPC: Add power10 xsmaxcqp/xsmincqp support

2020-09-10 Thread Segher Boessenkool
Hi! On Wed, Aug 26, 2020 at 10:45:26PM -0400, Michael Meissner wrote: > * config/rs6000/rs6000.md (FSCALAR): New mode iterator for floating > point scalars. We have the long-established SFDF for a very similar thing. So maybe just call this SFDFTF or SDTF or something?

Re: [committed][nvptx] Fix printing of 128-bit constant

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 09:31:33PM +0200, Tom de Vries wrote: > Currently, for this code from c-c++-common/spec-barrier-1.c: > ... > __int128 g = 9; > ... > we generate: > ... > // BEGIN GLOBAL VAR DEF: g > .visible .global .align 8 .u64 g[2] = { 9, 9 }; > ... > and consequently the test-case

Re: [PATCH 3/4] PowerPC: Add power10 xsmaxcqp/xsmincqp support

2020-09-10 Thread Segher Boessenkool
On Fri, Aug 28, 2020 at 12:09:48AM -0400, Michael Meissner wrote: > On Thu, Aug 27, 2020 at 03:47:19PM -0500, will schmidt wrote: > > > (Fm): New mode attribute for floating point scalars. > > > > Mixed feels on mixed case, but I defer. :-) > > It is similar to other mode attributes (Ff, Fv)

Re: [PATCH] c-family: Macro support in -Wmisleading-indentation [PR80076]

2020-09-10 Thread Patrick Palka via Gcc-patches
On Thu, 10 Sep 2020, David Malcolm wrote: > On Tue, 2020-07-28 at 20:22 -0400, Patrick Palka wrote: > > On Tue, 28 Jul 2020, David Malcolm wrote: > > > > > On Tue, 2020-07-28 at 15:50 -0400, Patrick Palka wrote: > > > > Currently the -Wmisleading-indentation warning doesn't do any > > > >

Re: [PATH 3/3] libstdc++: Add std::advance ostreambuf_iterator overload

2020-09-10 Thread François Dumont via Gcc-patches
On 10/09/20 5:19 pm, Jonathan Wakely wrote: On 09/09/20 22:12 +0200, François Dumont via Libstdc++ wrote: libstdc++: Add std::advance overload for ostreambuf_iterator Implement std::advance overload for ostreambuf_iterator using basic_streambuf pubseekof. libstdc++-v3/ChangeLog:      

[committed][nvptx] Fix printing of 128-bit constant

2020-09-10 Thread Tom de Vries
Hi, Currently, for this code from c-c++-common/spec-barrier-1.c: ... __int128 g = 9; ... we generate: ... // BEGIN GLOBAL VAR DEF: g .visible .global .align 8 .u64 g[2] = { 9, 9 }; ... and consequently the test-case fails in execution. The problem is caused by a shift in nvptx_assemble_value:

Re: [PATCH 2/4] PowerPC: Rename functions for min, max, cmove

2020-09-10 Thread Segher Boessenkool
On Wed, Aug 26, 2020 at 10:44:22PM -0400, Michael Meissner wrote: > PowerPC: Rename functions for min, max, cmove. > > This patch renames the functions that generate the ISA 3.0 C minimum, C > maximum, and conditional move instructions to use a better name than just > using > a _p9 suffix.

Re: [PATH 1/3] libstdc++: Simplify std::copy istreambuf_iterator overload

2020-09-10 Thread François Dumont via Gcc-patches
On 10/09/20 5:05 pm, Jonathan Wakely wrote: On 09/09/20 22:11 +0200, François Dumont via Libstdc++ wrote: libstdc++: Use only public basic_streambuf methods in __copy_move_a2 overload __copy_move_a2 for istreambuf_iterator can be implemented using public basic_streambuf in_avail and sgetn so

Re: [PATCH 2/4] PowerPC: Rename functions for min, max, cmove

2020-09-10 Thread Segher Boessenkool
On Thu, Aug 27, 2020 at 03:47:15PM -0500, will schmidt wrote: > On Wed, 2020-08-26 at 22:44 -0400, Michael Meissner via Gcc-patches wrote: > > * config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): Rename to > > maybe_emit_fp_c_minmax. > ok > > > (maybe_emit_fp_c_minmax): Rename

Re: [PATCH 1/4] PowerPC: Change cmove function return to bool

2020-09-10 Thread Segher Boessenkool
On Wed, Aug 26, 2020 at 10:43:23PM -0400, Michael Meissner wrote: > * config/rs6000/rs6000-protos.h (rs6000_emit_cmove): Change return > type to bool. > (rs6000_emit_int_cmove): Change return type to bool. > * config/rs6000/rs6000.c (rs6000_emit_cmove): Change return type >

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Kees Cook via Gcc-patches
[tried to clean up quoting...] On Tue, Sep 08, 2020 at 10:00:09AM -0500, Qing Zhao wrote: > > > On Sep 7, 2020, at 8:06 AM, Rodriguez Bahena, Victor > > wrote: > > > >>> On Thu, Sep 03, 2020 at 09:29:54AM -0500, Qing Zhao wrote: > >>> So, my question is: > >>> > >>> From the security point of

Re: [PATCH] lto: Fix up lto location streaming

2020-09-10 Thread Richard Biener
On September 10, 2020 8:39:20 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, Sep 10, 2020 at 05:32:58PM +0200, Jakub Jelinek via Gcc-patches >wrote: >> 2020-09-10 Jakub Jelinek >> >> * lto-streamer-out.c (collect_block_tree_leafs): Recurse on >> root rather than BLOCK_SUBBLOCKS

Re: [PATCH] lto: Fix up lto location streaming

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 05:32:58PM +0200, Jakub Jelinek via Gcc-patches wrote: > 2020-09-10 Jakub Jelinek > > * lto-streamer-out.c (collect_block_tree_leafs): Recurse on > root rather than BLOCK_SUBBLOCKS (root). > > --- gcc/lto-streamer-out.c.jj 2020-09-10 15:52:36.401413518

[committed 5/5] libstdc++: Fix -Wsign-compare warnings

2020-09-10 Thread Jonathan Wakely via Gcc-patches
* include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all): Add casts to compare types of the same signedness. Tested powerpc64le-linux. Committed to trunk. commit 1d5589d11e61fa78b0c0e845728412b1cc6043d8 Author: Jonathan Wakely Date: Thu Sep 10 18:57:39

[committed 4/5] libstdc++: Fix -Wunused-local-typedefs warning

2020-09-10 Thread Jonathan Wakely via Gcc-patches
* include/bits/ranges_algobase.h (__equal_fn): Remove unused typedef. Tested powerpc64le-linux. Committed to trunk. commit 866c53cb2e88e172476185327723df9197c34ae7 Author: Jonathan Wakely Date: Thu Sep 10 18:57:05 2020 libstdc++: Fix -Wunused-local-typedefs warning

[committed 2/5] libstdc++: Fix macro redefinition warnings

2020-09-10 Thread Jonathan Wakely via Gcc-patches
Including after gives a warning about redefining the __cpp_lib_array_constexpr macro. What happens is that sets the C++20 value, then redefines it to the C++17 value, then undefines it and defines it again to the C++20 value. This change avoids defining it to the C++17 value when compiling

[committed 2/5] libstdc++: Fix -Wdeprecated-declarations warnings

2020-09-10 Thread Jonathan Wakely via Gcc-patches
* include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&)) (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress warnings for uses of std::auto_ptr. * include/experimental/type_traits (is_literal_type_v): Likewise, for use

[committed 1/5] libstdc++: Fix -Wnarrowing warnings

2020-09-10 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/fs_path.h (path::_List::type()): Avoid narrowing conversion. * include/std/chrono (operator+(const year&, const years&)): Likewise. Tested powerpc64le-linux. Committed to trunk. commit

Re: [PATCH] aarch64: Add extend-as-extract-with-shift pattern [PR96998]

2020-09-10 Thread Richard Sandiford
Alex Coplan writes: > Hello, > > Since r11-2903-g6b3034eaba83935d9f6dfb20d2efbdb34b5b00bf introduced a > canonicalization from mult to shift on address reloads, a missing > pattern in the AArch64 backend was exposed. > > In particular, we were missing the ashift variant of > *add__multp2 (this

[PATCH] libstdc++: Install precompiled header

2020-09-10 Thread Jonathan Wakely via Gcc-patches
This header was added to the source tree years ago, but doesn't actually get precompiled or installed when building the library. This change installs it alongside the other precompiled headers, and also updates it to include the Filesystem TS and all LFTS headers (but not the Networking TS ones).

Re: [Patch 4/5] rs6000, Test 128-bit shifts for just the int128 type.

2020-09-10 Thread Segher Boessenkool
Hi! On Wed, Aug 26, 2020 at 01:27:44PM -0700, Carl Love wrote: > > > @@ -367,7 +367,7 @@ > > > UNSPEC_INSERTR > > > UNSPEC_REPLACE_ELT > > > UNSPEC_REPLACE_UN > > > - UNSPEC_XXSWAPD_V1TI > > > + UNSPEC_XXSWAPD_VEC_I128 > > > > Why not just UNSPEC_XXSWAPD? And, why an unspec at all?

Re: [Patch 3/5] rs6000, Add TI to TD (128-bit DFP) and TD to TI support

2020-09-10 Thread Segher Boessenkool
(Long ago...) On Wed, Aug 26, 2020 at 11:23:45AM -0700, Carl Love wrote: (Lots of context, thanks!) > So, do we want to drop the option OPTION_MASK_TI_VECTOR_OPS at this > point and go with just TARGET_POWER10? It has no value anymore now, as far as I can see? So deleting it would be good,

Re: c++: TINFO_VAR_DECLARED_CONSTINIT -> DECL_DECLARED_CONSTINIT_P

2020-09-10 Thread Marek Polacek via Gcc-patches
On Thu, Sep 10, 2020 at 01:31:13PM -0400, Nathan Sidwell wrote: > On 9/10/20 12:58 PM, Marek Polacek via Gcc-patches wrote: > > On Thu, Sep 10, 2020 at 12:39:36PM -0400, Nathan Sidwell wrote: > > > > > > We need to record whether template function-scope static decls are > > > constinit. That's

Re: c++: TINFO_VAR_DECLARED_CONSTINIT -> DECL_DECLARED_CONSTINIT_P

2020-09-10 Thread Nathan Sidwell
On 9/10/20 12:58 PM, Marek Polacek via Gcc-patches wrote: On Thu, Sep 10, 2020 at 12:39:36PM -0400, Nathan Sidwell wrote: We need to record whether template function-scope static decls are constinit. That's currently held on the var's TEMPLATE_INFO data. But I want to get rid of such decl's

Re: gcc git hook

2020-09-10 Thread Nathan Sidwell
On 9/10/20 1:21 PM, Joseph Myers wrote: On Thu, 10 Sep 2020, Nathan Sidwell wrote: Is it possible for the git hooks to reject pushes with overly-long subject lines? I occasionally see pushes that forgot to add a separate title line, and so the whole of the commit description gets used. Is

Re: gcc git hook

2020-09-10 Thread Joseph Myers
On Thu, 10 Sep 2020, Nathan Sidwell wrote: > Is it possible for the git hooks to reject pushes with overly-long subject > lines? > > I occasionally see pushes that forgot to add a separate title line, and so the > whole of the commit description gets used. Is that where the whole description is

[PATCH] Clarify the documentation for the ms_abi function attribute

2020-09-10 Thread Peter Jones via Gcc-patches
Somewhere in the process of writing the documentation for the ms_abi function attribute, there has been some (justifiable) confusion about which calling conventions are which, and the documentation currently states that on non-Windows x86 targets we default to the "x86/AMD ABI". In the past I've

Re: [PATCH] c-family: Macro support in -Wmisleading-indentation [PR80076]

2020-09-10 Thread David Malcolm via Gcc-patches
On Tue, 2020-07-28 at 20:22 -0400, Patrick Palka wrote: > On Tue, 28 Jul 2020, David Malcolm wrote: > > > On Tue, 2020-07-28 at 15:50 -0400, Patrick Palka wrote: > > > Currently the -Wmisleading-indentation warning doesn't do any > > > analysis > > > when the guarded statement or the statement

Re: c++: TINFO_VAR_DECLARED_CONSTINIT -> DECL_DECLARED_CONSTINIT_P

2020-09-10 Thread Marek Polacek via Gcc-patches
On Thu, Sep 10, 2020 at 12:39:36PM -0400, Nathan Sidwell wrote: > > We need to record whether template function-scope static decls are > constinit. That's currently held on the var's TEMPLATE_INFO data. > But I want to get rid of such decl's template header as they're not > really templates, and

c++: TINFO_VAR_DECLARED_CONSTINIT -> DECL_DECLARED_CONSTINIT_P

2020-09-10 Thread Nathan Sidwell
We need to record whether template function-scope static decls are constinit. That's currently held on the var's TEMPLATE_INFO data. But I want to get rid of such decl's template header as they're not really templates, and they're never instantiated separately from their containing function's

Re: [PATCH] [PATCH] PR rtl-optimization/96791 Check precision of partial modes

2020-09-10 Thread Aaron Sawdey via Gcc-patches
So, would it be legitimate for extract_low_bits to query if the truncate pattern it will likely use is actually available? Aaron Sawdey, Ph.D. saw...@linux.ibm.com IBM Linux on POWER Toolchain > On Sep 10, 2020, at 10:10 AM, Segher Boessenkool > wrote: > > Hi! > > On Thu, Sep 10, 2020 at

[committed] libstdc++: Fix some -Wunused-parameter warnings

2020-09-10 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/codecvt.h (codecvt_byname): Remove names of unused parameters. Tested powerpc64le-linux. Committed to trunk. commit 36efcd7de0431b099087d8ae1ad358b0e088a250 Author: Jonathan Wakely Date: Thu Sep 10 17:09:16 2020 libstdc++: Fix some

[committed] d: Don't warn about variables initialized with 'void'

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes a useless warning in the D front-end. There is no problem with using `T var = void', it is if the variable remains uninitialized on first use that a warning should be issued. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-x32. Committed to mainline. Regards

[committed] libstdc++: Enforce LWG 3472 preconditions on std::counted_iterator

2020-09-10 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (counted_iterator): Add assertions to check preconditions added by LWG 3472. Tested powerpc64le-linux. Committed to trunk. commit afea21f9612545282db95872021d7587c9d5b0d4 Author: Jonathan Wakely Date: Thu Sep 10 17:09:15

[committed] d: Enable miscellaneous warnings by -Wextra flag

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch turns on all warnings handled by the D front-end code generator with -Wextra. These warnings are handled outside of the D core language front-end, so shouldn't be enabled by -Wall. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-x32. Committed to mainline. Regards

[committed] d: Warn when casting from a D class to a C++ class.

2020-09-10 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a missed warning opportunity when casting from a D class to a C++ class, and adds tests covering warnings within the code generator. Before, the warning was only issued when casting in the other direction. Now a warning is printed for both directions. Bootstrapped and

Re: [PATCH V2 0/4] Unify C and C++ handling of loops and switches

2020-09-10 Thread Sandra Loosemore
On 9/10/20 7:36 AM, David Malcolm wrote: BTW, in terms of analyzer issues, my big rewrite of analyzer state- tracking landed in master a month ago, on 2020-08-13 as 808f4dfeb3a95f50f15e71148e5c1067f90a126d, and changed the behavior of gcc.dg/analyzer/explode-2.c, which was one of the ones an

[Ada] Fix bogus error on Value_Size clause for variant record type

2020-09-10 Thread Eric Botcazou
This is a regression present on the mainline and 10 branch: the compiler rejects a Value_Size clause on a discriminated record type with variant. Tested on x86_64-suse-linux, applied on mainline and 10 branch. 2020-09-10 Eric Botcazou * gcc-interface/decl.c (set_rm_size): Do not

[Ada] Fix uninitialized variable with nested variant record types

2020-09-10 Thread Eric Botcazou
This fixes a wrong code issue with nested variant record types: the compiler generates move instructions that depend on an uninitialized variable, which was initially a SAVE_EXPR not instantiated early enough. Tested on x86_64-suse-linux, applied on mainline, 10 and 9 branches. 2020-09-10

[Ada] Add emergency dump after an ICE

2020-09-10 Thread Eric Botcazou
This is only for internal debugging purposes. Tested on x86_64-suse-linux, applied on the mainline. 2020-09-10 Eric Botcazou * gcc-interface/misc.c: Include tree-pass.h. (internal_error_function): Call emergency_dump_function. -- Eric Botcazoudiff --git

Re: [PATCH 0/2] [OpenACC] Kernels loop annotation

2020-09-10 Thread Sandra Loosemore
On 9/10/20 4:20 AM, Richard Biener wrote: On Wed, Sep 9, 2020 at 7:55 PM Sandra Loosemore wrote: This set of patches implements C/C++ and Fortran front end support for adding "acc loop auto" annotations to loop nests in OpenACC kernels regions. For background on this, refer to Thomas

Re: [PATCH] libstdc++: add parentheses around assignments used as truth values

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 13:26 +0200, Krystian Kuźniarek via Libstdc++ wrote: Hi, A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wparentheses in system headers. Thanks, I'll commit this one too. Testcases: N/A, it's only a warning. ChangeLog: Sorry,

Re: [PATCH] libstdc++: fix misleading indentation

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 13:26 +0200, Krystian Kuźniarek via Libstdc++ wrote: Hi, First of all, sorry, I must have sent it as quoted-printable so spaces and tabs are preserved. A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wmisleading-indentation in system

Re: [PATCH] lto: Fix up lto location streaming

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 04:09:24PM +0200, Richard Biener wrote: > So we're usually streaming the bits and the tree portion of SCCs > separately so I really wonder how we can end up with recursion here? > For stmts they should only refer to BLOCKs also in the BLOCK tree > which is streamed in

Re: [PATCH] libstdc++: mark variables as possibly unused

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 28/08/20 08:40 +0200, Krystian Kuźniarek via Libstdc++ wrote: Test suite confirmation: All tests pass. Tested on both Manjaro and some Ubuntu 18.04 with gcc10 and gcc8 respectively. Thanks. Jonathan, one more thing. I hope it's what you asked for cause all I did was: make bootstrap

Re: [PATH 3/3] libstdc++: Add std::advance ostreambuf_iterator overload

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 09/09/20 22:12 +0200, François Dumont via Libstdc++ wrote: libstdc++: Add std::advance overload for ostreambuf_iterator Implement std::advance overload for ostreambuf_iterator using basic_streambuf pubseekof. libstdc++-v3/ChangeLog:         * include/bits/streambuf_iterator.h

Re: [PATH 2/3] libstdc++: Simplify std::advance istreambuf_iterator overload

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 09/09/20 22:12 +0200, François Dumont via Libstdc++ wrote: libstdc++: Use only public basic_streambuf methods in std::advance overload std::advance overload for istreambuf_iterator can be implemented using basic_streambuf public pubseekoff method so that it doesn't have to be

Re: [PATCH] [PATCH] PR rtl-optimization/96791 Check precision of partial modes

2020-09-10 Thread Segher Boessenkool
Hi! On Thu, Sep 10, 2020 at 04:33:30PM +0200, Richard Biener wrote: > On Thu, Sep 10, 2020 at 4:22 PM Aaron Sawdey wrote: > > If it feels like a hack, that would because it is a hack. > > > > What I’d really like to discuss is how to accomplish the real goal: keep > > anything from trying to do

Re: [PATH 1/3] libstdc++: Simplify std::copy istreambuf_iterator overload

2020-09-10 Thread Jonathan Wakely via Gcc-patches
On 09/09/20 22:11 +0200, François Dumont via Libstdc++ wrote: libstdc++: Use only public basic_streambuf methods in __copy_move_a2 overload __copy_move_a2 for istreambuf_iterator can be implemented using public basic_streambuf in_avail and sgetn so that __copy_move_a2 do not need to be

RE: [PATCH] arm: Fix up arm_override_options_after_change_1

2020-09-10 Thread Kyrylo Tkachov
> -Original Message- > From: Jakub Jelinek > Sent: 10 September 2020 16:02 > To: Kyrylo Tkachov > Cc: Richard Earnshaw ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] arm: Fix up arm_override_options_after_change_1 > > On Thu, Sep 10, 2020 at 02:11:25PM +, Kyrylo Tkachov

Re: [PATCH] arm: Fix up arm_override_options_after_change_1

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 02:11:25PM +, Kyrylo Tkachov wrote: > > > incorrect, rather than testing > > > !opts->x_str_align_functions > > > it should be really testing > > > !opts_set->x_str_align_functions > > > and get _options_set or similar passed to it as additional opts_set > > > argument.

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Rodriguez Bahena, Victor via Gcc-patches
-Original Message- From: Qing Zhao Date: Thursday, September 10, 2020 at 9:34 AM To: Richard Sandiford , kees Cook , "Rodriguez Bahena, Victor" Cc: Patrick McGehearty via Gcc-patches Subject: Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

Re: [PATCH] arm: Fix up arm_override_options_after_change_1

2020-09-10 Thread Jeff Law via Gcc-patches
On Thu, 2020-09-10 at 14:11 +, Kyrylo Tkachov wrote: > Hi Jakub, > > > -Original Message- > > From: Jakub Jelinek > > Sent: 10 September 2020 09:51 > > To: Richard Earnshaw ; Kyrylo Tkachov > > ; gcc-patches@gcc.gnu.org > > Subject: [PATCH] arm: Fix up

[committed 2/2] libstdc++: handle small max_blocks_per_chunk in pool resources [PR 94160]

2020-09-10 Thread Jonathan Wakely via Gcc-patches
When a pool resource is constructed with max_blocks_per_chunk=1 it ends up creating a pool with blocks_per_chunk=0 which means it never allocates anything. Instead it returns null pointers, which should be impossible. To avoid this problem, round the max_blocks_per_chunk value to a multiple of

[PATCH] aarch64: Add extend-as-extract-with-shift pattern [PR96998]

2020-09-10 Thread Alex Coplan
Hello, Since r11-2903-g6b3034eaba83935d9f6dfb20d2efbdb34b5b00bf introduced a canonicalization from mult to shift on address reloads, a missing pattern in the AArch64 backend was exposed. In particular, we were missing the ashift variant of *add__multp2 (this mult variant is redundant and was

[committed 1/2] libstdc++: Reduce monotonic_buffer_resource overallocation [PR 96942]

2020-09-10 Thread Jonathan Wakely via Gcc-patches
The primary reason for this change is to reduce the size of buffers allocated by std::pmr::monotonic_buffer_resource. Previously, a new buffer would always add the size of the linked list node (11 bytes) and then round up to the next power of two. This results in a huge increase if the expected

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Qing Zhao via Gcc-patches
Richard, Thank you! > On Sep 10, 2020, at 7:11 AM, Richard Sandiford > wrote: > > Patrick McGehearty via Gcc-patches writes: >> My understanding is this feature/flag is not intended to be "default on". >> It is intended to be used in security sensitive environments such >> as the Linux

Re: [PATCH] [PATCH] PR rtl-optimization/96791 Check precision of partial modes

2020-09-10 Thread Richard Biener via Gcc-patches
On Thu, Sep 10, 2020 at 4:22 PM Aaron Sawdey wrote: > > If it feels like a hack, that would because it is a hack. > > What I’d really like to discuss is how to accomplish the real goal: keep > anything from trying to do other operations (zero/sign extend for one) to > POImode. > > Is there an

[PATCH] libstdc++: use a link test to test for -Wl,-z,relro

2020-09-10 Thread JonY via Gcc-patches
Do a link test instead of just a grep. The linker can support multiple targets, but not all targets can use it. Cygwin/MinGW ld can support ELF but the PE format for Windows itself does not support such a feature. Attached patch OK? I'm not confident with regenerating configure due to some

Re: [PATCH] [PATCH] PR rtl-optimization/96791 Check precision of partial modes

2020-09-10 Thread Aaron Sawdey via Gcc-patches
If it feels like a hack, that would because it is a hack. What I’d really like to discuss is how to accomplish the real goal: keep anything from trying to do other operations (zero/sign extend for one) to POImode. Is there an existing mechanism for this? Thanks, Aaron Aaron Sawdey, Ph.D.

Re: [PATCH] testsuite: gimplefe-44 requires exceptions

2020-09-10 Thread Richard Biener via Gcc-patches
On Thu, Sep 10, 2020 at 4:04 PM Andrew Stubbs wrote: > > This patch prevents an ICE (segmentation fault) the occurs for amdgcn > because the test is trying to use -fexceptions which is unsupported on > the target. > > Arguably it should fail more gracefully, but either way the test is >

RE: [PATCH] arm: Fix up arm_override_options_after_change_1

2020-09-10 Thread Kyrylo Tkachov
Hi Jakub, > -Original Message- > From: Jakub Jelinek > Sent: 10 September 2020 09:51 > To: Richard Earnshaw ; Kyrylo Tkachov > ; gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: Fix up arm_override_options_after_change_1 > > On Tue, Sep 08, 2020 at 10:45:12AM +0200, Jakub Jelinek via

Re: [PATCH] lto: Fix up lto location streaming

2020-09-10 Thread Richard Biener
On Thu, 10 Sep 2020, Jakub Jelinek wrote: > Hi! > > When I've tried to backport recent LTO changes of mine, I've ran into > FAIL: g++.dg/ubsan/align-3.C -O2 -flto -fno-use-linker-plugin > -flto-partition=none output pattern test > FAIL: g++.dg/ubsan/align-3.C -O2 -flto -fuse-linker-plugin

[PATCH] testsuite: gimplefe-44 requires exceptions

2020-09-10 Thread Andrew Stubbs
This patch prevents an ICE (segmentation fault) the occurs for amdgcn because the test is trying to use -fexceptions which is unsupported on the target. Arguably it should fail more gracefully, but either way the test is inappropriate. OK to commit? Andrew testsuite: gimplefe-44 requires

[PATCH] lto: Fix up lto location streaming

2020-09-10 Thread Jakub Jelinek via Gcc-patches
Hi! When I've tried to backport recent LTO changes of mine, I've ran into FAIL: g++.dg/ubsan/align-3.C -O2 -flto -fno-use-linker-plugin -flto-partition=none output pattern test FAIL: g++.dg/ubsan/align-3.C -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects output pattern test regressions

Re: [PATCH] c-family: Macro support in -Wmisleading-indentation [PR80076]

2020-09-10 Thread Patrick Palka via Gcc-patches
On Mon, 10 Aug 2020, Patrick Palka wrote: > On Tue, 28 Jul 2020, Patrick Palka wrote: > > > Currently the -Wmisleading-indentation warning doesn't do any analysis > > when the guarded statement or the statement after it is produced by a > > macro, as the mentioned PR illustrates. This means

Re: [PATCH V2 0/4] Unify C and C++ handling of loops and switches

2020-09-10 Thread David Malcolm via Gcc-patches
On Wed, 2020-09-09 at 17:13 -0400, Jason Merrill wrote: > On 8/13/20 12:34 PM, Sandra Loosemore wrote: > > This is a revised version of the patch set originally posted > > last November: > > > > https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534142.html > > > > In addition to generally

gcc git hook

2020-09-10 Thread Nathan Sidwell
Is it possible for the git hooks to reject pushes with overly-long subject lines? I occasionally see pushes that forgot to add a separate title line, and so the whole of the commit description gets used. nathan -- Nathan Sidwell

c++: DECL_LOCAL_FUNCTION_P -> DECL_LOCAL_DECL_P

2020-09-10 Thread Nathan Sidwell
Our handling of block-scope extern decls is insufficient for modern C++, in particular modules, (but also constexprs). We mark such local function decls, and this patch extends that to marking local var decls too, so mainly a macro rename. Also, we set this flag earlier, rather than learning

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-10 Thread Richard Sandiford
Patrick McGehearty via Gcc-patches writes: > My understanding is this feature/flag is not intended to be "default on". > It is intended to be used in security sensitive environments such > as the Linux kernel where it was requested by kernel security experts. > I'm not understanding the objection

[PATCH][testsuite] Introduce effective target non_strict_prototype

2020-09-10 Thread Tom de Vries
Hi, Consider test-case gcc.c-torture/compile/pr71109.c. It contains a prototype-less declaration of foo: ... static void foo (); ... followed by a call to foo ... foo (bar, a); ... followed by the definition of foo: ... static inline void foo (int x, struct S y, struct T z) ... The

[committed][testsuite] Add missing require-effective-target allloca

2020-09-10 Thread Tom de Vries
Hi, Add a missing require-effect-target alloca directive. Tested on nvptx. Committed to trunk. Thanks, - Tom [testsuite] Add missing require-effective-target allloca gcc/testsuite/ChangeLog: * gcc.dg/analyzer/vla-1.c: Add require-effective-target alloca. ---

Re: [PATCH] Cygwin/MinGW: Do not version lto plugins

2020-09-10 Thread JonY via Gcc-patches
On 9/10/20 9:44 AM, Richard Biener wrote: >> >> I can confirm liblto is still loaded correctly from the logs, likewise >> renaming it away will cause an error. >> >> Seems to be fine on Linux. > > OK then. > > Thanks, > Richard. > Thanks for reviewing, pushed to master branch

Re: BoF DWARF5 patches (25% .debug section size reduction)

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 01:16:57PM +0200, Jakub Jelinek via Gcc-patches wrote: > As for the test assembly, I'd say we should take > #define F void foo (void) {} > F > compile it with > gcc -S -O2 -g1 -dA -gno-as-loc-support -fno-merge-debug-strings > remove .cfi_* directives, remove the ret

Re: BoF DWARF5 patches (25% .debug section size reduction)

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 09, 2020 at 09:57:54PM +0200, Mark Wielaard wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -9057,13 +9057,14 @@ possible. > @opindex gdwarf > Produce debugging information in DWARF format (if that is supported). > The value of @var{version} may be either 2, 3, 4

[committed][tree-optimization] Don't clear ctrl-altering flag for IFN_UNIQUE

2020-09-10 Thread Tom de Vries
Hi, There's an invariant for IFN_UNIQUE, listed here in gimple_call_initialize_ctrl_altering: ... /* IFN_UNIQUE should be the last insn, to make checking for it as cheap as possible. */ || (gimple_call_internal_p (stmt) && gimple_call_internal_unique_p (stmt)))

Re: [PATCH] fix useless unsharing of SLP tree

2020-09-10 Thread Richard Sandiford
Richard Biener writes: > On Thu, 10 Sep 2020, Richard Sandiford wrote: > >> Richard Biener writes: >> > This avoids unsharing the SLP tree when optimizing load permutations >> > for reductions but there is no actual permute taking place. >> > >> > Bootstrapped and tested on

Re: [PATCH] libphobos: libdruntime doesn't support shadow stack (PR95680)

2020-09-10 Thread Rainer Orth
Hi Iain, >> this patch broke Solaris/x86 bootstrap: >> >> /vol/gcc/src/hg/master/local/libphobos/libdruntime/core/thread.d:3595:23: >> error: version AsmExternal defined after use >> 3595 | version = AsmExternal; >> | ^ >>

Re: [PATCH 0/2] [OpenACC] Kernels loop annotation

2020-09-10 Thread Richard Biener via Gcc-patches
On Wed, Sep 9, 2020 at 7:55 PM Sandra Loosemore wrote: > > This set of patches implements C/C++ and Fortran front end support for > adding "acc loop auto" annotations to loop nests in OpenACC kernels > regions. For background on this, refer to Thomas Schwinge's talk from > last year's cauldron,

Re: [PATCH] vec: don't select partial vectors when looping on full vectors

2020-09-10 Thread Richard Biener
On Wed, 9 Sep 2020, Andrea Corallo wrote: > Hi all, > > this patch is meant not to generate predication in loop when the > loop is operating only on full vectors. > > Ex: > > #+BEGIN_SRC C > /* Vector length is 256. */ > void > f (int *restrict x, int *restrict y, unsigned int n) { > for

Re: [PATCH v2] rs6000: Expand vec_insert in expander instead of gimple [PR79251]

2020-09-10 Thread Richard Biener via Gcc-patches
On Wed, Sep 9, 2020 at 6:03 PM Segher Boessenkool wrote: > > On Wed, Sep 09, 2020 at 04:28:19PM +0200, Richard Biener wrote: > > On Wed, Sep 9, 2020 at 3:49 PM Segher Boessenkool > > wrote: > > > > > > Hi! > > > > > > On Tue, Sep 08, 2020 at 10:26:51AM +0200, Richard Biener wrote: > > > > Hmm,

Re: [PATCH] PR target/96759 - Handle global variable assignment from misaligned structure/PARALLEL return values.

2020-09-10 Thread Kito Cheng via Gcc-patches
Optimized version of the v2 patch, get rid of assign_stack_temp. diff --git a/gcc/expr.c b/gcc/expr.c index 1a15f24b3979..5f744a6c1b8d 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5168,7 +5168,16 @@ expand_assignment (tree to, tree from, bool nontemporal) rtx reg, mem; reg =

Re: [PATCH] PR target/96759 - Handle global variable assignment from misaligned structure/PARALLEL return values.

2020-09-10 Thread Kito Cheng via Gcc-patches
On Thu, Sep 10, 2020 at 5:41 PM Eric Botcazou wrote: > > > I'd say there must be (wishful thinking) some expand_expr > > modifier that guarantees this? Alternatively use > > > > reg = force_reg (mode, reg); I did a try, seems like force_reg didn't handle PARALLE :( > > > > instead of

Re: [RFC] Aarch64: Replace nested FP min/max with conditionals for TX2

2020-09-10 Thread Richard Biener via Gcc-patches
On Wed, Sep 9, 2020 at 5:51 PM Anton Youdkevitch wrote: > > ThunderxT2 chip has an odd property that nested scalar FP min and max are > slower than logically the same sequence of compares and branches. Always for any input data? > Here is the patch where I'm trying to implement that

[PATCH] MSP430: Add 'd', 'e', 'f' and 'g' asm operand modifiers

2020-09-10 Thread Jozef Lawrynowicz
The new operand modifiers can be used to select odd-numbered bytes of a memory reference or constant value. Successfully regtested on trunk for msp430-elf in the default, -mlarge, -mcpu=msp430 and -mlarge/-mcode-region=either/-mdata-region=either configurations. Ok for trunk? Thanks, Jozef

Re: [PATCH] Cygwin/MinGW: Do not version lto plugins

2020-09-10 Thread Richard Biener via Gcc-patches
On Thu, Sep 10, 2020 at 2:26 AM JonY <10wa...@gmail.com> wrote: > > On 9/9/20 7:32 AM, JonY wrote: > > On 9/9/20 7:21 AM, Richard Biener wrote: > >> On Wed, Sep 9, 2020 at 2:28 AM JonY via Gcc-patches > >> wrote: > >>> > >>> Hello, > >>> > >>> The lto plugis are tied to the built GCC anyway, so

Re: [Patch] libgomp/target.c: Minor cleanup

2020-09-10 Thread Tobias Burnus
On 9/10/20 11:22 AM, Jakub Jelinek wrote: But it is not mapnum > 0 here but mapnum >1 Error: need more coffee (well, tea) Thanks for both the reasoning and catching this oversight of mine. Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München /

  1   2   >