[PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Mark Eggleston
Please find attached a fix for PR95882. Tested on x86_64 with bootstrap. OK to commit and backport? Fortran  : ICE for division by zero in declaration PR95882 A length expression containing a divide by zero in a character declaration will result in an ICE if the constant is anymore complicated

Re: [PATCH] Add missing vn_reference_t::punned initialization

2020-08-24 Thread Richard Biener via Gcc-patches
On Thu, Aug 13, 2020 at 2:49 PM Martin Liška wrote: > > As mentioned in the PR, we miss one initialization of ::punned > in vn_reference_lookup_call. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK. Thanks, Richard. > Thanks, > Martin > >

Re: [PATCH, rs6000] Add non-relative jump table support on Power Linux

2020-08-24 Thread HAO CHEN GUI via Gcc-patches
Hi, I revised the patch according to the advice. The attachment is the change log and diff file. Thanks a lot. On 20/8/2020 上午 8:14, Segher Boessenkool wrote: Hi! Sorry this took so long to review. "I lost track of this patch", what can I say :-/ On Fri, Aug 14, 2020 at 03:31:05PM +0800, H

Re: [PATCH] Add support for putting jump table into relocation read-only section

2020-08-24 Thread HAO CHEN GUI via Gcc-patches
Hi, I revised the patch according to the advice. The attachment is the revised change log and diff file. Thanks a lot. Now it first judges if it's absolute jump table or not. Then decide if the relocation is needed.   abs_jump_table = (!CASE_VECTOR_PC_RELATIVE                           

Re: [PATCH] Add cold attribute to one time construction APIs

2020-08-24 Thread Richard Biener via Gcc-patches
On Tue, Aug 18, 2020 at 4:36 PM Jonathan Wakely via Gcc-patches wrote: > > On 17/08/20 18:15 +, Aditya K via Libstdc++ wrote: > >This would help compiler optimize local static objects. > > > >Added changelog. > > Please don't :-) > > GCC patch policies always said NOT to change the ChangeLog i

Re: [PATCH] Add cold attribute to one time construction APIs

2020-08-24 Thread Jan Hubicka
> On Tue, Aug 18, 2020 at 4:36 PM Jonathan Wakely via Gcc-patches > wrote: > > > > On 17/08/20 18:15 +, Aditya K via Libstdc++ wrote: > > >This would help compiler optimize local static objects. > > > > > >Added changelog. > > > > Please don't :-) > > > > GCC patch policies always said NOT to

[PATCH] Re: GCC Plugins and global_options

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 09:23:58AM +0200, Richard Biener wrote: > I'd say we ignore this since we do not provide any ABI stability guarantees. While that is true, in reality the ABI doesn't change every other week on release branches, especially the things that usual plugins care about. We don't a

Re: [PATCH PR96698] aarch64: ICE during GIMPLE pass:vect

2020-08-24 Thread Richard Biener via Gcc-patches
On Thu, Aug 20, 2020 at 4:45 AM yangyang (ET) wrote: > > Hi, > > This is a simple fix for PR96698. > > For the test case, there are two PHIs in the inner loop in pass_vect > > [local count: 719407024]: > # b_26 = PHI <0(4), b_15(10)> >

Re: [PATCH] Add cold attribute to one time construction APIs

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 10:09 +0200, Jan Hubicka wrote: On Tue, Aug 18, 2020 at 4:36 PM Jonathan Wakely via Gcc-patches wrote: > > On 17/08/20 18:15 +, Aditya K via Libstdc++ wrote: > >This would help compiler optimize local static objects. > > > >Added changelog. > > Please don't :-) > > GCC patch poli

Re: [committed] libstdc++: Make __int128 meet integer-class requirements [PR 96042]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On Sat, 22 Aug 2020 at 16:01, Marc Glisse wrote: > > On Sat, 22 Aug 2020, Jonathan Wakely via Gcc-patches wrote: > > > On Sat, 22 Aug 2020 at 13:13, Jonathan Wakely wrote: > >> > >> On Sat, 22 Aug 2020 at 10:52, Marc Glisse wrote: > >>> is there a particular reason to handle only __int128 this wa

Re: [PATCH] Add cold attribute to one time construction APIs

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 09:45 +0100, Jonathan Wakely via Libstdc++ wrote: On 24/08/20 10:09 +0200, Jan Hubicka wrote: On Tue, Aug 18, 2020 at 4:36 PM Jonathan Wakely via Gcc-patches wrote: On 17/08/20 18:15 +, Aditya K via Libstdc++ wrote: >This would help compiler optimize local static objects. > >A

[OG10][Patch, committed]

2020-08-24 Thread Tobias Burnus
devel/omp/gcc-10 = OG10; the omp-sese.c file is currenlty OG10, only. Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter commit 2a583228b0582ec37cce6cdfcc607

Re: [PATCH] arm: Fix -mpure-code support/-mslow-flash-data for armv8-m.base [PR94538]

2020-08-24 Thread Christophe Lyon via Gcc-patches
On Sat, 22 Aug 2020 at 00:44, Ramana Radhakrishnan wrote: > > On Wed, Aug 19, 2020 at 10:32 AM Christophe Lyon via Gcc-patches > wrote: > > > > armv8-m.base (cortex-m23) has the movt instruction, so we need to > > disable the define_split to generate a constant in this case, > > otherwise we get

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Richard Biener via Gcc-patches
On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches wrote: > > Hi, > > When unroll loops, if there are calls inside the loop, those calls > may raise negative impacts for unrolling. This patch adds a param > param_max_unrolled_calls, and checks if the number of calls inside > the loop bigger

Re: [PATCH] [FIX] Remove object adjustment to preserve object attributes

2020-08-24 Thread Richard Biener via Gcc-patches
On Thu, Aug 20, 2020 at 11:09 AM Petro Karashchenko via Gcc-patches wrote: > > Hello Ricard! > > Thank you very much for your reply. > The case is that currently the "uncached" attribute is used to generate > special "cache bypass" instructions instead of regular one by ARC backend. > That decisio

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

2020-08-24 Thread Richard Biener
On Tue, 11 Aug 2020, Qing Zhao wrote: > Hi, Alexandre, > > CC’ing Richard for his comments on this. > > > > On Aug 10, 2020, at 9:39 PM, Alexandre Oliva wrote: > >> I think that moving how to zeroing the registers part to each target > >> will be a better solution since each target has > >> Be

Re: [PATCH] gimple-fold: Don't optimize wierdo floating point value reads [PR95450]

2020-08-24 Thread Richard Biener
On Wed, 12 Aug 2020, Jakub Jelinek wrote: > On Wed, Aug 12, 2020 at 04:30:35PM +0200, Richard Biener wrote: > > Not a final review but if we care for this kind of normalization at all > > the we should do so consistently, thus for both encode and interpret and > > for all modes. For FP we could a

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Aldy Hernandez via Gcc-patches
On 8/21/20 1:37 AM, Martin Sebor wrote: On 8/20/20 3:00 PM, Aldy Hernandez wrote: Regardless, here are some random comments. Thanks for the careful review! diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 37214831538..bc4f409e346 100644 --- a/gcc/c-family/c-attribs

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Jan Hubicka
> On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches > wrote: > > > > Hi, > > > > When unroll loops, if there are calls inside the loop, those calls > > may raise negative impacts for unrolling. This patch adds a param > > param_max_unrolled_calls, and checks if the number of calls inside >

[PATCH] libstdc++: remove unused variables

2020-08-24 Thread Krystian Kuźniarek via Gcc-patches
Hi, A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wunused-variable in system headers. These aren't needed (i.e. no preprocessor conditions are there). Testcases: N/A, it's only a warning. ChangeLog: Sorry, contrib/mklog.py didn't quite work for me.

[PATCH] libstdc++: remove an ignored qualifier on function return type

2020-08-24 Thread Krystian Kuźniarek via Gcc-patches
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 -Wignored-qualifiers in system headers. Testcases: N/A, it's only a warning. ChangeLog: Sorry, contrib/

[PATCH] libstdc++: fix misleading indentation

2020-08-24 Thread Krystian Kuźniarek via Gcc-patches
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 headers. Testcases: N/A, it's only a warning. ChangeLog: Sorry, cont

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

2020-08-24 Thread Krystian Kuźniarek via Gcc-patches
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 -Wunused-variable and -Wunused-parameter in system headers. These are needed either for: 1) __glibcxx_ass

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

2020-08-24 Thread Krystian Kuźniarek via Gcc-patches
Hi, A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wparentheses in system headers. Testcases: N/A, it's only a warning. ChangeLog: Sorry, contrib/mklog.py didn't quite work for me. For some reason after instruction in line 129: "diff = PatchSet(data

Re: [PATCH] libstdc++: remove an ignored qualifier on function return type

2020-08-24 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 -Wignored-qualifiers in system headers

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

2020-08-24 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 -Wunused-variable and -Wunused-paramet

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi wrote: > > This patch series add a new flag "-fparallel-jobs=" to control if the > compiler should try to compile the current file in parallel. > > There are three modes which is supported by now: > > 1. -fparallel-jobs=: Try to compile the file

BoF DWARF5 patches

2020-08-24 Thread Mark Wielaard
Hi, This afternoon there will be a BoF at the virtual Cauldron about DWARF5 and beyond. https://linuxplumbersconf.org/event/7/contributions/746/ Here are some patches for GCC that I would like to discuss. I'll reply to them after the BoF with any comments people made. Cheers, Mark

[PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Mark Wielaard
DWARF5 makes it possible to read loclists tables without consulting the debuginfo tree by introducing a table header. Adding location views breaks this (at least for binutils and elfutils). So don't enable variable-location-views by default if DWARF5 or higher is selected. --- gcc/doc/invoke.texi

[PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Mark Wielaard
Some DWARF tests scan the assembly output looking for constant values. When using DWARF5 those constants might use DW_FORM_implicit_const, which are output (in the comments) after the attribute instead of before. To make sure these tests work introduce a -gdwarf-5 variant of these tests and explici

[PATCH 5/5] Add --gdwarf-5 to ASM_SPEC

2020-08-24 Thread Mark Wielaard
This is needed to get DWARF version 5 .debug_line tables. It is also obviously wrong. It needs a check for whether as supports --gdwarf- for all versions we support and it should only be added when generating DWARF debug information for the specific DWARF version we are generating. It also needs s

[PATCH 4/5] Default to DWARF5

2020-08-24 Thread Mark Wielaard
--- gcc/common.opt | 2 +- gcc/doc/invoke.texi | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index 513125f0c00b..05e4e0638ecb 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3144,7 +3144,7 @@ Common Driver JoinedOrMissing Negati

[PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Mark Wielaard
In DWARF5 class variables (static data members) are represented with a DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't optimized away in the constexpr-var-1.C testcase so we can still match (2) const_expr in the the assembly output. Note that the same issue causes some fai

[PATCH] Fix ICE.

2020-08-24 Thread Hongtao Liu via Gcc-patches
Hi: This patch is to fix a typo in my last patch [1]. [1] https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551982.html Bootstrap is ok, gcc regression test hosted on CLX for i386/x86-64 backend is ok. Ok for trunk? gcc/ChangeLog: PR target/96755 * config/i386/sse.md:

Re: [PATCH 1/6] Modify gcc driver for parallel compilation

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi wrote: > > Update the driver for parallel compilation. This process work as > follows: > > When calling gcc, the driver will check if the flag > "-fparallel-jobs" was provided by the user. If yes, then we will > check what is the desired output,

Re: [PATCH 4/6] Add `+' for Jobserver Integration

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:34 AM Joseph Myers wrote: > > On Thu, 20 Aug 2020, Giuliano Belinassi via Gcc-patches wrote: > > > libbacktrace/Makefile.in | 2 +- > > zlib/Makefile.in | 64 ++-- > > These directories use makefiles generated by automake. Rather than > modifying the

[PATCH] x86: Use -march=x86-64/-march=i386 in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Sun, Aug 23, 2020 at 9:03 AM Uros Bizjak wrote: > > On Sun, Aug 23, 2020 at 5:23 PM H.J. Lu wrote: > > > > On Sun, Aug 23, 2020 at 10:18:28AM +0200, Uros Bizjak wrote: > > > On Sat, Aug 22, 2020 at 9:09 PM H.J. Lu wrote: > > > > > > > > > Compile CPUID check with "-mno-sse -mfpmath=387" to di

c++: overload dumper

2020-08-24 Thread Nathan Sidwell
I frequently need to look at overload sets, and debug_node spews more information than is useful, most of the time. Here's a dumper for overloads, that just tells you their full name and where they came from. gcc/cp * ptree.c (debug_overload): New. pushed -- Nathan Sidwell diff

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

2020-08-24 Thread Rodriguez Bahena, Victor via Gcc-patches
-Original Message- From: Segher Boessenkool Date: Wednesday, August 19, 2020 at 5:58 PM To: Qing Zhao Cc: Richard Biener , Jeff Law , Uros Bizjak , "H. J. Lu" , Jakub Jelinek , GCC Patches , Kees Cook , "Rodriguez Bahena, Victor" Subject: Re: PING [Patch][Middle-end]Add -fzero-ca

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

2020-08-24 Thread Rodriguez Bahena, Victor via Gcc-patches
From: Qing Zhao Date: Wednesday, August 19, 2020 at 6:28 PM To: Segher Boessenkool , "Rodriguez Bahena, Victor" Cc: Richard Biener , Jeff Law , Uros Bizjak , "H. J. Lu" , Jakub Jelinek , GCC Patches , Kees Cook Subject: Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|

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

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 5:50 AM, Richard Biener wrote: > > On Tue, 11 Aug 2020, Qing Zhao wrote: > >> Hi, Alexandre, >> >> CC’ing Richard for his comments on this. >> >> >>> On Aug 10, 2020, at 9:39 PM, Alexandre Oliva wrote: I think that moving how to zeroing the registers part to eac

Re: [PATCH] x86: Use -march=x86-64/-march=i386 in

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > #pragma GCC push_options > > #pragma GCC target("general-regs-only") > > > > #include > > > > void cpuid_check () > > ... > > > > #pragma GCC pop_options > > > > >footnote

Re: [PATCH] Fix ICE.

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 3:03 PM Hongtao Liu wrote: > > Hi: > This patch is to fix a typo in my last patch [1]. > [1] https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551982.html > > Bootstrap is ok, gcc regression test hosted on CLX for i386/x86-64 > backend is ok. > Ok for trunk? > >

[PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Martin Jambor
Hi, I must admit I was quite surprised to see that SRA does not disqualify an aggregate from any transformations when it encounters an offset for which get_ref_base_and_extent returns a negative offset. It may not matter too much because I sure hope such programs always have undefined behavior (S

Re: [PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 21/08/20 09:37 -0300, Alexandre Oliva wrote: On Dec 20, 2019, Jonathan Wakely wrote: On 10/12/19 15:58 +0100, Corentin Gay wrote: This patch was tested on x86_64-linux and is part of our nightly testing on all platforms, including VxWorks. Was it tested on AIX? I think dg-require-gth

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Hi, Richi. On 08/24, Richard Biener wrote: > On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi > wrote: > > > > This patch series add a new flag "-fparallel-jobs=" to control if the > > compiler should try to compile the current file in parallel. > > > > There are three modes which is supported

[committed] libstdc++: Make variant_npos conversions explicit [PR 96766]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/96766 * include/std/variant (_Variant_storage): Replace implicit conversions from size_t to __index_type with explicit casts. This fixes a silly Clang UBsan warning from its silly unsigned-integer-overflow sanitizer which complains abou

Re: [PATCH] libstdc++: Fix iota_view::size() to avoid overflow

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 20/08/20 19:54 +0100, Jonathan Wakely wrote: This avoids overfow that occurs when negating the most negative value of an integral type. Also prevent returning signed int when the values have lower rank and promote to int. libstdc++-v3/ChangeLog: * include/std/ranges (ranges::iota_vi

[committed] libstdc++: Fix std::indirectly_readable ambiguity [LWG 3446]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
This implements the proposed resolution of LWG 3446. I'm also adding another new constrained specialization which isn't proposed by 3446, to resolve the ambiguity when a type has both value_type and element_type but denoting different types. libstdc++-v3/ChangeLog: * include/bits/iterator

[committed] libstdc++: Add deduction guide for std::ranges::join_view [LWG 3474]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
This implements the proposed resolution for LWG 3474. libstdc++-v3/ChangeLog: * include/std/ranges (join_view): Add deduction guide (LWG 3474). * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test. Tested powerpc64le-linux. Committed to trunk. commit ef275d1f2083f8a1fa1b59a

Re: [PATCH] arm: Fix -mpure-code support/-mslow-flash-data for armv8-m.base [PR94538]

2020-08-24 Thread Christophe Lyon via Gcc-patches
On Mon, 24 Aug 2020 at 11:09, Christophe Lyon wrote: > > On Sat, 22 Aug 2020 at 00:44, Ramana Radhakrishnan > wrote: > > > > On Wed, Aug 19, 2020 at 10:32 AM Christophe Lyon via Gcc-patches > > wrote: > > > > > > armv8-m.base (cortex-m23) has the movt instruction, so we need to > > > disable the

Re: [PATCH] hppa: Improve expansion of ashldi3 when !TARGET_64BIT

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 13:53 +0100, Roger Sayle wrote: > This patch improves the code generated on PA-RISC for DImode > (double word) left shifts by small constants (1-31). This target > has a very cool shd instruction that can be recognized by combine > for simple shifts, but relying on combine is

[PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > > > #pragma GCC push_options > > > #pragma GCC target("general-regs-only") > > > > > > #include > > > > > > void

Re: [PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Thomas Koenig via Gcc-patches
Hi Mark, OK to commit and backport? The test cases mentioned in the ChangeLog are not in the patch, instead there is the test case for PR 96624. Could you correct that? Best regards Thomas

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Josh Triplett
On Sat, Aug 22, 2020 at 06:04:48PM -0300, Giuliano Belinassi wrote: > Hi, Josh > > On 08/21, Josh Triplett wrote: > > On Thu, Aug 20, 2020 at 07:00:13PM -0300, Giuliano Belinassi wrote: > > > This patch series add a new flag "-fparallel-jobs=" to control if the > > > compiler should try to compile

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Martin Sebor via Gcc-patches
On 8/24/20 4:59 AM, Aldy Hernandez wrote: On 8/21/20 1:37 AM, Martin Sebor wrote: On 8/20/20 3:00 PM, Aldy Hernandez wrote: Regardless, here are some random comments. Thanks for the careful review! diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 37214831538..bc4f4

Re: [PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:54PM +0200, Mark Wielaard wrote: > DWARF5 makes it possible to read loclists tables without consulting > the debuginfo tree by introducing a table header. Adding location views > breaks this (at least for binutils and elfutils). So don't enable > variable-location-view

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: > In DWARF5 class variables (static data members) are represented with a > DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't > optimized away in the constexpr-var-1.C testcase so we can still match (2) > const_exp

Re: [PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:56PM +0200, Mark Wielaard wrote: > Some DWARF tests scan the assembly output looking for constant values. > When using DWARF5 those constants might use DW_FORM_implicit_const, > which are output (in the comments) after the attribute instead of > before. To make sure th

Re: [PATCH] gimple-fold: Don't optimize wierdo floating point value reads [PR95450]

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 12:51 +0200, Richard Biener wrote: > On Wed, 12 Aug 2020, Jakub Jelinek wrote: > > > On Wed, Aug 12, 2020 at 04:30:35PM +0200, Richard Biener wrote: > > > Not a final review but if we care for this kind of normalization at all > > > the we should do so consistently, thus for

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

2020-08-24 Thread Segher Boessenkool
On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > > On Aug 19, 2020, at 5:57 PM, Segher Boessenkool > > wrote: > > Numbers on how expensive this is (for what arch, in code size and in > > execution time) would be useful. If it is so expensive that no one will > > use it, it helps secu

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

2020-08-24 Thread Segher Boessenkool
[ Please quote correctly. I fixed this up a bit. ] On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: > > The call-clobbered regs are the only ones you *can* touch. That does > > not mean you should clear them all (it doesn't help much at all in some > > cases). Only the

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

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 12:49 PM, Segher Boessenkool > wrote: > > On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: >>> On Aug 19, 2020, at 5:57 PM, Segher Boessenkool >>> wrote: >>> Numbers on how expensive this is (for what arch, in code size and in >>> execution time) would be use

Re: reorg.c (fill_slots_from_thread): Improve for TARGET_FLAGS_REGNUM targets

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-14 at 07:27 +0200, Hans-Peter Nilsson via Gcc-patches wrote: > Originally I thought to bootstrap this patch on MIPS and SPARC > since they're both delayed-branch-slot targets but I > reconsidered, as neither is a TARGET_FLAGS_REGNUM target. It > seems only visium and CRIS has this

Re: [PATCH 1/6] Modify gcc driver for parallel compilation

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Hi, Richi. On 08/24, Richard Biener wrote: > On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi > wrote: > > > > Update the driver for parallel compilation. This process work as > > follows: > > > > When calling gcc, the driver will check if the flag > > "-fparallel-jobs" was provided by the use

Re: [PATCH] cmpelim: recognize extra clobbers in insns

2020-08-24 Thread Jeff Law via Gcc-patches
On Thu, 2020-08-06 at 12:42 +, Pip Cet via Gcc-patches wrote: > I'm working on the AVR cc0 -> CCmode conversion (bug#92729). One > problem is that the cmpelim pass is currently very strict in requiring > insns of the form > > (parallel [(set (reg:SI) (op:SI ... ...)) >(clobber (reg

[committed] wwwdocs: Switch www.validlab.com to https

2020-08-24 Thread Gerald Pfeifer
Pushed. Gerald. --- htdocs/bugs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html index a6631d8a..88fba1b9 100644 --- a/htdocs/bugs/index.html +++ b/htdocs/bugs/index.html @@ -300,7 +300,7 @@ to round to the nearest repr

[committed] doc: Switch valgrind.com to https

2020-08-24 Thread Gerald Pfeifer
Pushed. Jonathan, I found two more references to valgrind.com without https (which lead to a redirect) at http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html http://valgrind.org/docs/manual/drd-manual.html http://valgrind.org/docs/manual/hg-manual.html Would you mind having a look, per

Re: [PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Richard Biener
On August 24, 2020 5:07:56 PM GMT+02:00, Martin Jambor wrote: >Hi, > >I must admit I was quite surprised to see that SRA does not disqualify >an aggregate from any transformations when it encounters an offset for >which get_ref_base_and_extent returns a negative offset. It may not >matter too muc

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Ho, Josh. On 08/24, Josh Triplett wrote: > On Sat, Aug 22, 2020 at 06:04:48PM -0300, Giuliano Belinassi wrote: > > Hi, Josh > > > > On 08/21, Josh Triplett wrote: > > > On Thu, Aug 20, 2020 at 07:00:13PM -0300, Giuliano Belinassi wrote: > > > > This patch series add a new flag "-fparallel-jobs="

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

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 12:59 PM, Segher Boessenkool > wrote: > > [ Please quote correctly. I fixed this up a bit. ] > > On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: >>> The call-clobbered regs are the only ones you *can* touch. That does >>> not mean you should

[PING #5][PATCH] separate reading past the end from -Wstringop-overflow

2020-08-24 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html On 8/10/20 10:48 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html On 7/26/20 11:42 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html O

[pushed] c++: Emit as-base 'tor symbols for final class. [PR95428]

2020-08-24 Thread Jason Merrill via Gcc-patches
For PR70462 I stopped emitting the as-base constructor and destructor variants for final classes, because they can never be called. Except that it turns out that clang calls base variants from complete variants, even for classes with virtual bases, and in some cases inlines them such that the call

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-24 Thread Jeff Law via Gcc-patches
On Thu, 2020-08-06 at 06:23 +0100, Richard Sandiford wrote: > luoxhu writes: > > Hi Richard, > > > > On 2020/8/3 22:01, Richard Sandiford wrote: > > > > /* Try a wider mode if truncating the store mode to NEW_MODE > > > > requires a real instruction. */ > > > > if (maybe

Re: [PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 6:17 PM H.J. Lu wrote: > > On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > > > > > #pragma GCC push_options > > > > #pragma GCC

Re: [PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Mon, Aug 24, 2020 at 12:25 PM Uros Bizjak wrote: > > On Mon, Aug 24, 2020 at 6:17 PM H.J. Lu wrote: > > > > On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > > > > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > > > > > Speaking of pragmas, these should be added outside cpuid.h

libbacktrace patch committed: Add support for Mach-O 64-bit FAT files

2020-08-24 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch adds support for Mach-O 64-bit FAT files. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to mainline. Ian libbacktrace/: * macho.c (MACH_O_MH_MAGIC_FAT_64): Define. (MACH_O_MH_CIGAM_FAT_64): Define. (struct macho_fat_arch_64)

Re: [PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Mark Wielaard
Hi, On Mon, Aug 24, 2020 at 07:38:10PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:54PM +0200, Mark Wielaard wrote: > > DWARF5 makes it possible to read loclists tables without consulting > > the debuginfo tree by introducing a table header. Adding location views > > breaks this (a

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Mark Wielaard
Hi Jakub, On Mon, Aug 24, 2020 at 07:40:51PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: > > In DWARF5 class variables (static data members) are represented with a > > DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't > > opti

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

2020-08-24 Thread Segher Boessenkool
Hi! On Mon, Aug 24, 2020 at 01:02:03PM -0500, Qing Zhao wrote: > > On Aug 24, 2020, at 12:49 PM, Segher Boessenkool > > wrote: > > On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > >>> On Aug 19, 2020, at 5:57 PM, Segher Boessenkool > >>> wrote: > >>> Numbers on how expensive this i

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

2020-08-24 Thread Segher Boessenkool
On Mon, Aug 24, 2020 at 01:48:02PM -0500, Qing Zhao wrote: > > > > On Aug 24, 2020, at 12:59 PM, Segher Boessenkool > > wrote: > > > > [ Please quote correctly. I fixed this up a bit. ] > > > > On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: > >>> The call-clobbered

Re: [PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Mark Wielaard
On Mon, Aug 24, 2020 at 07:44:27PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:56PM +0200, Mark Wielaard wrote: > > Some DWARF tests scan the assembly output looking for constant values. > > When using DWARF5 those constants might use DW_FORM_implicit_const, > > which are output (in

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

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 3:20 PM, Segher Boessenkool > wrote: > > Hi! > > On Mon, Aug 24, 2020 at 01:02:03PM -0500, Qing Zhao wrote: >>> On Aug 24, 2020, at 12:49 PM, Segher Boessenkool >>> wrote: >>> On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > On Aug 19, 2020, at 5:57 PM

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

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 3:26 PM, Segher Boessenkool > wrote: > > On Mon, Aug 24, 2020 at 01:48:02PM -0500, Qing Zhao wrote: >> >> >>> On Aug 24, 2020, at 12:59 PM, Segher Boessenkool >>> wrote: >>> >>> [ Please quote correctly. I fixed this up a bit. ] >>> >>> On Mon, Aug 24, 2020 at 02:

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Tom Tromey
>> This looks incorrect to me, that is a workaround for a real GCC bug. Mark> I was discussing this after the BoF with Tom Tromey (CCed) and he also Mark> thought gdb could/should actually support the DWARF5 representation, Mark> but because the DW_TAG_variable was removed because the static data

[PATCH] PR fortran/96711 - ICE on NINT() Function

2020-08-24 Thread Harald Anlauf
When rounding a real to integer(16) an ICE happened due to an unhandled case in build_round_expr. The attached patch add a special case for this. I had to change a fold_convert to a convert (which seems to be frontend specific stuff), otherwise I would get errors from the generated GIMPLE. Does a

Re: [PATCH] Adjust tree-ssa-dom.c for irange API.

2020-08-24 Thread Jeff Law via Gcc-patches
On Tue, 2020-08-04 at 13:39 +0200, Aldy Hernandez wrote: > This patch removes all uses of VR_ANTI_RANGE in DOM. It required > minor surgery in the switch handling code. > > In doing so, I was able to abstract all the code handling the cases > with ranges into its own function. Interestingly, the

[PATCH] strlen: Fix handle_builtin_string_cmp [PR96758]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because handle_builtin_string_cmp sees a strncmp call with constant last argument 4, where one of the strings has an upper bound of 5 bytes (due to it being an array of that size) and the other has a known string length of 1 and the result is used only in

[PATCH] c++: Fix up ptr.~PTR () handling [PR96721]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because build_trivial_dtor_call handles the case when instance is a pointer by adding a clobber to what the pointer points to (which is desirable e.g. for delete) rather than the pointer itself. That is I think always desirable behavior for references, b

[PATCH] gimple: Ignore *0 = {CLOBBER} in path isolation [PR96722]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! Clobbers of MEM_REF with NULL address are just fancy nops, something we just ignore and don't emit any code for it (ditto for other clobbers), they just mark end of life on something, so we shouldn't infer from those that there is some UB. Bootstrapped/regtested on x86_64-linux and i686-linux

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Jason Merrill via Gcc-patches
On 8/24/20 1:40 PM, Jakub Jelinek wrote: On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: In DWARF5 class variables (static data members) are represented with a DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't optimized away in the constexpr-var-1.C testcase

[PATCH] match.pd: Simplify copysign (x, -x) to -x [PR96715]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements an optimization suggested in the PR, copysign(x,-x) can be optimized into -x (even without -ffast-math, should work fine even for signed zeros and infinities or nans). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-08-24 Jakub Jeline

RE: [PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.

2020-08-24 Thread Carl Love via Gcc-patches
Segher: On Wed, 2020-08-19 at 15:16 -0500, Segher Boessenkool wrote: > On Wed, Aug 19, 2020 at 02:19:12PM -0500, Peter Bergner wrote: > > On 8/14/20 7:42 PM, Segher Boessenkool wrote: > > > I think your current code is fine; I hadn't considered Bill's > > > upcoming > > > rewrite. It is more impo

Re: [PATCH v2] c++: Implement P1009: Array size deduction in new-expressions.

2020-08-24 Thread Marek Polacek via Gcc-patches
On Fri, Aug 21, 2020 at 05:04:43PM -0400, Jason Merrill wrote: > On 8/20/20 4:22 PM, Marek Polacek wrote: > > @@ -3917,6 +3926,47 @@ build_new (location_t loc, vec > > **placement, tree type, > > return error_mark_node; > > } > > + /* P1009: Array size deduction in new-expressions.

Re: std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))

2020-08-24 Thread Jeff Law via Gcc-patches
On Wed, 2020-08-05 at 17:41 +0200, Aldy Hernandez wrote: > On 8/5/20 5:09 PM, Martin Jambor wrote: > > > On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote: > > > > [...] > > > > > * ipa-cp changes from vec to std::vec. > > > > > > We are using std::vec to ensure constructors are run, wh

Re: std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))

2020-08-24 Thread Andrew MacLeod via Gcc-patches
On 8/24/20 5:53 PM, Jeff Law wrote: On Wed, 2020-08-05 at 17:41 +0200, Aldy Hernandez wrote: On 8/5/20 5:09 PM, Martin Jambor wrote: On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote: [...] * ipa-cp changes from vec to std::vec. We are using std::vec to ensure constructors are run,

Re: [PATCH] MIPS: Fix __builtin_longjmp (PR 64242)

2020-08-24 Thread Jeff Law via Gcc-patches
On Sun, 2020-07-12 at 14:27 +0800, Paul Hua wrote: > From 589dbe8a1c2397bfafefa4e84abe5ec6e6798928 Mon Sep 17 00:00:00 2001 > From: Andrew Pinski > Date: Wed, 12 Feb 2020 11:42:57 + > Subject: [PATCH] MIPS: Fix __builtin_longjmp (PR 64242) > > The problem here is mips has its own builtin_long

Re: [PATCH] match.pd: Simplify copysign (x, -x) to -x [PR96715]

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 23:39 +0200, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following patch implements an optimization suggested in the PR, > copysign(x,-x) can be optimized into -x (even without -ffast-math, > should work fine even for signed zeros and infinities or nans). > > Bootstra

Re: [PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 17:07 +0200, Martin Jambor wrote: > Hi, > > I must admit I was quite surprised to see that SRA does not disqualify > an aggregate from any transformations when it encounters an offset for > which get_ref_base_and_extent returns a negative offset. It may not > matter too much

Re: [PATCH] middle-end: PR tree-optimization/21137: STRIP_NOPS avoids missed optimization.

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 17:55 +0100, Roger Sayle wrote: > PR tree-optimization/21137 is now an old enhancement request pointing out > that an optimization I added back in 2006, to optimize "((x>>31)&64) != 0" > as "x < 0", doesn't fire in the presence of unanticipated type conversions. > The fix is t

  1   2   >