[PATCH] sanitizer: do not ICE for pointer cmp/sub

2020-12-10 Thread Martin Liška
Hello. In C FE we have troubles to instrument top-level pointer comparison (and subtraction): /home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/asan/pr98204.c:5:1: internal compiler error: in pointer_diff, at c/c-typeck.c:3954 5 | static long i=((char*)&(v.c)-(char*)&v); | ^

[PATCH] tree-optimization/98211 - fix bogus vectorization of conversion

2020-12-10 Thread Richard Biener
Pattern recog incompletely handles some bool cases but we shouldn't miscompile as a result but not vectorize. Unfortunately vectorizable_assignment lets invalid conversions (that vectorizable_conversion rejects) slip through. The following rectifies that. Bootstrapped and tested on x86_64-unknow

[PATCH] Allow scalar fallback for pattern root stmt

2020-12-10 Thread Richard Biener
This adjusts the SLP build to allow a pattern root stmt to be built from scalars. I've noticed this in PR98211 where we fail to promote a SLP subtree to a simple splat operation and instead emit a series of uniform vector operations. The bb-slp-div-1.c testcase is now vectorized on x86_64 but onl

Re: [PATCH] Remove misleading debug line entries

2020-12-10 Thread Richard Biener
On Wed, 9 Dec 2020, Bernd Edlinger wrote: > On 12/8/20 7:57 PM, Bernd Edlinger wrote: > > On 12/8/20 11:35 AM, Richard Biener wrote: > >> > >> + { > >> + /* Remove a nonbind marker when the outer scope of the > >> + inline function is completely removed. */ > >> +

Re: [1/2][TREE] Add WIDEN_PLUS, WIDEN_MINUS pretty print

2020-12-10 Thread Richard Biener
On Thu, 10 Dec 2020, Joel Hutton wrote: > Hi all, > > This adds missing pretty print for WIDEN_PLUS/MINUS and > VEC_WIDEN_PLUS/MINUS_HI/LO > > Bootstrapped and regression tested all together on aarch64. > > Ok for trunk? OK. > Add WIDEN_PLUS, WIDEN_MINUS pretty print > > Add 'w+'/'w-' as WI

Re: [2/2][VECT] pr97929 fix

2020-12-10 Thread Richard Biener
On Thu, 10 Dec 2020, Joel Hutton wrote: > Hi all, > > This patch addresses PR97929 by adding a missing case for WIDEN_PLUS/MINUS in > vect_get_smallest_scalar_type. It also introduces a test to check for > regression. > > One thing to note is that I saw a failure on c-c++-common/builtins.c wh

Re: [PATCH] dojump: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Eric Botcazou
> 2020-12-10 Jakub Jelinek > > PR rtl-optimization/98212 > * dojump.c (do_compare_rtx_and_jump): Change computation of > first_prob for and_them and don't invert prob around it. > > * gcc.dg/predict-8.c: Adjust expected probability. > > --- gcc/dojump.c.jj 2020-12-09

Re: [PATCH] data-ref: Rework integer handling in split_constant_offset [PR98069]

2020-12-10 Thread Richard Biener
On Wed, 9 Dec 2020, Richard Sandiford wrote: > PR98069 is about a case in which split_constant_offset miscategorises > an expression of the form: > > int foo; > … > POINTER_PLUS_EXPR > > as: > > base: base > offset: (sizetype) (-foo) * size > init: INT_MIN * size > > “-foo” overflo

Re: [PATCH] data-ref: Rework integer handling in split_constant_offset [PR98069]

2020-12-10 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: >> @@ -812,33 +997,80 @@ split_constant_offset_1 (tree type, tree op0, enum >> tree_code code, tree op1, >> } >> } >> >> -/* Expresses EXP as VAR + OFF, where off is a constant. The type of OFF >> - will be ssizetype. */ >> +/* If EXP has pointer type, try to ex

Re: [PATCH 1/5] arm: Auto-vectorization for MVE: vand

2020-12-10 Thread Christophe Lyon via Gcc-patches
On Tue, 8 Dec 2020 at 15:00, Kyrylo Tkachov wrote: > > > > -Original Message- > > From: Christophe Lyon > > Sent: 08 December 2020 13:59 > > To: Kyrylo Tkachov > > Cc: gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH 1/5] arm: Auto-vectorization for MVE: vand > > > > On Tue, 8 Dec 2020 a

Re: [PATCH] data-ref: Rework integer handling in split_constant_offset [PR98069]

2020-12-10 Thread Richard Biener
On Thu, 10 Dec 2020, Richard Sandiford wrote: > Richard Biener writes: > >> @@ -812,33 +997,80 @@ split_constant_offset_1 (tree type, tree op0, enum > >> tree_code code, tree op1, > >> } > >> } > >> > >> -/* Expresses EXP as VAR + OFF, where off is a constant. The type of OFF > >> - w

[PATCH] remove obsolete conversion handling from vectorizable_assignment

2020-12-10 Thread Richard Biener
This removes an odd special-case of VECTOR_BOOLEAN_TYPE_P typed conversions from vectorizable_assignment that was obsoleted by making all integer mode VECTOR_BOOLEAN_TYPE_P types have 1-bit precision bool components with 605c2a393d3a2db8 Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

Re: [PATCH] Fix up testcase.

2020-12-10 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 9 Dec 2020 at 15:52, Hongtao Liu wrote: > > On Wed, Dec 9, 2020 at 5:22 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > On Wed, 9 Dec 2020 at 00:29, sunil.k.pandey wrote: > > > > > > On Linux/x86_64, > > > > > > 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 is the first bad commit > >

Re: Help with PR97872

2020-12-10 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 10 Dec 2020 at 17:11, Richard Biener wrote: > > On Wed, 9 Dec 2020, Prathamesh Kulkarni wrote: > > > On Tue, 8 Dec 2020 at 14:36, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 7 Dec 2020 at 17:37, Hongtao Liu wrote: > > > > > > > > On Mon, Dec 7, 2020 at 7:11 PM Prathamesh Kulkarni

[PATCH] dojump, v2: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 10, 2020 at 12:50:02PM +0100, Eric Botcazou wrote: > prob.split adjusts prob so this needs to be reflected in the comment (maybe > "adjusted prob" or the formula if it is simple). Otherwise looks good to me. Actually I went back to drawing board and the patch wasn't correct. Let's di

Re: [RFC] [avr] Toolchain Integration for Testsuite Execution (avr cc0 to mode_cc0 conversion)

2020-12-10 Thread abebeos via Gcc-patches
Στις Πέμ, 10 Δεκ 2020 στις 7:42 π.μ., ο/η Dimitar Dimitrov έγραψε: > On сряда, 9 декември 2020 г. 15:12:49 EET abebeos via Gcc-patches wrote: > > Essence: > > > > I need a confirmation that the testsuite setup as presented in: > > > > https://github.com/abebeos/avr-gnu > > > > works fine. > > > >

Re: [PATCH] dojump, v2: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Eric Botcazou
> 2020-12-10 Jakub Jelinek > > PR rtl-optimization/98212 > * dojump.c (do_compare_rtx_and_jump): Change computation of > first_prob for and_them. Add comment explaining and_them case. > > * gcc.dg/predict-8.c: Adjust expected probability. > > --- gcc/dojump.c.jj 202

[backport gcc-10][AArch64] ACLE bf16 convert

2020-12-10 Thread Dennis Zhang via Gcc-patches
Hi all, This patch backports the commit f7d6961126a7f06c8089d8a58bd21be43bc16806. The original is approved at https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557859.html The only change is to remove FPCR-reading flags for builtin definition since it's not supported in gcc-10. Regtested a

[backport gcc-10][AArch64] ACLE bf16 get

2020-12-10 Thread Dennis Zhang via Gcc-patches
Hi all, This patch backports the commit 3553c658533e430b232997bdfd97faf6606fb102. The original is approved at https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557871.html There is a change to remove FPCR-reading flag for builtin declaration since it's not supported in gcc-10. Another cha

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: > --- a/gcc/c/c-typeck.c > +++ b/gcc/c/c-typeck.c > @@ -14942,6 +14942,11 @@ c_finish_omp_clauses (tree clauses, enum > c_omp_region_type ort) > pc = &OMP_CLAUSE_CHAIN (c); > continue; > > + case OMP_CLAUSE_DE

Re: [PATCH] dojump, v2: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 10, 2020 at 03:18:54PM +0100, Eric Botcazou wrote: > OK, thanks, but aren't there missing TABs in the new version? Only one line > is changed in the end AFAICS. No, sorry, just me hand editing of the patch (and the source) instead of regenerating the patch (I had there prob.invert ()

Small fix to PLACEHOLDER_EXPR handling in loc_list_from_tree_1

2020-12-10 Thread Eric Botcazou
This case handles the discriminated record types of Ada: the PLACEHOLDER_EXPR is the "template" expression for the discriminant in the type definition. Now for some components, typically arrays whose upper bound is the discriminant, the compiler creates a local subtype for the component, so the

Re: [PATCH] dojump, v2: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Eric Botcazou
> 2020-12-10 Jakub Jelinek > > PR rtl-optimization/98212 > * dojump.c (do_compare_rtx_and_jump): Change computation of > first_prob for and_them. Add comment explaining and_them case. > > * gcc.dg/predict-8.c: Adjust expected probability. OK, thanks. -- Eric Botcazo

c++: name-lookup refactoring

2020-12-10 Thread Nathan Sidwell
Here are some refactorings to the name-lookup machinery. Primarily breakout out worker functions that the modules patch will also use. Fixing a couple of comments on the way. gcc/cp/ * name-lookup.c (pop_local_binding): Check for IDENTIFIER_ANON_P. (update_binding): Level

[pushed] c++: Add fixed test [PR68451]

2020-12-10 Thread Marek Polacek via Gcc-patches
I was about to add this test with dg-ice but it turned out it had already been fixed by the recent r11-3361! Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: PR c++/68451 * g++.dg/cpp0x/friend6.C: New test. --- gcc/testsuite/g++.dg/cpp0x/friend6.C | 23 +++

[PATCH] varasm, v2: Reject soft frame or arg pointer registers for register vars [PR92469]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 10, 2020 at 12:00:17PM +0100, Jakub Jelinek wrote: > So, would it be better to check for one of FRAME_POINTER_REGNUM, > ARG_POINTER_REGNUM or RETURN_ADDRESS_POINTER_REGNUM if they > are mentioned in (from part of pairs in) ELIMINABLE_REGS? In patch form now: 2020-12-10 Jakub Jelinek

[PATCH] ira.c: Fix ICE in ira-color [PR97092]

2020-12-10 Thread Andrea Corallo via Gcc-patches
Hi all, following discussion on PR97092 I'd like to submit the following patch with a fix plus associated testcase. With this patch applied mode is recomputed at each iteration while looping across different copies in 'update_costs_from_allocno', this instead of carrying mode over subsequent iter

Ping x2: [PATCH] PowerPC: Map IEEE 128-bit long double built-in functions

2020-12-10 Thread Michael Meissner via Gcc-patches
This patch is one of the critical patches to enable building GCC with the long double type set to IEEE 128-bit. I haven't received a response for this patch: | Date: Thu, 19 Nov 2020 18:58:14 -0500 | Subject: [PATCH] PowerPC: Map IEEE 128-bit long double built-in functions | Message-ID: <20201119

Ping x2: [PATCH] PowerPC: Add float128/Decimal conversions

2020-12-10 Thread Michael Meissner via Gcc-patches
This is one of the critical patches for enabling IEEE 128-bit long double. I haven't received a reply for this patch: | Date: Thu, 19 Nov 2020 19:05:24 -0500 | Subject: [PATCH] PowerPC: Add float128/Decimal conversions | Message-ID: <2020112524.ga...@ibm-toto.the-meissners.org> | https://gcc.

Ping x2: [PATCH] PowerPC: Set long double size for IBM/IEEE.

2020-12-10 Thread Michael Meissner via Gcc-patches
This patch isn't critical for IEEE 128-bit long double, but it is a feature Jonathan Wakely asked for, to have a single switch to enable IEEE/IBM 128-bit long double, without having to set the long double size. I haven't received a replay for this patch: | Date: Thu, 19 Nov 2020 19:00:11 -0500 |

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 10, 2020 at 03:38:40PM +0100, Jakub Jelinek via Gcc-patches wrote: > I don't understand this. My reading of: > "The event-handle will be considered as if it was specified on a > firstprivate clause. The use of a variable in a detach clause expression of a > task > construct causes an

[committed][Patch]arm: Fix typo in testcase mve-vsub_1.c

2020-12-10 Thread Dennis Zhang via Gcc-patches
This patch fixes a typo reported at https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558478.html gcc/testsuite/ * gcc.target/arm/simd/mve-vsub_1.c: Fix typo. Remove needless dg-additional-options. Cheers, Dennisdiff --git a/gcc/testsuite/gcc.target/arm/simd/mve-vsub_1.c b/

Ping x2: [PATCH 1/2] Power10: Add IEEE 128-bit xsmaxcqp and xsmincqp support.

2020-12-10 Thread Michael Meissner via Gcc-patches
This patch has been around for quite some time. It isn't critical for enabling IEEE 128-bit long double, but it improves code generation for float128 on power10. I haven't received a reply for this patch: | Date: Sun, 15 Nov 2020 23:50:51 -0500 | Subject: [PATCH 1/2] Power10: Add IEEE 128-bit xs

Ping x2: [PATCH 2/2] Power10: Add IEEE 128-bit fp conditional move

2020-12-10 Thread Michael Meissner via Gcc-patches
This needs the first patch in the series to be applied first. This patch is not critical for enabling IEEE 128-bit long double, but it does improve float128 code generation on power10. I haven't received a reply for this patch: | Date: Sun, 15 Nov 2020 23:53:20 -0500 | Subject: [PATCH 2/2] Power

Re: [PATCH][Arm] Auto-vectorization for MVE: vsub

2020-12-10 Thread Dennis Zhang via Gcc-patches
Hi Christophe, > From: Christophe Lyon > Sent: Monday, November 9, 2020 1:38 PM > To: Dennis Zhang > Cc: Kyrylo Tkachov; gcc-patches@gcc.gnu.org; Richard Earnshaw; nd; Ramana > Radhakrishnan > Subject: Re: [PATCH][Arm] Auto-vectorization for MVE: vsub > > Hi, > > I have just noticed that the new

Re: [PATCH] Add -Wtsan.

2020-12-10 Thread Martin Sebor via Gcc-patches
On 12/9/20 2:24 AM, Martin Liška wrote: Hello. The newly added warning is about warning a user that std::atomic_thread_fence is not supported by TSAN. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR sanitizer

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-10 Thread Jonathan Wakely via Gcc-patches
On 04/12/20 00:35 +, Jonathan Wakely wrote: On 03/12/20 20:07 -0300, Tulio Magno Quites Machado Filho via Libstdc++ wrote: Jonathan Wakely via Libstdc++ writes: diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index cbfdf4c6bad..d25842fef35 100644 --- a/libstdc++-v3/conf

Re: RFC: ARM MVE and Neon auto-vectorization

2020-12-10 Thread Christophe Lyon via Gcc-patches
On Wed, 9 Dec 2020 at 17:47, Richard Sandiford wrote: > > Christophe Lyon via Gcc-patches writes: > > Hi, > > > > I've been working for a while on enabling auto-vectorization for ARM > > MVE, and I find it a bit awkward to keep things common with Neon as > > much as possible. > > > > I've just se

[PATCH] c++: Diagnose unstable satisfaction results

2020-12-10 Thread Patrick Palka via Gcc-patches
This implements lightweight heuristical detection and diagnosing of satisfaction results that change at different points in the program, which renders the program as ill-formed NDR as of P2014. We've recently started to more aggressively cache satisfaction results, and so the goal here is to make

Re: [PATCH v5] Practical Improvement to libgcc Complex Divide

2020-12-10 Thread Patrick McGehearty via Gcc-patches
Thank you for your rapid feedback. I'll fix the various formatting issues (spaces in the wrong places and such as well as revise the Changelog magic) in the next submission. It will wait for Joseph's review to also make any changes he suggests. I'll also try to train myself to be more sensitive to

c++: modularize spelling suggestions

2020-12-10 Thread Nathan Sidwell
This augments the spelling suggestion code to understand about visible imported modules. Simply consider each visible binding in the binding_vector, until we find one that has something of interest. gcc/cp/ * name-lookup.c: Include bitmap.h. (enum binding_slots): New.

Re: [PATCH 1/8 v4] Dead-field warning in structs at LTO-time

2020-12-10 Thread Martin Sebor via Gcc-patches
On 12/9/20 4:09 PM, Eric Gallager via Gcc-patches wrote: On Fri, Dec 4, 2020 at 4:58 AM Erick Ochoa < erick.oc...@theobroma-systems.com> wrote: This commit includes the following components: Type-based escape analysis to determine structs that can be modified at link-time. Field a

[PATCH]AArch64: Add NEON, SVE and SVE2 RTL patterns for Complex Addition, Multiply and FMA.

2020-12-10 Thread Tamar Christina via Gcc-patches
Hi All, This adds implementation for the optabs for complex operations. With this the following C code: void f90 (float complex a[restrict N], float complex b[restrict N], float complex c[restrict N]) { for (int i=0; i < N; i++) c[i] = a[i] + (b[i] * I); } generates

[PATCH]Arm: Add NEON and MVE RTL patterns for Complex Addition, Multiply and FMA. Fix mve types Fix mve patterns

2020-12-10 Thread Tamar Christina via Gcc-patches
Hi All, This adds implementation for the optabs for complex additions. With this the following C code: void f90 (float complex a[restrict N], float complex b[restrict N], float complex c[restrict N]) { for (int i=0; i < N; i++) c[i] = a[i] + (b[i] * I); } generates

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-10 Thread Peter Bergner via Gcc-patches
On 12/10/20 10:14 AM, Jonathan Wakely wrote: > On 04/12/20 00:35 +, Jonathan Wakely wrote: >> On 03/12/20 20:07 -0300, Tulio Magno Quites Machado Filho via Libstdc++ >> wrote: >>> I suggest to replace frexpf128 with __frexpieee128. >>> >>> The former is available on a glibc that support _Float

RE: [PATCH]Arm: Add NEON and MVE RTL patterns for Complex Addition, Multiply and FMA. Fix mve types Fix mve patterns

2020-12-10 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: 10 December 2020 17:00 > To: gcc-patches@gcc.gnu.org > Cc: nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: [PATCH]Arm: Add NEON and MVE RTL patterns for Complex Addition, > Multiply and

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-10 Thread Jonathan Wakely via Gcc-patches
On 10/12/20 11:14 -0600, Peter Bergner via Libstdc++ wrote: On 12/10/20 10:14 AM, Jonathan Wakely wrote: On 04/12/20 00:35 +, Jonathan Wakely wrote: On 03/12/20 20:07 -0300, Tulio Magno Quites Machado Filho via Libstdc++ wrote: I suggest to replace frexpf128 with __frexpieee128. The forme

Re: [PATCH 1/8 v4] Dead-field warning in structs at LTO-time

2020-12-10 Thread David Malcolm via Gcc-patches
On Fri, 2020-12-04 at 10:58 +0100, Erick Ochoa wrote: > + // Anonymous fields? (Which the record can be!). > + warning (OPT_Wdfa, "RECORD_TYPE %qE has dead field %qE in LTO.\n", > + record, field); Others have pointed out that -Wdfa isn't a good name for the warning

Re: [PATCH] c++: Diagnose unstable satisfaction results

2020-12-10 Thread David Malcolm via Gcc-patches
On Thu, 2020-12-10 at 11:21 -0500, Patrick Palka via Gcc-patches wrote: > + if (entry->diagnose_instability) > + { > + error_at (EXPR_LOCATION (ATOMIC_CONSTR_EXPR (entry->atom)), > + "satisfaction value of atomic constraint %qE changed " > +

Re: [PATCH 1/8 v4] Dead-field warning in structs at LTO-time

2020-12-10 Thread Erick Ochoa
On 10/12/2020 18:39, David Malcolm wrote: On Fri, 2020-12-04 at 10:58 +0100, Erick Ochoa wrote: + // Anonymous fields? (Which the record can be!). + warning (OPT_Wdfa, "RECORD_TYPE %qE has dead field %qE in LTO.\n", + record, field); Others have pointed out t

Re: RFC: ARM MVE and Neon auto-vectorization

2020-12-10 Thread Richard Sandiford via Gcc-patches
Christophe Lyon writes: > On Wed, 9 Dec 2020 at 17:47, Richard Sandiford > wrote: >> >> Christophe Lyon via Gcc-patches writes: >> > Hi, >> > >> > I've been working for a while on enabling auto-vectorization for ARM >> > MVE, and I find it a bit awkward to keep things common with Neon as >> > mu

c++: Name lookup for modules

2020-12-10 Thread Nathan Sidwell
This augments the name lookup with knowledge about the BINDING_VECTOR. That holds per-module namespace bindings, and we need to collect the bindings in visible imports when we do lookup. We also need to do some checking when we're pushing a new decl to check we're not overriding an existing visib

Re: [AArch64] Add --with-tune configure flag

2020-12-10 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > I specifically want to test generic SVE rather than SVE tuned for a > specific core, so --with-arch=armv8.2-a+sve is the thing I want to test. Btw that's not actually what you get if you use cc1 - you always get armv8.0, so --with-arch doesn't work at all. The only case that appears

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-10 Thread Rainer Orth
Hi Ian, > On Tue, Dec 8, 2020 at 2:57 PM Nikhil Benesch > wrote: >> >> This patch corrects -fdump-go-spec's handling of incomplete types. >> To my knowledge the issue fixed here has not been previously >> reported. It was exposed by an in-progress port of gccgo to FreeBSD. >> >> Given the follow

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-10 Thread Nikhil Benesch via Gcc-patches
Sorry about this, Rainer. I think I see the issue, though it's hard to be certain without access to a Solaris machine. Assuming the icmp6.h header hasn't changed since the last time Solaris code was open source [0], I think the issue is likely to be typedefs that define a named struct and an alias

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-10 Thread Rainer Orth
Hi Nikhil, > Sorry about this, Rainer. I think I see the issue, though it's hard to > be certain without access to a Solaris machine. Assuming the icmp6.h > header hasn't changed since the last time Solaris code was open source > [0], I think the issue is likely to be typedefs that define a named

c++: modules & using-decls

2020-12-10 Thread Nathan Sidwell
This extends using-decls to modules. In modules you can export a using decl, but the exported decl must have external linkage already. One thing you can do is export something from the GMF. The novel thing is that now 'export using foo::bar;' *in namespace bar* can mean something significant

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-10 Thread Nikhil Benesch via Gcc-patches
On 12/10/20 2:34 PM, Rainer Orth wrote: I've just checked: is effectively unchanged since Solaris 10. Besides, there's gcc211 in the GCC compile farm, running Solaris 11.3/SPARC. Ah, thanks, I wasn't aware there was a compile farm available to GCC developers. I've applied for an account, but

Re: [PATCH 1/2] libstdc++: Add --enable-stdio=stdio_pure option [v2]

2020-12-10 Thread Jonathan Wakely via Gcc-patches
On 09/12/20 18:46 -0800, Keith Packard wrote: This option directs the library to only use simple stdio APIs instead of using fileno to get the file descriptor for use with POSIX APIs. This looks fine to me, even at this stage of GCC 11 (it doesn't affect the default configurations, just adds a

Re: [PATCH] c++: Diagnose unstable satisfaction results

2020-12-10 Thread Jason Merrill via Gcc-patches
On 12/10/20 11:21 AM, Patrick Palka wrote: This implements lightweight heuristical detection and diagnosing of satisfaction results that change at different points in the program, which renders the program as ill-formed NDR as of P2014. We've recently started to more aggressively cache satisfact

[pushed] c++: Add fixed test [PR91506]

2020-12-10 Thread Marek Polacek via Gcc-patches
Pre-r11-557 we issued a bogus error: parameter may not have variably modified type 'double [x]' but now we compile this, as we should. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: PR c++/91506 * g++.dg/init/array60.C: New test. --- gcc/testsuite/g+

[pushed] c++: Update value of __cplusplus for C++20.

2020-12-10 Thread Jason Merrill via Gcc-patches
It's past time to update this macro to the specified value for C++20. libcpp/ChangeLog: * init.c (cpp_init_builtins): Update __cplusplus for C++20. --- libcpp/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpp/init.c b/libcpp/init.c index f77dc26a003..79877

[pushed] c++: Add make_temp_override generator functions

2020-12-10 Thread Jason Merrill via Gcc-patches
A common pattern before C++17 is the generator function, used to avoid having to specify the type of a container element by using a function call to get type deduction; for example, std::make_pair. C++17 added class type argument deduction, making generator functions unnecessary for many uses, but

Re: [PATCH 1/2] libstdc++: Add --enable-stdio=stdio_pure option [v2]

2020-12-10 Thread Keith Packard via Gcc-patches
Jonathan Wakely writes: > I'll do a bit more testing and push it next week. That's awesome news. Thanks so much for you help; I'm looking forward to having real C++ support for my embedded customers! -- -keith signature.asc Description: PGP signature

c++: name lookup API for modules

2020-12-10 Thread Nathan Sidwell
This adds a set of calls to name lookup that are needed by modules. Generally installing imported bindings, or walking the current TU's bindings. One note about template instantiations though. When we're about to instantiate a template we have to know about all the maybe-partial specializations

[PATCH] x86: Update user interrupt handler stack frame

2020-12-10 Thread H.J. Lu via Gcc-patches
User interrupt handler stack frame is similar to exception interrupt handler stack frame. Instead of error code, the second argument is user interrupt request register vector. gcc/ PR target/98219 * config/i386/uintrintrin.h (__uintr_frame): Remove uirrv. gcc/testsuite/

Re: [PATCH] PowerPC: Map IEEE 128-bit long double built-in functions

2020-12-10 Thread Segher Boessenkool
Hi! On Thu, Nov 19, 2020 at 06:58:14PM -0500, Michael Meissner wrote: > * config/rs6000/rs6000.c (rs6000_mangle_decl_assembler_name): Add > support for mapping built-in function names for long double > built-in functions if long double is IEEE 128-bit. Please write what it does,

Re: [PATCH] c++: Diagnose unstable satisfaction results

2020-12-10 Thread Patrick Palka via Gcc-patches
On Thu, 10 Dec 2020, Jason Merrill wrote: > On 12/10/20 11:21 AM, Patrick Palka wrote: > > This implements lightweight heuristical detection and diagnosing of > > satisfaction results that change at different points in the program, > > which renders the program as ill-formed NDR as of P2014. We'v

[Ada] Fix PR ada/98230

2020-12-10 Thread Eric Botcazou
It's a rather curious malfunction of the 'Mod attribute applied to the variable of a loop whose upper bound is dynamic. Tested on x86-64/Linux, applied on all active branches. 2020-12-10 Ed Schonberg PR ada/98230 * exp_attr.adb (Expand_N_Attribute_Reference, case Mod): Use b

[PATCH, rs6000] Update "prefix" attribute for Power10

2020-12-10 Thread Pat Haugen via Gcc-patches
Update prefixed attribute for Power10. This patch was broken out from my larger patch to update various attributes for Power10, in order to make the review process hopefully easier. This patch only updates the prefix attribute for various new instructions. Changes in this version include missed u

[patch] [PR tree-optimization/98174] Reduce memory requirements for ranger

2020-12-10 Thread Andrew MacLeod via Gcc-patches
With very large CFG's ranger on entry cache is not particularly efficient. One thing I never got to was recognizing that if an ssa-name is never used in an outgoing edge calculation, then its range never changes.. the global range is sufficient and we do not need to propagate the on-entry cach

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-10 Thread Rainer Orth
Hi Nikhil, > On 12/10/20 2:34 PM, Rainer Orth wrote: >> I've just checked: is effectively unchanged since >> Solaris 10. >> >> Besides, there's gcc211 in the GCC compile farm, running Solaris 11.3/SPARC. > > Ah, thanks, I wasn't aware there was a compile farm available to GCC > developers. I've a

Re: [PATCH] ira.c: Fix ICE in ira-color [PR97092]

2020-12-10 Thread Vladimir Makarov via Gcc-patches
On 2020-12-10 10:12 a.m., Andrea Corallo wrote: Hi all, following discussion on PR97092 I'd like to submit the following patch with a fix plus associated testcase. With this patch applied mode is recomputed at each iteration while looping across different copies in 'update_costs_from_allocno'

Re: [PATCH] x86: Update user interrupt handler stack frame

2020-12-10 Thread Uros Bizjak via Gcc-patches
On Thu, Dec 10, 2020 at 10:20 PM H.J. Lu wrote: > > User interrupt handler stack frame is similar to exception interrupt > handler stack frame. Instead of error code, the second argument is > user interrupt request register vector. > > gcc/ > > PR target/98219 > * config/i386/uint

Re: [PATCH 2/1] c++: Diagnose self-recursive satisfaction

2020-12-10 Thread Patrick Palka via Gcc-patches
On Thu, 10 Dec 2020, Patrick Palka wrote: > This patch further extends the satisfaction_cache class to diagnose > self-recursive satisfaction. > > With this patch, a few more cmcstl2 tests fail at compile time due apparent > self-recursive satisfaction. I didn't analyze these failures > individu

[committed] libstdc++: Remove redundant branches in countl_one and countr_one [PR 98226]

2020-12-10 Thread Jonathan Wakely via Gcc-patches
There's no need to explicitly check for the maximum value, because the function we call handles it correctly anyway. libstdc++-v3/ChangeLog: PR libstdc++/98226 * include/std/bit (__countl_one, __countr_one): Remove redundant branches. Tested powerpc64le-linux. Committed t

[PATCH 2/1] c++: Diagnose self-recursive satisfaction

2020-12-10 Thread Patrick Palka via Gcc-patches
This patch further extends the satisfaction_cache class to diagnose self-recursive satisfaction. With this patch, a few more cmcstl2 tests fail at compile time due apparent self-recursive satisfaction. I didn't analyze these failures individually, but all errors contain view_interface::operator b

Re: [PATCH v5] Practical Improvement to libgcc Complex Divide

2020-12-10 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 10, 2020 at 10:27:46AM -0600, Patrick McGehearty via Gcc-patches wrote: > Thank you for your rapid feedback. > I'll fix the various formatting issues (spaces in the wrong places > and such as well as revise the Changelog magic) in the next submission. > It will wait for Joseph's review

[PATCH] aix: Fixinclude updates [PR98208]

2020-12-10 Thread Ilya Leoshkevich via Gcc-patches
Tested on gcc121 (x86_64 CentOS Linux 7). Ok for master? After 92648faa1cb2 ("aix: Fixinclude") make check-fixincludes began to fail (at least on gcc121 machine). Fix by updating fixincludes/tests and rerunning genfixes. fixincludes/ChangeLog: 2020-12-11 Ilya Leoshkevich * fixinc

Re: [PATCH] Add a new pattern in 4-insn combine

2020-12-10 Thread HAO CHEN GUI via Gcc-patches
Segher,     Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560573.html On 30/11/2020 上午 11:08, HAO CHEN GUI wrote: Hi,   This patch adds a new pattern(combine 4 insns to 3 insns) in 4-insn combine. In the patch, newpat is split twice. The newpat, newi2pat and newi

[PATCH,rs6000] Fusion patterns for logical-logical

2020-12-10 Thread acsawdey--- via Gcc-patches
From: Aaron Sawdey This patch adds a new function to genfusion.pl to generate patterns for logical-logical fusion. They are enabled by default for power10 and can be disabled by -mno-power10-fusion-2logical or -mno-power10-fusion. This patch builds on top of the load-cmpi patch posted earlier th

Re: [PATCH] gcc: handle double quotes in symbol name during stabstrings generation

2020-12-10 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 8, 2020 at 5:15 AM CHIGOT, CLEMENT wrote: > > Any news about this bug ? It's not urgent even if it's breaking gcc builds > with Go language, but I just want to know if you need any inputs/help from me. I sent https://golang.org/cl/277232 to fix this problem. Ian > ___

Re: [PATCH] Fix up testcase.

2020-12-10 Thread Hongtao Liu via Gcc-patches
On Thu, Dec 10, 2020 at 8:52 PM Prathamesh Kulkarni wrote: > > On Wed, 9 Dec 2020 at 15:52, Hongtao Liu wrote: > > > > On Wed, Dec 9, 2020 at 5:22 PM Prathamesh Kulkarni via Gcc-patches > > wrote: > > > > > > On Wed, 9 Dec 2020 at 00:29, sunil.k.pandey wrote: > > > > > > > > On Linux/x86_64, >

[PATCH] c++: missing SFINAE with pointer subtraction [PR78173]

2020-12-10 Thread Patrick Palka via Gcc-patches
This fixes a missed SFINAE when subtracting pointers to an incomplete type. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? gcc/cp/ChangeLog: PR c++/78173 * typeck.c (pointer_diff): Use complete_type_or_maybe_complain instead of complete_ty

Re: [PATCH] c++: missing SFINAE with pointer subtraction [PR78173]

2020-12-10 Thread Jason Merrill via Gcc-patches
Ok. On Fri, Dec 11, 2020, 12:45 AM Patrick Palka wrote: > This fixes a missed SFINAE when subtracting pointers to an incomplete > type. > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > trunk? > > gcc/cp/ChangeLog: > > PR c++/78173 > * typeck.c (point

Re: [PATCH] Fix up testcase.

2020-12-10 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 11 Dec 2020 at 10:46, Hongtao Liu wrote: > > On Thu, Dec 10, 2020 at 8:52 PM Prathamesh Kulkarni > wrote: > > > > On Wed, 9 Dec 2020 at 15:52, Hongtao Liu wrote: > > > > > > On Wed, Dec 9, 2020 at 5:22 PM Prathamesh Kulkarni via Gcc-patches > > > wrote: > > > > > > > > On Wed, 9 Dec 202

[PATCH] Complete _GLIBCXX_DEBUG constexpr compatibility

2020-12-10 Thread François Dumont via Gcc-patches
Hi I'd like to commit this small fix to complete _GLIBCXX_DEBUG constexpr compatibility. There are still 2 macros not using __glibcxx_assert_1. It fixes the generated diagnostic to have the __failed_assertion rather than a message saying that _Error_formatter::_M_error is not constexpr.    

Re: [PATCH] aix: Fixinclude updates [PR98208]

2020-12-10 Thread Richard Biener via Gcc-patches
On Fri, Dec 11, 2020 at 2:01 AM Ilya Leoshkevich via Gcc-patches wrote: > > Tested on gcc121 (x86_64 CentOS Linux 7). Ok for master? OK > > > After 92648faa1cb2 ("aix: Fixinclude") make check-fixincludes began to > fail (at least on gcc121 machine). Fix by updating fixincludes/tests > and reru

Re: Optimize combination of comparisons to dec+compare

2020-12-10 Thread Richard Biener via Gcc-patches
On Thu, Dec 10, 2020 at 1:52 AM Eugene Rozenfeld via Gcc-patches wrote: > > This patch adds a pattern for optimizing > x < y || x == XXX_MIN to x <= y-1 > if y is an integer with TYPE_OVERFLOW_WRAPS. Do we already handle x < y || x <= CST to x <= y - CST? That is, the XXX_MIN case is just a speci

Re: [RFC] [avr] Toolchain Integration for Testsuite Execution (avr cc0 to mode_cc0 conversion)

2020-12-10 Thread Richard Biener via Gcc-patches
On Thu, Dec 10, 2020 at 6:42 AM Dimitar Dimitrov wrote: > > On сряда, 9 декември 2020 г. 15:12:49 EET abebeos via Gcc-patches wrote: > > Essence: > > > > I need a confirmation that the testsuite setup as presented in: > > > > https://github.com/abebeos/avr-gnu > > > > works fine. > > > > The probl

Re: introduce overridable clear_cache emitter

2020-12-10 Thread Alexandre Oliva
On Dec 5, 2020, Jakub Jelinek wrote: > On Sat, Dec 05, 2020 at 06:01:59PM -0300, Alexandre Oliva wrote: >> On Dec 5, 2020, Andreas Schwab wrote: >> >> > ../../../../libffi/src/aarch64/ffi.c: In function 'ffi_prep_closure_loc': >> > ../../../../libffi/src/aarch64/ffi.c:67:3: internal compiler

[PATCH] expansion: Sign or zero extend on MEM_REF stores into SUBREG with SUBREG_PROMOTED_VAR_P [PR98190]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! Some target decide to promote certain scalar variables to wider mode, so their DECL_RTL is a SUBREG with SUBREG_PROMOTED_VAR_P. When storing to such vars, store_expr takes care of sign or zero extending, but if we store e.g. through MEM_REF into them, no sign or zero extension happens and that

Re: [PATCH V2] RISC-V: Explicitly call python when using multilib generator

2020-12-10 Thread Simon Cook
Hi Kito, Thanks for reviewing this. Since I don't have commit access, could you commit this for me. On 10/12/2020 02:32, Kito Cheng wrote: > Hi Simon: > > V2 version is LGTM, thanks! >

[PATCH] dojump: Optimize a == a or a != a [PR98169]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! If the backend doesn't have floating point EQ or NE comparison, dojump.c splits it into ORDERED && UNEQ or UNORDERED || LTGT. If both comparison operands are the same, we know the result of the second comparison though, a == b is equivalent to a ord b and a != b is equivalent to a unord b, an

Re: [PATCH V2] RISC-V: Explicitly call python when using multilib generator

2020-12-10 Thread Kito Cheng via Gcc-patches
Hi Simon: Committed, thanks :) On Thu, Dec 10, 2020 at 4:56 PM Simon Cook wrote: > > Hi Kito, > > Thanks for reviewing this. Since I don't have commit access, could you > commit this for me. > > On 10/12/2020 02:32, Kito Cheng wrote: > > Hi Simon: > > > > V2 version is LGTM, thanks! > >

[PATCH] varasm: Reject soft frame or arg pointer registers for register vars [PR92469]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch rejects frame and argp registers (unless they are equal to hard frame pointer registers) from local or global register vars. These are just internal implementation details eliminated later into hard frame pointer or stack pointer and using them as register variable leads to

[PATCH] dojump: Improve float != comparisons on x86 [PR98212]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! The x86 backend doesn't have EQ or NE floating point comparisons, so splits x != y into x unord y || x <> y. The problem with that is that unord comparison doesn't trap on qNaN operands but LTGT does. The end effect is that it doesn't trap on qNaN operands, because x unord y will be true for

Re: [PATCH][GCC10][1/6] arm: Add vld1_lane_bf16 + vldq_lane_bf16 intrinsics

2020-12-10 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > first patch of the series to backport a number of bfloat16 intrinsics from > trunk to gcc-10. > > These patch are including the fixes to the tests that we have applied > into master. > > Please see refer to: > ACLE

[PATCH] dojump: Fix up probabilities splitting in dojump.c comparison splitting [PR98212]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! When compiling: void foo (void); void bar (float a, float b) { if (__builtin_expect (a != b, 1)) foo (); } void baz (float a, float b) { if (__builtin_expect (a == b, 1)) foo (); } void qux (float a, float b) { if (__builtin_expect (a != b, 0)) foo (); } void corge (float a, float b) { if (__b

[committed] openmp: Fix ICE with broken doacross loop [PR98205]

2020-12-10 Thread Jakub Jelinek via Gcc-patches
Hi! If the loop body doesn't ever continue, we don't have a bb to insert the updates. Fixed by not adding them at all in that case. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2020-12-10 Jakub Jelinek PR middle-end/98205 * omp-expand.c (expand_

  1   2   >