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

2020-09-10 Thread Richard Biener
On Thu, 10 Sep 2020, Kito Cheng wrote: > In g:70cdb21e579191fe9f0f1d45e328908e59c0179e, DECL/global variable has > handled > misaligned stores, but it didn't handle PARALLEL values, and I refer the > other part of this function, I found the PARALLEL need handled by > emit_group_* functions, so I

Re: [PATCH][libatomic] Add nvptx support

2020-09-10 Thread Tobias Burnus
Hi all, hello Tom, On 9/8/20 8:51 AM, Tom de Vries wrote: Add nvptx support to libatomic. I have tried tried this patch together with the latest patch for/of PR97000 for tree-cfgcleanup.c on tree-cfgcleanup.c: Now, I only see the expected failures and the compare_and_swap issue in the testsui

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

2020-09-10 Thread Kito Cheng
Hi Richard: Thanks for your review :) > riscv doesn't seem to have movmisalign and I don't see why movmisalign > should not support a TImode parallel RHS so at least you should > put this check after the icode != CODE_FOR_nothing check? RISC-V has an option `-mno-strict-align` to enable mis-alig

[PATCH] lto: Stream current working directory for first streamed relative filename and adjust relative paths [PR93865]

2020-09-10 Thread Jakub Jelinek via Gcc-patches
Hi! If the gcc -c -flto ... commands to compile some or all objects are run in a different directory (or in different directories) from the directory in which the gcc -flto link line is invoked, then the .debug_line will be incorrect if there are any relative filenames, it will use those relative

[PATCH] arm: Fix up arm_override_options_after_change_1

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 08, 2020 at 10:45:12AM +0200, Jakub Jelinek via Gcc-patches wrote: > Looking further at arm_override_options_after_change_1, it also seems to be > incorrect, rather than testing > !opts->x_str_align_functions > it should be really testing > !opts_set->x_str_align_functions > and get &gl

Re: [PATCH] fix useless unsharing of SLP tree

2020-09-10 Thread Richard Sandiford
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 x86_64-unknown-linux-gnu, pushed. > > 2020-09-09 Richard Biener > > * tree-vect-slp.c (vect_attempt_sl

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

2020-09-10 Thread Richard Biener
On Thu, 10 Sep 2020, Kito Cheng wrote: > Hi Richard: > > Thanks for your review :) > > > riscv doesn't seem to have movmisalign and I don't see why movmisalign > > should not support a TImode parallel RHS so at least you should > > put this check after the icode != CODE_FOR_nothing check? > > R

Re: [PATCH] fix useless unsharing of SLP tree

2020-09-10 Thread Richard Biener
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 x86_64-unknown-linux-gnu, pushed. > > > > 2020-09-09

[Patch] libgomp/target.c: Minor cleanup

2020-09-10 Thread Tobias Burnus
Hi Jakub, hello all, when looking at target.c, I stumbled over that code: size_t mapnum → unsigned if (mapnum == 0) ... return; if (mapnum > 0 || ) ... I fail to see how the latter condition can ever become false; hence, I removed the "if" and used the if-body uncondition

Re: [PATCH] lto: Stream current working directory for first streamed relative filename and adjust relative paths [PR93865]

2020-09-10 Thread Richard Biener
On Thu, 10 Sep 2020, Jakub Jelinek wrote: > Hi! > > If the gcc -c -flto ... commands to compile some or all objects are run in a > different directory (or in different directories) from the directory in > which the gcc -flto link line is invoked, then the .debug_line will be > incorrect if there

Re: [PATCH] tree-optimization/96043 - BB vectorization costing improvement

2020-09-10 Thread Richard Biener
On Wed, 9 Sep 2020, Michael Matz wrote: > Hello, > > On Tue, 8 Sep 2020, Richard Biener wrote: > > > CCing some people to double-check my graph partitioning algorithm. > > I seem to not know the pre-existing data structures enough to say anything > about this, but I noticed small things which

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

2020-09-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 11:17:34AM +0200, Tobias Burnus wrote: > Hi Jakub, hello all, > > when looking at target.c, I stumbled over that code: > size_t mapnum → unsigned > if (mapnum == 0) > ... > return; > > if (mapnum > 0 || ) > ... But it is not mapnum > 0 here but mapn

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

2020-09-10 Thread Richard Sandiford
Aaron Sawdey writes: > Now that the documentation for partial modes says they have a known > number of bits of precision, would it make sense for extract_low_bits to > check this before attempting to extract the bits? > > This would solve the problem we have been having with POImode and > extract_

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

2020-09-10 Thread Richard Biener via Gcc-patches
On Wed, Sep 9, 2020 at 8:28 PM Aaron Sawdey via Gcc-patches wrote: > > Now that the documentation for partial modes says they have a known > number of bits of precision, would it make sense for extract_low_bits to > check this before attempting to extract the bits? > > This would solve the problem

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

2020-09-10 Thread Eric Botcazou
> I'd say there must be (wishful thinking) some expand_expr > modifier that guarantees this? Alternatively use > > reg = force_reg (mode, reg); > > instead of assign_stack_temp & emit_group_store? > > That said, I don't know very much about the fancy ways to handle > stores from PARALLEL -

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 / Germany

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 th

[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 >From

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 transformati

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 assig

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 = expand_ex

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, ye

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 (un

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, a

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; >> | ^ >> /vol/gcc/src/hg/master/local/libp

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 x86_64-unknown-linux-g

[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: 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

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 instruc

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 ae6cf62861b5e9acb5

[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. --- gcc/testsuite/gcc.dg/an

[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 test-ca

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

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 ab

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

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 u

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 that

[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 t

[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 ex

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

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 Gcc-

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 > inappropri

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.

[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 unrela

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 ex

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 kernel

[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 siz

[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 remo

[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 fo

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 arm_override_options_after_chang

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 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 &global_options_set or similar passed to it as additional opts_set > > > arg

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 wrote

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 basic_s

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 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 basic_streambuf

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 (ost

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 Ther

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 before

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 hea

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, contrib

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 Schwinge

[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 a/gcc/ada/gcc-interf

[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 Eri

[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 tak

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 ear

[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 regres

[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 Ia

[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 20

[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++: 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 -

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

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 de

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

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 aft

[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 h

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

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 th

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 te

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 cu

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, ye

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? >

[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] 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 mul

[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 b6b9fd4af9ac46a8bb19a906e4c2afa14da91017

[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 of

[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 C+

[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 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 2

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 +0200

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 (root).

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 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: [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 rs6000_e

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 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. Becau

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] 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 > > > > analysi

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) u

  1   2   >