Re: PING [PATCH] Enable GCC support for Intel Key Locker extension

2020-10-28 Thread Hongyu Wang via Gcc-patches
Hi Uros, > is there a reason to introduce all these (with corresponding changes)? > SSE options live in ISA bitmap, so it is kind of strange you need to > handle them in ISA2 bitmap. Option handling is not exactly my area, > please ask HJ to comment and review this part. As Hongtao said, this par

Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint.

2020-10-28 Thread Hongtao Liu via Gcc-patches
On Tue, Oct 27, 2020 at 7:13 PM Richard Sandiford wrote: > > Hongtao Liu via Gcc-patches writes: > > Hi: > > For inline asm, there could be an operand like (not (mem:)), it's > > not a valid operand for normal memory constraint. > > Bootstrap is ok, regression test is ok for make check > > RU

Re: [RS6000] float128-type-2.c unsupported

2020-10-28 Thread Alan Modra via Gcc-patches
On Wed, Oct 28, 2020 at 11:35:07PM -0400, David Edelsohn wrote: > Alan, > > It is disrespectful for you to ignore the review of a maintainer and > your colleague. You may not pick and choose amongst maintainers. And > Segher should not be so disrespectful as to contradict his colleague > and co-

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Nikhil Benesch via Gcc-patches
On Wed, Oct 28, 2020 at 7:53 PM Eduard-Mihai Burtescu wrote: > I agree that landing the extra changes later on top should be fine anyway, > though when I make the sprintf -> snprintf change, I could provide the extra > changes as well (either as a combined patch, or as a second tiny patch). > > Sa

Re: [RS6000] float128-type-2.c unsupported

2020-10-28 Thread David Edelsohn via Gcc-patches
On Wed, Oct 28, 2020 at 7:28 PM Alan Modra wrote: > > On Wed, Oct 28, 2020 at 01:44:54PM -0500, Segher Boessenkool wrote: > > On Wed, Oct 28, 2020 at 09:18:35PM +1030, Alan Modra wrote: > > > >From e7ce33cef478a826a2fe4e110b43b49586ef2438 Mon Sep 17 00:00:00 2001 > > > From: Alan Modra > > > Date

Re: libstdc++: Attempt to resolve PR83562

2020-10-28 Thread Jonathan Yong via Gcc-patches
On 10/27/20 2:38 PM, Liu Hao via Gcc-patches wrote: 在 2020/10/8 22:56, Jason Merrill 写道: Hmm, why isn't the mingw implementation used for all programs?  That would avoid the bug. There was a little further discussion about this [1]. TL;DR: The mingw-w64 function is linked statically and su

Re: [PATCH v2] c++: Implement CWG 625: Use of auto as template-arg [PR97479]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 02:34:15PM -0400, Jason Merrill via Gcc-patches wrote: > On 10/28/20 2:02 PM, Marek Polacek wrote: > > This patch implements CWG 625 which prohibits using auto in a template > > argument. A few tests used this construction. We could perhaps only > > give an error in C++20,

Re: [PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 02:43:30PM -0400, Jason Merrill wrote: > On 10/28/20 2:01 PM, Marek Polacek wrote: > > I noticed that C++20 P1120R0 deprecated certain arithmetic conversions > > as outlined in [depr.arith.conv.enum], but we don't warn about them. In > > particular, "If one operand is of en

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 05:48:08PM -0400, Jason Merrill wrote: > On 10/28/20 5:29 PM, Marek Polacek wrote: > > On Wed, Oct 28, 2020 at 02:46:36PM -0400, Jason Merrill wrote: > > > On 10/28/20 2:00 PM, Marek Polacek wrote: > > > > On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill wrote: > > >

Re: [PATCH] Call infer_non_null() directly when checking for non-null.

2020-10-28 Thread Andrew MacLeod via Gcc-patches
Of course, one needs the patch... On 10/28/20 10:04 PM, Andrew MacLeod wrote: The ranger currently handles "inferred" non-nulls with a special cache.. inferred ranges are thing like a_2 = *b_1 the dereference of b_1 implies that any use of b_1 after that statement is non-null  (or a trap wou

[PATCH] Call infer_non_null() directly when checking for non-null.

2020-10-28 Thread Andrew MacLeod via Gcc-patches
The ranger currently handles "inferred" non-nulls with a special cache.. inferred ranges are thing like a_2 = *b_1 the dereference of b_1 implies that any use of b_1 after that statement is non-null  (or a trap would have happened).  The problem is that most ranges are calculated as a result

Re: PING [PATCH] Enable GCC support for Intel Key Locker extension

2020-10-28 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 28, 2020 at 8:24 PM Uros Bizjak wrote: > > On Wed, Oct 28, 2020 at 10:54 AM Hongyu Wang wrote: > > > > Hi Uros, > > > > Thanks for the example. We've update the patterns with new expanders > > and predicates like vzeroall. > > Now the generated insn for "encodekey128u32" is like > >

Re: [PATCH] libstdc++: Implement C++20 features for

2020-10-28 Thread Jonathan Wakely via Gcc-patches
On 28/10/20 23:59 +, Jonathan Wakely wrote: On 26/10/20 21:09 +, Jonathan Wakely wrote: On 26/10/20 13:47 -0700, Thomas Rodgers wrote: From: Thomas Rodgers New ctors and ::view() accessor for - * basic_stingbuf * basic_istringstream * basic_ostringstream * basic_stringstreamm New ::g

libgo patch committed: Support NetBSD versioned symbols

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch adds support for NetBSD versioned symbols. On NetBSD, for backwards compatibility, various libc symbols are renamed to a symbol with a version suffix. For example, this is the (abbreviated) definition of sigaction: int sigaction(...) __asm__ ("__sigaction14"

Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint.

2020-10-28 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 29, 2020 at 2:46 AM Richard Sandiford wrote: > > Hongtao Liu writes: > > On Tue, Oct 27, 2020 at 7:13 PM Richard Sandiford > > wrote: > >> > >> Hongtao Liu via Gcc-patches writes: > >> > Hi: > >> > For inline asm, there could be an operand like (not (mem:)), it's > >> > not a vali

[Withdraw patch] PowerPC: Add -mno-gnu-attributes to ibm-ldouble.o

2020-10-28 Thread Michael Meissner via Gcc-patches
Please withdraw from consideration the patch that turned on -mno-gnu-attribute for just the ibm-ldouble.o module in favor of the patch for PR libgcc/97543 that I just posted: PR libgcc/97543 patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557413.html Withdrawn patch: https://

Re: [PATCH] rs6000, Add bcd builtings listed in appendix B of the ABI

2020-10-28 Thread David Edelsohn via Gcc-patches
On Wed, Oct 28, 2020 at 7:21 PM Carl Love wrote: > > David: > > On Sat, 2020-10-24 at 11:29 -0400, David Edelsohn wrote: > > Hi, Carl > > > > Not commenting on the implementation. > > > > Please stop using powerpc*-*-* in the test cases. The test cases > > already are in the gcc.target/powerpc di

[PATCH] PowerPC: PR libgcc/97543, build libgcc with -mno-gnu-attribute

2020-10-28 Thread Michael Meissner via Gcc-patches
PowerPC: PR libgcc/97543, fix 64-bit long double issues There are two issues in PR libgcc/97543 which shows up if you build a GCC compiler with long double defaulting to 64-bit instead of 128-bit with IBM extended double: 1) The first issue was the t-linux file forced the entire libgcc libra

[committed] analyzer: more non-determinism fixes

2020-10-28 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as f635f0ce87d687b177b734968f18226d50499e75. gcc/analyzer/ChangeLog: * program-state.cc (sm_state_map::on_liveness_change): Sort the leaking svalues before calling on_state_leak. (program_state:

[committed] analyzer: fix false leak diagnostic on offsets from malloc [PR97608]

2020-10-28 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-4510-g1a9af271275f4893e28c789c8f1964025694eda1. gcc/analyzer/ChangeLog: PR analyzer/97608 * region-model-reachability.cc (reachable_regions::handle_sval): Operands of reachable reversible

[committed] analyzer: move svalue and region decls to their own header files

2020-10-28 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as e9751143e237b507a81234a573a200ea45e7111a. gcc/ChangeLog: * Makefile.in (ANALYZER_OBJS): Add analyzer/complexity.o. gcc/analyzer/ChangeLog: * analyzer.h (class state_machine): New forward decl.

[committed] analyzer: fix more pointer-printing in logs

2020-10-28 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as 0a36f5f21cd9dcaaf99e78d2ec995d6cb2918274. gcc/analyzer/ChangeLog: * program-state.cc (sm_state_map::print): Guard the printing of the origin pointer with !flag_dump_noaddr. * region.cc (strin

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-28 Thread Segher Boessenkool
On Thu, Oct 22, 2020 at 06:06:03PM -0400, Michael Meissner wrote: > This patch adds the various decimal to/from IEEE 128-bit conversions. I > had to make some changes to the infrastructure, since that infrastructure > assumed that there is a sprintf/scanf format modifier to convert floating > poin

Re: [PATCH] libstdc++: Implement C++20 features for

2020-10-28 Thread Jonathan Wakely via Gcc-patches
On 26/10/20 21:09 +, Jonathan Wakely wrote: On 26/10/20 13:47 -0700, Thomas Rodgers wrote: From: Thomas Rodgers New ctors and ::view() accessor for - * basic_stingbuf * basic_istringstream * basic_ostringstream * basic_stringstreamm New ::get_allocator() accessor for basic_stringbuf. lib

[PATCH] Asan changes for RISC-V.

2020-10-28 Thread Jim Wilson
We have only riscv64 asan support, there is no riscv32 support as yet. So I need to be able to conditionally enable asan support for the riscv target. I implemented this by returning zero from the asan_shadow_offset function. This requires a change to toplev.c and docs in target.def. The asan s

[PATCH][middle-end][i386][version 5]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-gpr-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Qing Zhao via Gcc-patches
Hi, This is the 5th version of the implementation of patch -fzero-call-used-regs. The major change compared to the previous version (4th version) are: 1. Documentation change per Richard’s suggestion; 2. Use namespace for zero_regs_code; 3. Add more general testing cases per Richard’s suggestio

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Eduard-Mihai Burtescu
Hi Ian, Thanks for replying! (Also I'm really sorry for the missing hard wrapping in my earlier email, I shouldn't have sent that from my phone) Regarding this being a blocker: we've already made the changes to Rust, and the new ("v0") mangling format continues to remain opt-in and nightly-only,

Re: [PATCH v2] c++: Implement -Wvexing-parse [PR25814]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 03:09:08PM -0400, Jason Merrill wrote: > On 10/28/20 1:58 PM, Marek Polacek wrote: > > On Wed, Oct 28, 2020 at 01:26:53AM -0400, Jason Merrill via Gcc-patches > > wrote: > > > On 10/24/20 7:40 PM, Marek Polacek wrote: > > > > On Fri, Oct 23, 2020 at 09:33:38PM -0400, Jason

Re: [RS6000] float128-type-2.c unsupported

2020-10-28 Thread Alan Modra via Gcc-patches
On Wed, Oct 28, 2020 at 01:44:54PM -0500, Segher Boessenkool wrote: > On Wed, Oct 28, 2020 at 09:18:35PM +1030, Alan Modra wrote: > > >From e7ce33cef478a826a2fe4e110b43b49586ef2438 Mon Sep 17 00:00:00 2001 > > From: Alan Modra > > Date: Wed, 28 Oct 2020 15:57:57 +1030 > > Subject: > > > > I noti

Re: PowerPC: Update IEEE 128-bit built-ins for long double is IEEE 128-bit.

2020-10-28 Thread Segher Boessenkool
On Thu, Oct 22, 2020 at 06:09:38PM -0400, Michael Meissner wrote: > This patch adds long double variants of the power10 __float128 built-in > functions. This is needed when long double uses IEEE 128-bit because > __float128 uses TFmode in this case instead of KFmode. If this patch is not > applie

stdbool.h: Update true and false expansions for C2x

2020-10-28 Thread Joseph Myers
C2x has changed the expansions of the true and false macros in so that they have type _Bool (including in #if conditions, i.e. an unsigned type in that context). Use the new expansions in GCC's for C2x. See bug 82272 for related discussion (but this patch does *not* implement the warning discus

Re: [PATCH] rs6000, Add bcd builtings listed in appendix B of the ABI

2020-10-28 Thread Carl Love via Gcc-patches
David: On Sat, 2020-10-24 at 11:29 -0400, David Edelsohn wrote: > Hi, Carl > > Not commenting on the implementation. > > Please stop using powerpc*-*-* in the test cases. The test cases > already are in the gcc.target/powerpc directory. > > Do the test cases really need lp64, or should this re

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
On Wed, Oct 28, 2020 at 3:22 PM Nikhil Benesch via Gcc-patches wrote: > > I think it is mostly a matter of snagging some of Ian's limited time. > I suspect it is still worthwhile to try to get the original patch > reviewed and merged, because then any follow-up changes for const > generics support

Re: [RS6000] Don't be too clever with dg-do run and dg-do compile

2020-10-28 Thread Alan Modra via Gcc-patches
On Wed, Oct 28, 2020 at 12:16:00PM -0500, Segher Boessenkool wrote: > On Wed, Oct 28, 2020 at 09:20:56PM +1030, Alan Modra wrote: > > Otherwise some versions of dejagnu go ahead and run the vsx tests > > below when they should not. To best cope with older dejagnu, put > > "run" before "compile", t

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Nikhil Benesch via Gcc-patches
I think it is mostly a matter of snagging some of Ian's limited time. I suspect it is still worthwhile to try to get the original patch reviewed and merged, because then any follow-up changes for const generics support will be smaller and easier to review. On Wed, Oct 28, 2020 at 5:48 PM Eduard-Mi

Re: PowerPC: Use __builtin_pack_ieee128 if long double is IEEE 128-bit.

2020-10-28 Thread Segher Boessenkool
Hi Mike, On Thu, Oct 22, 2020 at 06:10:37PM -0400, Michael Meissner wrote: > PowerPC: Use __builtin_pack_ieee128 if long double is IEEE 128-bit. This title makes no sense, and thankfully is not what the patch does :-) > This patch changes the __ibm128 emulator to use __builtin_pack_ieee128 > ins

Re: [PATCH] c++: Improve the MVP -Wparentheses diagnostic.

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 5:14 PM, Marek Polacek wrote: I noticed that declarator->parenthesized is, for this warning, only set to the opening paren. But we can easily make it a range and generate a nicer diagnostic. Moreover, we can then offer a fix-it hint. TL;DR: This patch changes mvp3.C:8:7: warning:

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Eduard-Mihai Burtescu
FWIW, the patch has become slightly outdated compared to the Rust upstream, so if someone wants to review it I should prepare a new version. The changes would be for the MVP version of "const generics" (Rust's equivalent to C++ templates with value parameters, enabling e.g. types like `CustomAr

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 5:29 PM, Marek Polacek wrote: On Wed, Oct 28, 2020 at 02:46:36PM -0400, Jason Merrill wrote: On 10/28/20 2:00 PM, Marek Polacek wrote: On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill wrote: On 10/24/20 6:52 PM, Marek Polacek wrote: Here, in r11-155, I changed the call to u

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 02:46:36PM -0400, Jason Merrill wrote: > On 10/28/20 2:00 PM, Marek Polacek wrote: > > On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill wrote: > > > On 10/24/20 6:52 PM, Marek Polacek wrote: > > > > Here, in r11-155, I changed the call to uses_template_parms to > > >

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Nikhil Benesch via Gcc-patches
On 10/28/20 5:22 PM, Nikhil Benesch wrote: Ian, are you able to review this? I saw that you reviewed many of the prior changes to the Rust demangler. If not, can you suggest someone who can? Thanks very much. Nikhil I seem to have failed to convince my email client to set the appropriate re

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Nikhil Benesch via Gcc-patches
Ian, are you able to review this? I saw that you reviewed many of the prior changes to the Rust demangler. If not, can you suggest someone who can? Thanks very much. Nikhil

[PATCH] c++: Improve the MVP -Wparentheses diagnostic.

2020-10-28 Thread Marek Polacek via Gcc-patches
I noticed that declarator->parenthesized is, for this warning, only set to the opening paren. But we can easily make it a range and generate a nicer diagnostic. Moreover, we can then offer a fix-it hint. TL;DR: This patch changes mvp3.C:8:7: warning: unnecessary parentheses in declaration of ‘i

Re: [PATCH 2/2] combine: Don't turn (mult (extend x) 2^n) into extract

2020-10-28 Thread Segher Boessenkool
Hi! On Wed, Oct 28, 2020 at 11:13:28AM +, Alex Coplan wrote: > This fails bootstrap since we trigger -Wsign-compare without the cast to > unsigned HOST_WIDE_INT on shift_amt: > > + else if (GET_CODE (inner) == MULT > +&& CONST_INT_P (XEXP (inner, 1)) > +&& pos_rtx == 0 && pos

Re: [PATCH] c++: Member template function lookup failure [PR94799]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/19/20 8:52 PM, Marek Polacek wrote: My earlier patch for this PR, r11-86, broke pybind11. That patch changed cp_parser_class_name to also consider the object expression scope (parser->context->object_type) to fix parsing of p->template A::foo(); // consider p's scope too Here we rejec

Re: [PATCH] c++: Deducing type from initializer_list [PR93107]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/16/20 11:31 AM, Marek Polacek wrote: In this testcase we weren't able to deduce b's type: template void Task() { } auto b = { &Task }; because resolve_nondeduced_context doesn't iterate on the {}'s elements. So make sure to look into {} too. We don't need to handle nested {} here.

Re: libgo patch committed: Additional BSD-specific syscall wrappers

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
On Wed, Oct 28, 2020 at 2:53 AM Rainer Orth wrote: > > > This libgo patch by Nikhil Benesch imports additional code from > > upstream for handing system calls on BSD systems. This makes the > > syscall package on NetBSD complete enough to compile the standard > > library. Boostrapped and ran Go

[committed][PATCH]AArch64 Skip test for pr97535 on ILP32 since it can't express the range.

2020-10-28 Thread Tamar Christina via Gcc-patches
Hi All, I am excluding the test from ILP32 since the goal of the test is to test truncations of large numbers above INT_MAX. Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: PR target/97535 * gcc.target

Re: [PATCH v2] c++: Implement -Wvexing-parse [PR25814]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 1:58 PM, Marek Polacek wrote: On Wed, Oct 28, 2020 at 01:26:53AM -0400, Jason Merrill via Gcc-patches wrote: On 10/24/20 7:40 PM, Marek Polacek wrote: On Fri, Oct 23, 2020 at 09:33:38PM -0400, Jason Merrill via Gcc-patches wrote: On 10/23/20 3:01 PM, Marek Polacek wrote: This patc

c: Allow omitted parameter names for C2x

2020-10-28 Thread Joseph Myers
C2x allows parameter names to be omitted in function definitions, as in C++; add support for this feature. As with other features that only result in previously rejected code being accepted, this feature is now accepted as an extension for previous standard versions, with a pedwarn-if-pedantic tha

Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint.

2020-10-28 Thread Richard Sandiford via Gcc-patches
Hongtao Liu writes: > On Tue, Oct 27, 2020 at 7:13 PM Richard Sandiford > wrote: >> >> Hongtao Liu via Gcc-patches writes: >> > Hi: >> > For inline asm, there could be an operand like (not (mem:)), it's >> > not a valid operand for normal memory constraint. >> > Bootstrap is ok, regression t

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 2:00 PM, Marek Polacek wrote: On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill wrote: On 10/24/20 6:52 PM, Marek Polacek wrote: Here, in r11-155, I changed the call to uses_template_parms to type_dependent_expression_p_push to avoid a crash in C++98 in value_dependent_express

c++: Make OMP UDR DECL_LOCAL_DECL_P earlier

2020-10-28 Thread Nathan Sidwell
I discovered that we were pushing an OMP UDR in a template before setting DECL_LOCAL_DECL. This caused the template machinery to give it some template info. It doesn't need that, and this changes the parser to set it earlier. We have to adjust instantiate_body to not try and access such a func

Re: [RS6000] float128-type-2.c unsupported

2020-10-28 Thread Segher Boessenkool
On Wed, Oct 28, 2020 at 09:18:35PM +1030, Alan Modra wrote: > >From e7ce33cef478a826a2fe4e110b43b49586ef2438 Mon Sep 17 00:00:00 2001 > From: Alan Modra > Date: Wed, 28 Oct 2020 15:57:57 +1030 > Subject: > > I noticed this test is unsupported on power10 when looking through > test logs. There s

Re: [PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 2:01 PM, Marek Polacek wrote: I noticed that C++20 P1120R0 deprecated certain arithmetic conversions as outlined in [depr.arith.conv.enum], but we don't warn about them. In particular, "If one operand is of enumeration type and the other operand is of a different enumeration type or

Re: [PATCH] c++: Implement CWG 625: Use of auto as template-arg [PR97479]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 2:02 PM, Marek Polacek wrote: This patch implements CWG 625 which prohibits using auto in a template argument. A few tests used this construction. We could perhaps only give an error in C++20, but not in C++17 with -fconcepts. We should not give an error with -fconcepts-ts, this w

Re: [PATCH] c++: GCC accepts junk before fold-expression [PR86773]

2020-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/20 2:02 PM, Marek Polacek wrote: Here we accept a bogus expression before a left fold: Recall that a fold expression looks like: fold-expression: ( cast-expression fold-operator ... ) ( ... fold-operator cast-expression ) ( cast-expression fold-operator ... fold-operat

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-28 Thread Christophe Lyon via Gcc-patches
On Wed, 28 Oct 2020 at 18:44, Richard Earnshaw wrote: > > On 27/10/2020 15:42, Richard Earnshaw via Gcc-patches wrote: > > On 26/10/2020 10:52, Christophe Lyon via Gcc-patches wrote: > >> On Thu, 22 Oct 2020 at 17:22, Richard Earnshaw > >> wrote: > >>> > >>> On 22/10/2020 09:45, Christophe Lyon v

[PATCH] c++: GCC accepts junk before fold-expression [PR86773]

2020-10-28 Thread Marek Polacek via Gcc-patches
Here we accept a bogus expression before a left fold: Recall that a fold expression looks like: fold-expression: ( cast-expression fold-operator ... ) ( ... fold-operator cast-expression ) ( cast-expression fold-operator ... fold-operator cast-expression ) but here we have ( ca

[PATCH] c++: Implement CWG 625: Use of auto as template-arg [PR97479]

2020-10-28 Thread Marek Polacek via Gcc-patches
This patch implements CWG 625 which prohibits using auto in a template argument. A few tests used this construction. We could perhaps only give an error in C++20, but not in C++17 with -fconcepts. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: DR 625

[PATCH] c++: Deprecate arithmetic convs on different enums [PR97573]

2020-10-28 Thread Marek Polacek via Gcc-patches
I noticed that C++20 P1120R0 deprecated certain arithmetic conversions as outlined in [depr.arith.conv.enum], but we don't warn about them. In particular, "If one operand is of enumeration type and the other operand is of a different enumeration type or a floating-point type, this behavior is depr

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill wrote: > On 10/24/20 6:52 PM, Marek Polacek wrote: > > Here, in r11-155, I changed the call to uses_template_parms to > > type_dependent_expression_p_push to avoid a crash in C++98 in > > value_dependent_expression_p on a non-constant expressi

Re: [PATCH v2] c++: Implement -Wvexing-parse [PR25814]

2020-10-28 Thread Marek Polacek via Gcc-patches
On Wed, Oct 28, 2020 at 01:26:53AM -0400, Jason Merrill via Gcc-patches wrote: > On 10/24/20 7:40 PM, Marek Polacek wrote: > > On Fri, Oct 23, 2020 at 09:33:38PM -0400, Jason Merrill via Gcc-patches > > wrote: > > > On 10/23/20 3:01 PM, Marek Polacek wrote: > > > > This patch implements the -Wvexi

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-28 Thread Richard Earnshaw via Gcc-patches
On 27/10/2020 15:42, Richard Earnshaw via Gcc-patches wrote: > On 26/10/2020 10:52, Christophe Lyon via Gcc-patches wrote: >> On Thu, 22 Oct 2020 at 17:22, Richard Earnshaw >> wrote: >>> >>> On 22/10/2020 09:45, Christophe Lyon via Gcc-patches wrote: On Wed, 21 Oct 2020 at 19:36, Richard Earn

Re: [PING] [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-10-28 Thread Jeff Law via Gcc-patches
On 10/28/20 11:29 AM, Stefan Schulze Frielinghaus wrote: > On Wed, Oct 28, 2020 at 08:39:41AM -0600, Jeff Law wrote: >> On 10/28/20 3:38 AM, Stefan Schulze Frielinghaus via Gcc-patches wrote: >>> On Mon, Oct 05, 2020 at 02:02:57PM +0200, Stefan Schulze Frielinghaus via >>> Gcc-patches wrote: >>>

Re: [PING] [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-10-28 Thread Stefan Schulze Frielinghaus via Gcc-patches
On Wed, Oct 28, 2020 at 08:39:41AM -0600, Jeff Law wrote: > > On 10/28/20 3:38 AM, Stefan Schulze Frielinghaus via Gcc-patches wrote: > > On Mon, Oct 05, 2020 at 02:02:57PM +0200, Stefan Schulze Frielinghaus via > > Gcc-patches wrote: > >> On Tue, Sep 22, 2020 at 02:59:30PM +0200, Andreas Krebbel

Re: [RS6000] Don't be too clever with dg-do run and dg-do compile

2020-10-28 Thread Segher Boessenkool
On Wed, Oct 28, 2020 at 09:20:56PM +1030, Alan Modra wrote: > Otherwise some versions of dejagnu go ahead and run the vsx tests > below when they should not. To best cope with older dejagnu, put > "run" before "compile", the idea being that if the second dg-do always > wins then that won't cause f

Re: [RS6000] Don't be too clever with dg-do run and dg-do compile

2020-10-28 Thread Segher Boessenkool
On Wed, Oct 28, 2020 at 10:05:14AM -0500, will schmidt wrote: > On Wed, 2020-10-28 at 21:20 +1030, Alan Modra via Gcc-patches wrote: > > Otherwise some versions of dejagnu go ahead and run the vsx tests > > below when they should not. To best cope with older dejagnu, put > > "run" before "compile"

Re: [patch, shared coarrays, committed] Make header use more consistent

2020-10-28 Thread Nicolas König
Hi Andre, I'll make another pass after I'm done implementing stat & errmsg to remove any reference to native coarrays I find. Kind regards, Nicolas On 28/10/2020 09:25, Andre Vehreschild wrote: Hi Nicolas, Thomas, are you planing to also rename the directory and library name from "nca" t

Re: [PATCH v4] builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-10-28 Thread Segher Boessenkool
On Wed, Oct 28, 2020 at 12:09:54PM -0300, Raoni Fassina Firmino wrote: > * builtins.c (expand_builtin_fegetround): New function. > (expand_builtin_feclear_feraise_except): New function. > (expand_builtin): Add cases for BUILT_IN_FEGETROUND, > BUILT_IN_FECLEAREXCEPT a

Re: [PATCH] libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]

2020-10-28 Thread Patrick Palka via Gcc-patches
On Wed, 28 Oct 2020, Jonathan Wakely wrote: > On 28/10/20 11:21 -0400, Patrick Palka via Libstdc++ wrote: > > On Wed, 28 Oct 2020, Patrick Palka wrote: > > > > > The conversion function year_month_weekday::operator sys_days computes > > > the number of days to offset from the first weekday of the

Re: deprecations in OpenMP 5.0

2020-10-28 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 28, 2020 at 03:41:25PM +, Kwok Cheung Yeung wrote: > I found this almost two-year old thread while looking for how the OpenMP 5.0 > deprecations were to be handled. > > > E.g. if somebody tries hard to write portable OpenMP code and has: > > omp_lock_t lock; > > #if __OPENMP__

Re: [PATCH] libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]

2020-10-28 Thread Jonathan Wakely via Gcc-patches
On 28/10/20 11:21 -0400, Patrick Palka via Libstdc++ wrote: On Wed, 28 Oct 2020, Patrick Palka wrote: The conversion function year_month_weekday::operator sys_days computes the number of days to offset from the first weekday of the month with: days{(index()-1)*7} ^ type 'un

Re: [PATCH] libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]

2020-10-28 Thread Jonathan Wakely via Gcc-patches
On 28/10/20 11:04 -0400, Patrick Palka via Libstdc++ wrote: The conversion function year_month_weekday::operator sys_days computes the number of days to offset from the first weekday of the month with: days{(index()-1)*7} ^ type 'unsigned' We'd like the above to yield -7d when

Re: Materialize clones on demand

2020-10-28 Thread Jan Hubicka
> > > > However main problem is > > > > cfg.c:202 (connect_src) 5745k: 0.2% > > > > 271M: 1.9% 1754k: 0.0% 1132k: 0.2% 7026k > > > > cfg.c:212 (connect_dest) 6307k: 0.2% > > > > 281M: 2.0%10129k: 0.2%

Re: deprecations in OpenMP 5.0

2020-10-28 Thread Kwok Cheung Yeung
Hello I found this almost two-year old thread while looking for how the OpenMP 5.0 deprecations were to be handled. E.g. if somebody tries hard to write portable OpenMP code and has: omp_lock_t lock; #if __OPENMP__ >= 201811L omp_init_lock_with_hint (&lock, omp_sync_hint_contended); #

Re: [PATCH][middle-end][i386][Version 4] Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: > Hi, Richard, > > I changed the “enum” to “namespace”. > > There is no issue for C++ compilation. However, flag-types.h header file is > also included by C modules and compiled with gcc, then I got a lot of > following compilation errors: > > make[4]: Entering directory > '/

[PATCH] dump when SLP analysis fails due to shared vectype mismatch

2020-10-28 Thread Richard Biener
This adds another one. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-10-28 Richard Biener * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Dump when shared vectype update fails. --- gcc/tree-vect-slp.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH] libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]

2020-10-28 Thread Patrick Palka via Gcc-patches
On Wed, 28 Oct 2020, Patrick Palka wrote: > The conversion function year_month_weekday::operator sys_days computes > the number of days to offset from the first weekday of the month with: > > days{(index()-1)*7} > ^ type 'unsigned' > > We'd like the above to yield -7d when in

c++: Refactor push_template_decl

2020-10-28 Thread Nathan Sidwell
Sadly I need to wander into push_template_decl again. But here's a piece of RAII goodness first. gcc/cp/ * pt.c (push_template_decl): Refactor for some RAII. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c index 3c0f2546489..0d2946fd7c4 100644

Re: [PATCH][middle-end][i386][Version 4] Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Qing Zhao via Gcc-patches
Hi, Richard, I changed the “enum” to “namespace”. There is no issue for C++ compilation. However, flag-types.h header file is also included by C modules and compiled with gcc, then I got a lot of following compilation errors: make[4]: Entering directory '/home/qinzhao/Work/x86-build/x86_64-p

[PATCH v4] builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-10-28 Thread Raoni Fassina Firmino via Gcc-patches
I am repeating the "changelog" from v3 here because v4 is just one bugfix. I also tested on BE systems for v4. Changes since v3[1]: - Fixed fegetround bug on powerpc64 (big endian) that Segher spotted; Changes since v2[2]: - Added documentation for the new optabs; - Remove use of non po

Re: [RS6000] Don't be too clever with dg-do run and dg-do compile

2020-10-28 Thread will schmidt via Gcc-patches
On Wed, 2020-10-28 at 21:20 +1030, Alan Modra via Gcc-patches wrote: > Otherwise some versions of dejagnu go ahead and run the vsx tests > below when they should not. To best cope with older dejagnu, put > "run" before "compile", the idea being that if the second dg-do always > wins then that won'

[PATCH] libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]

2020-10-28 Thread Patrick Palka via Gcc-patches
The conversion function year_month_weekday::operator sys_days computes the number of days to offset from the first weekday of the month with: days{(index()-1)*7} ^ type 'unsigned' We'd like the above to yield -7d when index() is 0u, but our 'days' alias is based on long instea

Re: [PATCH 1/X] libsanitizer: Tie the hwasan library into our build system

2020-10-28 Thread Richard Sandiford via Gcc-patches
I have the feeling that I've picked the most awkward of each binary choice here, sorry… Matthew Malcomson writes: > - Parametrising the tag size is pretty easy towards less bits, the current > code > handles this quite nicely using HWASAN_TAG_SIZE and in fact I've already done > that for a WIP b

Re: [RS6000] Do not define builtins that overload disabled builtins

2020-10-28 Thread David Edelsohn via Gcc-patches
On Wed, Oct 28, 2020 at 6:46 AM Alan Modra wrote: > > commit 25ffd3d34e means we no longer define an overloaded > __builtin_byte_in_set for -m32, so the more informative > "__builtin_byte_in_set is not supported in this compiler > configuration" is not reported. > > Regression tested powerpc64-lin

Re: [PING] [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-10-28 Thread Jeff Law via Gcc-patches
On 10/28/20 3:38 AM, Stefan Schulze Frielinghaus via Gcc-patches wrote: > On Mon, Oct 05, 2020 at 02:02:57PM +0200, Stefan Schulze Frielinghaus via > Gcc-patches wrote: >> On Tue, Sep 22, 2020 at 02:59:30PM +0200, Andreas Krebbel wrote: >>> On 15.09.20 17:02, Stefan Schulze Frielinghaus wrote: >

Re: [PATCH][middle-end][i386][Version 4] Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Qing Zhao via Gcc-patches
Okay, I will change it to namespace. Qing > On Oct 28, 2020, at 9:19 AM, Richard Sandiford > wrote: > > Qing Zhao mailto:qing.z...@oracle.com>> writes: >> Hi, Richard, >> >> In order to be consistent with other flags in flag-types.h, for example, >> “sanitize_code”, >> I didn’t use namespace

[patch] vxworks: Fix the logic conditioning VX_ENTER/LEAVE_TLS_DTOR

2020-10-28 Thread Olivier Hainque
This change fixes a basic #if/#ifdef confusion exposed by the wider range of testing we’re running for the forthcoming introduction of additional support for VxWorks 7r2, which comes together with a few organizational changes to keep supporting older versions. Committing as obvious after checking

[PATCH] openmp: Implicit 'declare target' for C++ static initializers

2020-10-28 Thread Kwok Cheung Yeung
Hello OpenMP 5.0 has a new feature for implicitly marking variables and functions that are referenced in the initializers of static variables and functions that are already marked 'declare target'. Support was added in the commit 'openmp: Implement discovery of implicit declare target to claus

Re: [PATCH][middle-end][i386][Version 4] Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: > Hi, Richard, > > In order to be consistent with other flags in flag-types.h, for example, > “sanitize_code”, > I didn’t use namespace, instead making the name more specific as following: > > /* Different settings for zeroing subset of registers. */ > enum zero_regs_flags { >

[PATCH] Ignore ignored operands in vect_get_and_check_slp_defs

2020-10-28 Thread Richard Biener
This passes down skip_args to vect_get_and_check_slp_defs to skip ignored ops there, too and not fail SLP discovery. This fixes gcc.target/aarch64/sve/reduc_strict_5.c Bootstrap & regtest running on x86_64-unknown-linux-gnu. 2020-10-28 Richard Biener * tree-vect-slp.c (vect_get_and_c

Re: [PATCH][middle-end][i386][Version 4] Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-28 Thread Qing Zhao via Gcc-patches
Hi, Richard, In order to be consistent with other flags in flag-types.h, for example, “sanitize_code”, I didn’t use namespace, instead making the name more specific as following: /* Different settings for zeroing subset of registers. */ enum zero_regs_flags { ZERO_REGS_UNSET = 0, ZERO_REGS

[patch] vxworks: Fix conditional inclusion guard in gthr-vxworks-thread.c

2020-10-28 Thread Olivier Hainque
This change fixes the name of the macro used to condition the inclusion of an actual implementation of some of the gthread support services for VxWorks, to agree with the side defining that macro based on tests against the targetted VxWorks version major. Tested by verifying the desired effect of

Re: [PATCH 1/X] libsanitizer: Tie the hwasan library into our build system

2020-10-28 Thread Matthew Malcomson via Gcc-patches
Hi Richard, I've done most of the updates you suggested, but have a few questions to ensure I have the right end of the stick before making the remaining changes. There are also a few clarifications I'd like to make where I hadn't explained the rationale for certain bits of the original code, and

RE: [PATCH 1/2] Enable OpenMP efficient performance profiling via ITT tracing

2020-10-28 Thread Vitaly Slobodskoy
Hi Jakub, Thanks for your comments! Please see my reply below. > > In order to optimize OpenMP workloads, it is quite important to have a > dedicated performance analysis tool familiar with the OpenMP runtime > specifics. The typical OpenMP performance issues are: > > - Not all the performance-cr

[PATCH] tree-optimization/97615 - avoid creating externals from patterns

2020-10-28 Thread Richard Biener
The previous change missed to check for patterns again, the following corrects that. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. 2020-10-28 Richard Biener PR tree-optimization/97615 * tree-vect-slp.c (vect_build_slp_tree_2): Do not build an external

[PATCH] Fix iteration over loads in SLP optimize

2020-10-28 Thread Richard Biener
I've made a typo when refactoring the iteration over all loads in the SLP graph. Fixed. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. 2020-10-28 Richard Biener * tree-vect-slp.c (vect_optimize_slp): Fix iteration over all loads. --- gcc/tree-vect-slp.c | 2 +

Re: [PATCH] vect: Fix load costs for SLP permutes

2020-10-28 Thread Richard Biener via Gcc-patches
On Wed, Oct 28, 2020 at 2:39 PM Richard Sandiford via Gcc-patches wrote: > > For the following test case (compiled with load/store lanes > disabled locally): > > void > f (uint32_t *restrict x, uint8_t *restrict y, int n) > { > for (int i = 0; i < n; ++i) > { > x[i * 2] = x

[PATCH] Fix gcc.dg/vect/bb-slp-5[89].c

2020-10-28 Thread Richard Biener
I forgot a vect_double check. Testing in progress. 2020-10-28 Richard Biener * gcc.dg/vect/bb-slp-58.c: Require vect_double. * gcc.dg/vect/bb-slp-59.c: Likewise. --- gcc/testsuite/gcc.dg/vect/bb-slp-58.c | 1 + gcc/testsuite/gcc.dg/vect/bb-slp-59.c | 1 + 2 files changed, 2 i

  1   2   >