Re: [PATCH] Remove more stray returns and gcc_unreachable ()s

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, 29 Nov 2021, Martin Sebor wrote: > On 11/29/21 11:53 AM, Martin Sebor wrote: > > On 11/29/21 6:09 AM, Richard Biener via Gcc-patches wrote: > >> This removes more cases that appear when bootstrap with > >> -Wunreachable-code-return progresses. > >> > > ... > >> diff --git

Re: [PATCH] tree-optimization/103440 - Always track arguments, even when ignoring equiv params.

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 6:20 PM Andrew MacLeod via Gcc-patches wrote: > > I need to adjust the original patch, I shouldn't have continued the loop > when dealing with equivalences.An equivalence is not the same as an > undefined value... we might be able to ignore the range from it for >

Re: [PATCH 1/4] Canonicalize argument order for commutative functions

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 4:40 PM Richard Sandiford wrote: > > Sorry for the slow response, was away last week. > > Richard Biener writes: > > On Wed, Nov 10, 2021 at 1:50 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> This patch uses information about internal functions to

Re: [PATCH] introduce predicate analysis class

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 4:40 PM Martin Sebor wrote: > > On 11/25/21 3:18 AM, Richard Biener wrote: > > On Mon, Aug 30, 2021 at 10:06 PM Martin Sebor via Gcc-patches > > wrote: > >> > >> The predicate analysis subset of the tree-ssa-uninit pass isn't > >> necessarily specific to the detection of

Re: [PATCH] Remove can_throw_non_call_exceptions special case from operator_div::wi_fold.

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 4:24 PM Aldy Hernandez wrote: > > On Mon, Nov 29, 2021 at 3:48 PM Richard Biener > wrote: > > > > On Mon, Nov 29, 2021 at 3:39 PM Jeff Law wrote: > > > > > > > > > > > > On 11/29/2021 7:00 AM, Aldy Hernandez via Gcc-patches wrote: > > > > As discussed in the PR. The

Re: [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-11-29 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/30 上午6:06, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 28, 2021 at 04:16:04PM +0800, Kewen.Lin wrote: >> This patch follows the discussions here[1][2], where Segher >> pointed out the existing way to guard the extra penalized >> cost for strided/elementwise loads with a

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-29 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/30 上午8:16, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 28, 2021 at 04:13:40PM +0800, Kewen.Lin wrote: >> PR target/102347 >> * config/rs6000/rs6000-call.c (rs6000_builtin_decl): Remove builtin >> mask check. > > (Don't wrap lines early please). >

Re: [PATCH] c++: Allow indeterminate unsigned char or std::byte in bit_cast - P1272R4

2021-11-29 Thread Jason Merrill via Gcc-patches
On 11/29/21 11:31, Jakub Jelinek wrote: Hi! P1272R4 has added to the std::byteswap new stuff to me quite unrelated clarification for std::bit_cast. std::bit_cast is already in C++20 though and std::byteswap is a new C++23 feature, it is unclear to me if that bit_cast addition in there is really

Re: [PATCH] Fix regression introduced by r12-5536.

2021-11-29 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 30, 2021 at 5:21 AM Uros Bizjak wrote: > > On Mon, Nov 29, 2021 at 10:48 AM Hongtao Liu wrote: > > > > On Mon, Nov 29, 2021 at 3:53 PM Uros Bizjak wrote: > > > > > > On Mon, Nov 29, 2021 at 2:32 AM liuhongt wrote: > > > > > > > > There're several failures reported in [1]: > > > >

Re: [RFC][PATCH] c++/46476 - implement -Wunreachable-code-return

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/26/21 5:18 AM, Richard Biener via Gcc-patches wrote: This implements a subset of -Wunreachable-code, unreachable code after a return stmt. Contrary to the previous attemt at CFG construction time this implements the bits during GIMPLE lowering where there are still all GIMPLE return stmts

[COMMITTED] tree-optimization/103467 - Don't reuse reference after potential resize.

2021-11-29 Thread Andrew MacLeod via Gcc-patches
After making sure the vector is large enough, we use a reference to the object through the rest of the function.  One path however requests the def chain for a dependant ssa-name, and if that request caused a resize, then our reference is no longer valid. On this path, simply use the object

Re: [PATCH] libcpp: Fix up #__VA_OPT__ handling [PR103415]

2021-11-29 Thread Jason Merrill via Gcc-patches
On 11/26/21 04:33, Jakub Jelinek wrote: Hi! stringify_arg uses pfile->u_buff to create the string literal. Unfortunately, paste_tokens -> _cpp_lex_direct -> lex_number -> _cpp_unaligned_alloc can in some cases use pfile->u_buff too, which results in losing everything prepared for the string

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-29 Thread Segher Boessenkool
Hi! On Tue, Sep 28, 2021 at 04:13:40PM +0800, Kewen.Lin wrote: > PR target/102347 > * config/rs6000/rs6000-call.c (rs6000_builtin_decl): Remove builtin > mask check. (Don't wrap lines early please). Okay for trunk and all backports. Thanks! Segher

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-29 Thread Segher Boessenkool
Hi! On Mon, Oct 11, 2021 at 02:30:42PM +0800, Kewen.Lin wrote: > > If we do need a band-aid for 10 and 11 (and we do as far as I can see), > > I'd like to see one for just MMA there, and let all other badness fade > > into history. Unless you can convince me (in the patch / commit > > message)

[committed] analyzer: further false leak fixes due to overzealous state merging [PR103217]

2021-11-29 Thread David Malcolm via Gcc-patches
Commit r12-5424-gf573d35147ca8433c102e1721d8c99fc432cb44b fixed a false positive from -Wanalyzer-malloc-leak due to overzealous state merging, erroneously merging two different svalues bound to a particular part of the store when one has sm-state. A further case was discovered by the reporter of

Re: [EXTERNAL] Re: [PATCH][WIP] PR tree-optimization/101808 Boolean comparison simplification

2021-11-29 Thread Navid Rahimi via Gcc-patches
Jeff, Sorry for bringing back this thread. Quick question, you mentioned checking the TYPE_PRECISION to make sure the type is a canonical Boolean type (and not a fancy signed/unsigned Boolean type from Ada Andrew mentioned). But I noticed that truth_valued_p does already check for: (if

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-29 Thread Qing Zhao via Gcc-patches
Peter, Thanks a lot for the patch. Richard, how do you think of the patch? (The major concern for me is: With the current patch proposed by Peter, we will generate the call to .DEFERRED_INIT for a variable with OPAQUE_TYPE during gimplification phase, However, if this

Re: [PATCH] libcpp: Enable P1949R7 for C++11 and up as it was a DR [PR100977]

2021-11-29 Thread Jason Merrill via Gcc-patches
On 11/29/21 06:24, Jakub Jelinek wrote: Hi! Jonathan mentioned on IRC that: "Accept P1949R7 (C++ Identifier Syntax using Unicode Standard Annex 31) as a Defect Report and apply the changes therein to the C++ working paper." while I've actually implemented it only for -std={gnu,c}++{23,2b}. As

Re: [PATCH] c++: Small incremental tweak to source_location::current() folding

2021-11-29 Thread Jason Merrill via Gcc-patches
On 11/27/21 03:52, Jakub Jelinek wrote: On Wed, Nov 24, 2021 at 11:42:28PM +0100, Jakub Jelinek via Gcc-patches wrote: I'm surprised the source_location::current handling would be needed; why do calls to that function live long enough for us to walk into the ADDR_EXPR here? Maybe we should

Re: [PATCH 3/3] c++: P1997 array-copy extensions: Assignment, return, etc. [PR103238]

2021-11-29 Thread Jason Merrill via Gcc-patches
On 11/21/21 21:51, Will Wray via Gcc-patches wrote: This second patch completes the work of the first 'array-copy' patch to provide first-cut implementations of all P1997 features. It adds: * Assignments to arrays from array values,a = b; * Placeholder auto in array declarations,

Re: [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-11-29 Thread Segher Boessenkool
Hi! On Fri, Jun 11, 2021 at 09:16:21PM +0800, Kewen.Lin wrote: > >> +/* Should pick up the lowest luid if the references > >> + are in the same block. */ > >> +if (label_tick == rsp->last_set_table_tick > >> +&& rsp->last_set_table_luid > insn_luid) > >> +

Re: [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-11-29 Thread Segher Boessenkool
Hi! On Tue, Sep 28, 2021 at 04:16:04PM +0800, Kewen.Lin wrote: > This patch follows the discussions here[1][2], where Segher > pointed out the existing way to guard the extra penalized > cost for strided/elementwise loads with a magic bound does > not scale. > > The way with nunits * stmt_cost

[PATCH] PR fortran/103473 - [11/12 Regression] ICE in simplify_minmaxloc_nodim, at fortran/simplify.c:5287

2021-11-29 Thread Harald Anlauf via Gcc-patches
Dear all, another trivial and obvious one, discovered by Gerhard. We can have a NULL pointer dereference simplifying MINLOC/MAXLOC on an array that was not properly declared. OK for mainline / affected 11-branch after regtesting completes? Thanks, Harald From

[PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-29 Thread Peter Bergner via Gcc-patches
Sorry for dropping the ball on testing the patch from the bugzilla! The following patch fixes the ICE reported in the bugzilla on the pre-existing gcc testsuite test case, bootstraps and shows no testsuite regressions on powerpc64le-linux. Ok for trunk? Peter For -ftrivial-auto-var-init=*,

[PATCH] PR fortran/101565 - ICE in gfc_simplify_image_index, at fortran/simplify.c:8234

2021-11-29 Thread Harald Anlauf via Gcc-patches
Dear all, a trivial one: we need to check the type of the SUB argument to the coarray IMAGE_INDEX intrinsic. It has to be an array of type integer. Patch by Steve Kargl. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald From 58140e3cf97aedc5c9f3b3e6519027334cdc3213 Mon Sep

Re: [PATCH] Fix regression introduced by r12-5536.

2021-11-29 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 29, 2021 at 10:48 AM Hongtao Liu wrote: > > On Mon, Nov 29, 2021 at 3:53 PM Uros Bizjak wrote: > > > > On Mon, Nov 29, 2021 at 2:32 AM liuhongt wrote: > > > > > > There're several failures reported in [1]: > > > 1. unsupported instruction `pextrw` for "pextrw $0, %xmm31, 16(%rax)"

[wwwdocs] Add spanstream and constexpr std::string to libstdc++ changes

2021-11-29 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. --- htdocs/gcc-12/changes.html | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index b8524f47..10ac025f 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -289,9 +289,9

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-29 Thread Harald Anlauf via Gcc-patches
Hi Tobias, all, Am 29.11.21 um 21:56 schrieb Tobias Burnus: The problem is that the standard does not really state what the bounds are :-( I sort of expected that comment... Usually, it ends up referring to LBOUND (with wordings like "each lower bound equal to the corresponding element of

Re: [PATCH 01/12] LoongArch Port: gcc build

2021-11-29 Thread Joseph Myers
On Sat, 27 Nov 2021, chenglulu wrote: > + if (p_arch_native) > + fatal_error (UNKNOWN_LOCATION, > +"Unknown FPU type %<0x%x%>, " > +"%<-m" OPTSTR_ARCH "=" STR_CPU_NATIVE "%> failed", Diagnostics should not start with an uppercase letter (unless

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-29 Thread Tobias Burnus
Hi Harald, hi Chung-Lin, On 29.11.21 21:21, Harald Anlauf wrote: I think you need to check the following: allocate(c, source=h(3)) write(*,*) lbound(c,1), ubound(c,1) ! prints 1 3 ... pure function h(i) result(r) integer, value, intent(in) :: i integer, allocatable :: r(:)

Re: [PATCH take #2] x86_64: PR target/100711: Splitters for pandn

2021-11-29 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 29, 2021 at 7:14 PM Roger Sayle wrote: > > > Hi Uros, > Many thanks for the review. Here's a revised version of the patch > incorporating all of your suggestions. This has been (re)tested on > x86_64-pc-linux-gnu with make bootstrap and make -k check, > both with and without

Re: [PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-29 Thread Harald Anlauf via Gcc-patches
Hi Chung-Lin, Am 29.11.21 um 15:25 schrieb Chung-Lin Tang: This patch by Tobias, fixes a case of setting array low-bounds, found for particular uses of SOURCE=/MOLD=. For example: program A_M   implicit none   real, dimension (:), allocatable :: A, B   allocate (A(0:5))   call Init (A)

Re: [PATCH] Only return after resetting type_param_spec_list

2021-11-29 Thread Harald Anlauf via Gcc-patches
Am 29.11.21 um 12:28 schrieb Richard Biener via Fortran: This fixes an appearant mistake in gfc_insert_parameter_exprs. Yes, that looks pretty much like a missed cleanup and fix during development. CC'ing Paul. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. OK? LGTM if it

Re: [PATCH] elf: Add __libc_get_static_tls_bounds [BZ #16291]

2021-11-29 Thread Florian Weimer via Gcc-patches
* Fāng-ruì Sòng: > PING^3 I think the core issue with this patch is like this: * I do not want to commit glibc to a public API that disallows future changes to the way we allocate static TLS. While static TLS objects cannot move in memory, the extent of the static TLS area (minimum and

Re: [PATCH] Remove more stray returns and gcc_unreachable ()s

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/29/21 11:53 AM, Martin Sebor wrote: On 11/29/21 6:09 AM, Richard Biener via Gcc-patches wrote: This removes more cases that appear when bootstrap with -Wunreachable-code-return progresses. ... diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index 8ee0529d5a8..18e03c4cb96 100644

Re: [PATCH] Remove more stray returns and gcc_unreachable ()s

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/29/21 6:09 AM, Richard Biener via Gcc-patches wrote: This removes more cases that appear when bootstrap with -Wunreachable-code-return progresses. ... diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index 8ee0529d5a8..18e03c4cb96 100644 --- a/gcc/sel-sched-ir.h +++

Re: [PATCH] ipa: Careful processing ANCESTOR jump functions and NULL pointers (PR 103083)

2021-11-29 Thread Martin Jambor
Hi, On Sat, Nov 27 2021, Jan Hubicka wrote: >> Hi, >> >> IPA_JF_ANCESTOR jump functions are constructed also when the formal >> parameter of the caller is first checked whether it is NULL and left >> as it is if it is NULL, to accommodate C++ casts to an ancestor class. >> >> The jump function

Re: [PATCH] Make the path to etags used in the build system configurable [PR103021]

2021-11-29 Thread Eric Gallager via Gcc-patches
On Mon, Nov 29, 2021 at 9:48 AM Jeff Law wrote: > > > > On 11/28/2021 6:34 PM, Eric Gallager via Gcc-patches wrote: > > The attached patch allows users to specify a path to their `etags` > > executable for use when doing `make tags`, which is meant to close PR > > other/103021:

Re: [PATCH] ipa-param-manip: Be careful about a reallocating hash_map (PR 103449)

2021-11-29 Thread Jan Hubicka via Gcc-patches
> Hi, > > PR 103449 revealed that when I was storing result of one hash_map > lookup into another entry in the hash_map, I was still accessing the > entry in the table, which meanwhile could get reallocated, making the > accesses invalid-after-free. > > Fixed with the following, which also

[PATCH] ipa-param-manip: Be careful about a reallocating hash_map (PR 103449)

2021-11-29 Thread Martin Jambor
Hi, PR 103449 revealed that when I was storing result of one hash_map lookup into another entry in the hash_map, I was still accessing the entry in the table, which meanwhile could get reallocated, making the accesses invalid-after-free. Fixed with the following, which also simplifies the return

[PATCH take #2] x86_64: PR target/100711: Splitters for pandn

2021-11-29 Thread Roger Sayle
Hi Uros, Many thanks for the review. Here's a revised version of the patch incorporating all of your suggestions. This has been (re)tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without --target_board=unix{-m32}, with no new failures. Ok for mainline?

Re: [PATCH 4/4] libgcc: vxcrtstuff.c: add a few undefs

2021-11-29 Thread Olivier Hainque via Gcc-patches
Hi Rasmus, > On 1 Nov 2021, at 10:34, Rasmus Villemoes wrote: > > libgcc/ > * config/vxcrtstuff.c: Undefine caddr_t, pid_t, rlim_t, > ssize_t and vfork after including auto-host.h. Ok, thanks;

Re: [PATCH][RFC] middle-end/46476 - resurrect -Wunreachable-code

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/25/21 12:57 AM, Richard Biener wrote: On Wed, 24 Nov 2021, Martin Sebor wrote: On 11/24/21 8:21 AM, Richard Biener via Gcc-patches wrote: This resurrects -Wunreachable-code and implements a warning for trivially unreachable code as of CFG construction. Most problematic with this is the

[PATCH] tree-optimization/103440 - Always track arguments, even when ignoring equiv params.

2021-11-29 Thread Andrew MacLeod via Gcc-patches
I need to adjust the original patch, I shouldn't have continued the loop when dealing with equivalences.    An equivalence is not the same as an undefined value...  we might be able to ignore the range from it for calculation purposes, but we cannot ignore the fact that it is a different

Re: [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-11-29 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 02:55:51PM +0800, Kewen.Lin wrote: > This patch is to fix the inconsistent behaviors for non-LTO mode > and LTO mode. As Martin pointed out, currently the function > rs6000_can_inline_p simply makes it inlinable if callee_tree is > NULL, but it's wrong, we should use

[PATCH] c++: Allow indeterminate unsigned char or std::byte in bit_cast - P1272R4

2021-11-29 Thread Jakub Jelinek via Gcc-patches
Hi! P1272R4 has added to the std::byteswap new stuff to me quite unrelated clarification for std::bit_cast. std::bit_cast is already in C++20 though and std::byteswap is a new C++23 feature, it is unclear to me if that bit_cast addition in there is really meant for C++23 and later only (e.g.

[PATCH] path solver: Use only one ssa_global_cache.

2021-11-29 Thread Aldy Hernandez via Gcc-patches
We're using a temporary range cache while computing ranges for PHIs to make sure the real cache doesn't get set until all PHIs are computed. With the ltrans beast in LTO mode this causes undue overhead. Since we already have a bitmap to indicate whether there's a cache entry, we can avoid the

PING [PATCH] correct handling of offsets in PHI expressions [PR103215]

2021-11-29 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585180.html On 11/22/21 4:54 PM, Martin Sebor wrote: In an effort to avoid false positives while still detecting certain out-of-bounds accesses the warning code that handles PHI nodes chooses the operand with the most space remaining

Re: [PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-29 Thread Jeff Law via Gcc-patches
On 11/29/2021 8:03 AM, Richard Biener via Gcc-patches wrote: This cleans up unreachable code diagnosed by -Wunreachable-code-ctrl. It largely follows the previous series but discovers a few extra cases, namely dead code after break or continue or loops without exits. Bootstrapped on

PING 3 [PATCH] fix up compute_objsize (including PR 103143)

2021-11-29 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583735.html On 11/22/21 9:41 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583735.html On 11/15/21 9:49 AM, Martin Sebor wrote: Ping for the following cleanup patch:

Re: [PATCH 1/4] Canonicalize argument order for commutative functions

2021-11-29 Thread Richard Sandiford via Gcc-patches
Sorry for the slow response, was away last week. Richard Biener writes: > On Wed, Nov 10, 2021 at 1:50 PM Richard Sandiford via Gcc-patches > wrote: >> >> This patch uses information about internal functions to canonicalize >> the argument order of calls. >> >> Tested on aarch64-linux-gnu and

Re: [PATCH] introduce predicate analysis class

2021-11-29 Thread Martin Sebor via Gcc-patches
On 11/25/21 3:18 AM, Richard Biener wrote: On Mon, Aug 30, 2021 at 10:06 PM Martin Sebor via Gcc-patches wrote: The predicate analysis subset of the tree-ssa-uninit pass isn't necessarily specific to the detection of uninitialized reads. Suitably parameterized, the same core logic could be

Re: [PATCH 4/5] vect: Make reduction code handle calls

2021-11-29 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Tue, Nov 16, 2021 at 5:24 PM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Wed, Nov 10, 2021 at 1:48 PM Richard Sandiford via Gcc-patches >> > wrote: >> >> >> >> This patch extends the reduction code to handle calls.

Re: [PATCH] Remove can_throw_non_call_exceptions special case from operator_div::wi_fold.

2021-11-29 Thread Aldy Hernandez via Gcc-patches
On Mon, Nov 29, 2021 at 3:48 PM Richard Biener wrote: > > On Mon, Nov 29, 2021 at 3:39 PM Jeff Law wrote: > > > > > > > > On 11/29/2021 7:00 AM, Aldy Hernandez via Gcc-patches wrote: > > > As discussed in the PR. The code makes no difference, so whatever test > > > we added this special case

[PATCH] Fix --help -Q output

2021-11-29 Thread Martin Liška
There are cases where a default option value is -1 and auto-detection happens in e.g. target. Do not print these options. Leads to the following diff: - -fdelete-null-pointer-checks [enabled] + -fdelete-null-pointer-checks @@ -332 +332 @@ -

[PATCH] Avoid some -Wunreachable-code-ctrl

2021-11-29 Thread Richard Biener via Gcc-patches
This cleans up unreachable code diagnosed by -Wunreachable-code-ctrl. It largely follows the previous series but discovers a few extra cases, namely dead code after break or continue or loops without exits. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2021-11-29

Re: [PATCH] Remove can_throw_non_call_exceptions special case from operator_div::wi_fold.

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 3:39 PM Jeff Law wrote: > > > > On 11/29/2021 7:00 AM, Aldy Hernandez via Gcc-patches wrote: > > As discussed in the PR. The code makes no difference, so whatever test > > we added this special case for has been fixed or is being papered over. > > I think we should fix

Re: [PATCH] Make the path to etags used in the build system configurable [PR103021]

2021-11-29 Thread Jeff Law via Gcc-patches
On 11/28/2021 6:34 PM, Eric Gallager via Gcc-patches wrote: The attached patch allows users to specify a path to their `etags` executable for use when doing `make tags`, which is meant to close PR other/103021: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103021 I based this patch off of this

Re: [PATCH] Remove can_throw_non_call_exceptions special case from operator_div::wi_fold.

2021-11-29 Thread Jeff Law via Gcc-patches
On 11/29/2021 7:00 AM, Aldy Hernandez via Gcc-patches wrote: As discussed in the PR. The code makes no difference, so whatever test we added this special case for has been fixed or is being papered over. I think we should fix any fall out upstream. [Unless Andrew can remember why we added

Re: [PATCH] Fix RTL FE issue with premature return

2021-11-29 Thread Jeff Law via Gcc-patches
On 11/29/2021 4:26 AM, Richard Biener via Gcc-patches wrote: This fixes an issue discovered by -Wunreachable-code-return Bootstrap / regtest pending on x86_64-unknown-linux-gnu, OK? 2021-11-29 Richard Biener * read-rtl-function.c (function_reader::read_rtx_operand):

[PATCH, Fortran] Fix setting of array lower bound for named arrays

2021-11-29 Thread Chung-Lin Tang
This patch by Tobias, fixes a case of setting array low-bounds, found for particular uses of SOURCE=/MOLD=. For example: program A_M implicit none real, dimension (:), allocatable :: A, B allocate (A(0:5)) call Init (A) contains subroutine Init ( A ) real, dimension ( 0 : ), intent

[PATCH] Remove can_throw_non_call_exceptions special case from operator_div::wi_fold.

2021-11-29 Thread Aldy Hernandez via Gcc-patches
As discussed in the PR. The code makes no difference, so whatever test we added this special case for has been fixed or is being papered over. I think we should fix any fall out upstream. [Unless Andrew can remember why we added this and it still applies.] Tested on x86-64 Linux. OK for trunk?

[PATCH] Place stray return inside if

2021-11-29 Thread Richard Biener via Gcc-patches
This avoids a -Wunreachable-code-return diagnostic about two consecutive returns by placing the return in the appropriate conditional block. OK? Thanks, Richard. 2021-11-29 Richard Biener libstd++-v3/ * src/c++17/fs_ops.cc (fs::equivalent): Move return stmt inside #else. ---

[PATCH] Remove more stray returns and gcc_unreachable ()s

2021-11-29 Thread Richard Biener via Gcc-patches
This removes more cases that appear when bootstrap with -Wunreachable-code-return progresses. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2021-11-29 Richard Biener * config/i386/i386.c (ix86_shift_rotate_cost): Remove unreachable return. *

[PATCH] RISC-V: jal cannot refer to a default visibility symbol for shared object.

2021-11-29 Thread Nelson Chu
This is the original binutils bugzilla report, https://sourceware.org/bugzilla/show_bug.cgi?id=28509 And this is the first version of the proposed binutils patch, https://sourceware.org/pipermail/binutils/2021-November/118398.html After applying the binutils patch, I get the the unexpected error

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-29 Thread Martin Liška
On 11/26/21 09:12, Richard Biener wrote: On Wed, Nov 24, 2021 at 3:32 PM Martin Liška wrote: On 11/24/21 15:14, Martin Liška wrote: It likely miscompiles gcc.dg/loop-unswitch-5.c, working on that.. Fixed that in the updated version. Function level comments need updating it seems. I've

Re: [PATCH]middle-end: move bitmask match.pd pattern and update tests

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, 29 Nov 2021, Tamar Christina wrote: > Hi All, > > Following the previous bugfix this addresses the cosmetic and test issues. > > The vector tests are moved to vect and the scalar are left where they are. > > Bootstrapped Regtested x86_64-pc-linux-gnu and no regressions. > Tested with

[PATCH]middle-end: move bitmask match.pd pattern and update tests

2021-11-29 Thread Tamar Christina via Gcc-patches
Hi All, Following the previous bugfix this addresses the cosmetic and test issues. The vector tests are moved to vect and the scalar are left where they are. Bootstrapped Regtested x86_64-pc-linux-gnu and no regressions. Tested with -m32/-mno-sse and no issues. Ok for master? Thanks, Tamar

Re: Patch ping (Re: [PATCH] x86_64: Issue -Wpsabi warning about C++ zero width bitfield ABI changes [PR102024])

2021-11-29 Thread H.J. Lu via Gcc-patches
On Mon, Nov 29, 2021 at 3:24 AM Jakub Jelinek wrote: > > Hi! > > On Tue, Aug 31, 2021 at 10:05:58AM +0200, Jakub Jelinek via Gcc-patches wrote: > > This is an incremental patch to > > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578447.html > > for x86_64 ABI. > > For zero-width

[PATCH] Only return after resetting type_param_spec_list

2021-11-29 Thread Richard Biener via Gcc-patches
This fixes an appearant mistake in gfc_insert_parameter_exprs. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2021-11-29 Richard Biener gcc/fortran/ * decl.c (gfc_insert_parameter_exprs): Only return after resetting type_param_spec_list. ---

[PATCH] Fix RTL FE issue with premature return

2021-11-29 Thread Richard Biener via Gcc-patches
This fixes an issue discovered by -Wunreachable-code-return Bootstrap / regtest pending on x86_64-unknown-linux-gnu, OK? 2021-11-29 Richard Biener * read-rtl-function.c (function_reader::read_rtx_operand): Return only after resetting m_in_call_function_usage. ---

[PATCH] libcpp: Enable P1949R7 for C++11 and up as it was a DR [PR100977]

2021-11-29 Thread Jakub Jelinek via Gcc-patches
Hi! Jonathan mentioned on IRC that: "Accept P1949R7 (C++ Identifier Syntax using Unicode Standard Annex 31) as a Defect Report and apply the changes therein to the C++ working paper." while I've actually implemented it only for -std={gnu,c}++{23,2b}. As the C++98 rules were significantly

Re: [AArch64] Enable generation of FRINTNZ instructions

2021-11-29 Thread Andre Vieira (lists) via Gcc-patches
On 18/11/2021 11:05, Richard Biener wrote: + (if (!flag_trapping_math + && direct_internal_fn_supported_p (IFN_TRUNC, type, +OPTIMIZE_FOR_BOTH)) + (IFN_TRUNC @0) #endif does IFN_FTRUNC_INT preserve the same exceptions as

Re: [PATCH] Remove unreachable gcc_unreachable () at the end of functions

2021-11-29 Thread Richard Biener via Gcc-patches
On Sun, 28 Nov 2021, Jeff Law wrote: > > > On 11/25/2021 6:33 AM, Richard Biener via Gcc-patches wrote: > > It seems to be a style to place gcc_unreachable () after a > > switch that handles all cases with every case returning. > > Those are unreachable (well, yes!), so they will be elided > >

Patch ping (Re: [PATCH] x86_64: Issue -Wpsabi warning about C++ zero width bitfield ABI changes [PR102024])

2021-11-29 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Aug 31, 2021 at 10:05:58AM +0200, Jakub Jelinek via Gcc-patches wrote: > This is an incremental patch to > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578447.html > for x86_64 ABI. > For zero-width bitfields current GCC classify_argument does: > if

Re: [PATCH] Remove unreachable returns

2021-11-29 Thread Richard Biener via Gcc-patches
On Sun, 28 Nov 2021, Jeff Law wrote: > > > On 11/25/2021 7:16 AM, Richard Biener via Gcc-patches wrote: > > This removes unreachable return statements as diagnosed by > > the -Wunreachable-code patch. Some cases are more obviously > > an improvement than others - in fact some may get you the

Re: [PATCH] Fix regression introduced by r12-5536.

2021-11-29 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 29, 2021 at 3:53 PM Uros Bizjak wrote: > > On Mon, Nov 29, 2021 at 2:32 AM liuhongt wrote: > > > > There're several failures reported in [1]: > > 1. unsupported instruction `pextrw` for "pextrw $0, %xmm31, 16(%rax)" > > %vpextrw should be used in output templates. > > 2. ICE in

RE: [PATCH]middle-end cse: Make sure duplicate elements are not entered into the equivalence set [PR103404]

2021-11-29 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, November 29, 2021 9:02 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@tachyum.com; > Richard Sandiford > Subject: Re: [PATCH]middle-end cse: Make sure duplicate elements are not > entered into the equivalence

[PATCH] tree-optimization/103458 - avoid creating new loops in CD-DCE

2021-11-29 Thread Richard Biener via Gcc-patches
When creating forwarders in CD-DCE we have to avoid creating loops where we formerly did not consider those because of abnormal predecessors. At this point simply excuse us when there are any abnormal predecessors. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-29 Richard

Re: Improve -fprofile-report

2021-11-29 Thread Martin Liška
On 11/27/21 16:56, Jan Hubicka via Gcc-patches wrote: Hi, Profile-report was never properly updated after switch to new profile representation. This patch fixes the way profile mismatches are calculated: we used to collect separately count and freq mismatches, while now we have only counts &

[PATCH] Final value replacement improvements for until-wrap loops.

2021-11-29 Thread Roger Sayle
This middle-end patch is inspired by Richard Biener's until-wrap loop example in PR tree-optimization/101145. unsigned foo(unsigned val, unsigned start) { unsigned cnt = 0; for (unsigned i = start; i > val; ++i) cnt++; return cnt; } For this loop, the tree optimizers currently

Re: [PATCH]middle-end cse: Make sure duplicate elements are not entered into the equivalence set [PR103404]

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, 29 Nov 2021, Tamar Christina wrote: > Hi All, > > CSE uses equivalence classes to keep track of expressions that all have the > same > values at the current point in the program. > > Normal equivalences through SETs only insert and perform lookups in this set > but > equivalence

Re: [PATCH] tree-optimization: [PR101540] Simplify CONSTRUCTOR for vector(1) to be VCE

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 1:57 AM Andrew Pinski via Gcc-patches wrote: > > On Sun, Nov 28, 2021 at 12:25 PM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 11/28/2021 10:56 AM, apinski--- via Gcc-patches wrote: > > > From: Andrew Pinski > > > > > > This just adds a simplification to

Re: [PATCH] Fix PR 19089: Environment variable TMP may yield gcc: abort

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 9:53 AM Richard Biener wrote: > > On Mon, Nov 29, 2021 at 1:42 AM Andrew Pinski via Gcc-patches > wrote: > > > > On Sun, Nov 28, 2021 at 12:14 PM Jeff Law via Gcc-patches > > wrote: > > > > > > > > > > > > On 11/27/2021 7:49 PM, apinski--- via Gcc-patches wrote: > > > >

Re: [PATCH] Fix PR 19089: Environment variable TMP may yield gcc: abort

2021-11-29 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 1:42 AM Andrew Pinski via Gcc-patches wrote: > > On Sun, Nov 28, 2021 at 12:14 PM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 11/27/2021 7:49 PM, apinski--- via Gcc-patches wrote: > > > From: Andrew Pinski > > > > > > Even though I cannot reproduce the ICE any