Re: [PATCH] RISC-V: Add support for -mcpu option.

2020-10-14 Thread Kito Cheng via Gcc-patches
Committed, thanks, other improvement changes will be sent in separate patches in the next few days :) On Thu, Oct 15, 2020 at 5:41 AM Jim Wilson wrote: > > On Tue, Oct 13, 2020 at 3:09 AM Kito Cheng wrote: > > - The behavior of -mcpu basically equal to -march plus -mtune, but it > >has lowe

[ping] aarch64: move and adjust PROBE_STACK_*_REG

2020-10-14 Thread Olivier Hainque
Ping, please ? Patch re-attached for convenience. Thanks in advance! Best Regards, Olivier > On 24 Sep 2020, at 11:46, Olivier Hainque wrote: > > Re-proposing this patch after re-testing with a recent > mainline on on aarch64-linux (bootstrap and regression test > with --enable-languages=all

Re: [PATCH] Treat { 0 } specially for structs with the designated_init attribute.

2020-10-14 Thread Asher Gordon via Gcc-patches
Hello, Jeff Law writes: >> Is there any reason my patches haven't been applied yet? Is there >> anything else I need to do? > No, nothing you really need to do. We're backed up more than usual, > but yours is definitely in the queue. It's been a while. Any chance of getting my patch applied so

[PATCH] Add analyzer plugin support and CPython GIL example

2020-10-14 Thread David Malcolm via Gcc-patches
This patch adds a new GCC plugin event: PLUGIN_ANALYZER_INIT, called when -fanalyzer is starting, allowing for GCC plugins to register additional state-machine-based checks within -fanalyzer. The idea is that 3rd-party code might want to add domain-specific checks for its own APIs - with the cavea

Re: [PATCH] IPA: fix profile handling in IRA

2020-10-14 Thread Vladimir Makarov via Gcc-patches
On 2020-10-14 10:21 a.m., Martin Liška wrote: Hello. There's a new version of the patch that fixes profile scaling in IRA. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Yes.  Thank you, Martin.

libgo patch committed: Print reason code if throw fails

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch prints the reason code if throwing an unwind exception fails. Calls to _Unwind_RaiseException and friends *can* return due to bugs in libgo or memory corruption. When this occurs, print a message to stderr with the reason code before aborting to aid debugging.

Re: [RFC] Automatic linking of libatomic via gcc.c or ...? [PR81358] (dependency for libgomp on nvptx dep, configure overriddable, ...)

2020-10-14 Thread Joseph Myers
On Wed, 14 Oct 2020, Tobias Burnus wrote: > Question: Where do you think should it be in the driver? I think it should be somewhere in the expansion of %(link_gcc_c_sequence) (i.e. LINK_GCC_C_SEQUENCE_SPEC, which has various target-specific definitions), since that's what expands to something l

Ping: Re: [PATCH, wwwdocs] gcc-11/changes: C++11 is now required to build GCC

2020-10-14 Thread David Malcolm via Gcc-patches
On Wed, 2020-10-07 at 06:26 -0400, David Malcolm wrote: > This summarizes GCC 11's change in build requirements from C++98 to > C++11, for the release notes. I've put it in the Caveats immediately > below the "The default mode for C++ is..." change hence the wording. > > I've based it on the chan

Re: [PATCH] peel off one less layer of array types (PR 97391)

2020-10-14 Thread Jeff Law via Gcc-patches
On 10/14/20 2:55 PM, Martin Sebor wrote: > The new gimple_parm_array_size() function computes the size > of an array function parameter implied by its upper bound. > The code that does this strips one too many layers of array > types from the parameter, returning a smaller size than > implied by

Re: [PATCH] RISC-V: Add support for -mcpu option.

2020-10-14 Thread Jim Wilson
On Tue, Oct 13, 2020 at 3:09 AM Kito Cheng wrote: > - The behavior of -mcpu basically equal to -march plus -mtune, but it >has lower priority than -march and -mtune. This looks OK to me. I noticed a few things while testing. These don't need to be fixed before the patch is committed. Usin

libgo patch committed: Export NetBSD specific types in mksysinfo.sh

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
The libgo syscall package depends on many NetBSD-specific types on NetBSD. This libgo patch by Nikhil Benesch teaches mksysinfo.sh to export these types. This alone is not sufficient to get the syscall package to compile on NetBSD, but it's a start. Bootstrapped and ran Go testsuite on x86_64-pc

libgo patch committed: correct semaphore implementation on NetBSD

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch corrects the semaphore implementation on NetBSD. NetBSD's semaphores use the underlying lighweight process mechanism (LWP) on NetBSD, rather than pthreads. This means the m.prodcid needs to be set to the LWP ID rather than the pthread ID in order for unpark notif

[PATCH] peel off one less layer of array types (PR 97391)

2020-10-14 Thread Martin Sebor via Gcc-patches
The new gimple_parm_array_size() function computes the size of an array function parameter implied by its upper bound. The code that does this strips one too many layers of array types from the parameter, returning a smaller size than implied by the second most significant bound. (I must have cop

[committed] analyzer: fix ICE on globals with unknown size [PR93388]

2020-10-14 Thread David Malcolm via Gcc-patches
This patch fixes an ICE seen when attempting to build various existing tests in our testsuite with -fanalyzer, including gcc.c-torture/compile/980816-1.c. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as 61a43de58cb6de7212a622060500ad0a0fd94fae. gcc/analyzer/Chan

[committed] analyzer: fix build with ada [PR93723]

2020-10-14 Thread David Malcolm via Gcc-patches
This patch fixes an ICE seen in various ada source files within the analyzer when attempting to bootstrap with --with-build-config=bootstrap-analyzer where: $ cat config/bootstrap-analyzer.mk STAGE2_CFLAGS += -fanalyzer STAGE3_CFLAGS += -fanalyzer With this patch, the bootstrap succeeded (after

[committed] analyzer: don't use in tests [PR97394]

2020-10-14 Thread David Malcolm via Gcc-patches
PR analyzer/97394 reports issues with analyzer setjmp results when testing against MUSL. This patch fixes up gcc.dg/analyzer so that it doesn't use . Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-3894-g974e3975c5bd14ee8817f892532d1e55492227df. gcc/testsui

[PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-14 Thread Kwok Cheung Yeung
Hello This implements support for the OMP_TARGET_OFFLOAD environment variable introduced in the OpenMP 5.0 standard, which controls how offloading is handled in an OpenMP program. If set to MANDATORY, then libgomp will cause the program to abort with a gomp_fatal if an offload device is not

Re: [PATCH] wrap long tree chains in a list to avoid attribute error (PR 97413)

2020-10-14 Thread Jeff Law via Gcc-patches
On 10/14/20 2:09 PM, Martin Sebor via Gcc-patches wrote: > The attribute access implicitly added to function declarations > with VLA parameters includes the top-level VLA bounds chained > together similarly to other attribute arguments.  However, > since attribute access is limited to at most 3 a

Re: [PATCH 1/8] [RS6000] rs6000_rtx_costs comment

2020-10-14 Thread Segher Boessenkool
Hi! On Thu, Oct 08, 2020 at 09:27:53AM +1030, Alan Modra wrote: > This lays out the ground rules for following patches. > > * config/rs6000/rs6000.c (rs6000_rtx_costs): Expand comment. This is okay for trunk. Thanks! Segher

[PATCH] wrap long tree chains in a list to avoid attribute error (PR 97413)

2020-10-14 Thread Martin Sebor via Gcc-patches
The attribute access implicitly added to function declarations with VLA parameters includes the top-level VLA bounds chained together similarly to other attribute arguments. However, since attribute access is limited to at most 3 arguments including the mode, a function that takes three or more V

Re: [PATCH][testsuite] Don't overwrite compiler_flags in check_compile

2020-10-14 Thread Mike Stump via Gcc-patches
On Oct 14, 2020, at 6:46 AM, Tom de Vries wrote: > > OK for trunk? Ok.

[PATCH] c++: Improve printing of pointers-to-members [PR97406, PR85901]

2020-10-14 Thread Marek Polacek via Gcc-patches
This PR points out that when printing the parameter mapping for a pointer-to-member-function, the output was truncated: [with T = void (X::*] Fixed by printing the abstract declarator for pointers-to-members in cxx_pretty_printer::type_id. So now we print: [with T = void (X::*)()] But when

[pushed] c++: Diagnose bogus variadic lambda. [PR97358]

2020-10-14 Thread Jason Merrill via Gcc-patches
If the lambda has a capture pack, it cannot be used unexpanded within the body of the lambda. If you want to expand the pack across multiple lambdas, don't capture the whole pack. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/97358 * pt.c (check_for_bar

[r11-3876 Regression] FAIL: gcc.dg/tree-ssa/modref-4.c (test for excess errors) on Linux/x86_64

2020-10-14 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 4d90edb96e199e2e73ba71de5ab3b7c1c0aad6d0 is the first bad commit commit 4d90edb96e199e2e73ba71de5ab3b7c1c0aad6d0 Author: Jan Hubicka Date: Wed Oct 14 16:01:39 2020 +0200 Handle POINTER_PLUS_EXPR in jump functions in ipa-modref. caused FAIL: gcc.dg/ipa/modref-1.c scan-ipa

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-14 Thread Segher Boessenkool
On Wed, Oct 14, 2020 at 07:55:55PM +0200, Richard Biener wrote: > On October 14, 2020 7:35:32 PM GMT+02:00, Segher Boessenkool > wrote: > >On Wed, Oct 14, 2020 at 01:43:45PM +0800, Hongtao Liu wrote: > >> On Wed, Oct 14, 2020 at 4:01 AM Segher Boessenkool > >> wrote: > >> > On Tue, Oct 13, 2020

[committed] libstdc++: Fix unspecified comparison to null pointer [PR 97415]

2020-10-14 Thread Jonathan Wakely via Gcc-patches
The standard doesn't guarantee that null pointers compare less than non-null pointers. AddressSanitizer complains about the pptr()> egptr() comparison in basic_stringbuf::str() when egptr() is null. libstdc++-v3/ChangeLog: PR libstdc++/97415 * include/std/sstream (basic_stringbuf:

Re: [patch] Add an if-exists-then-else spec function

2020-10-14 Thread Olivier Hainque
Hello, Here’s an updated version of originally proposed at https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555271.html with an extra documentation bit, as suggested by Armin’s comment quoted below. Re-tested with a couple of VxWorks builds. Ok to commit ? Thanks in advance! Best Reg

Re: Aw: Re: [PATCH] PR fortran/97408 - Diagnose non-constant KIND argument to intrinsics

2020-10-14 Thread Tobias Burnus
Hi Harald, On 10/14/20 8:25 PM, Harald Anlauf wrote: Or worded differently: If integer, parameter :: A(*) = [(i, i=1,5)] is valid, which should integer, parameter :: B(*) = [integer :: (int(i, kind=i), i=1,2)] be invalid? Well, my copy of the F2018-FDIS says about the KIND argument to I

Re: [PATCH 6/X] libsanitizer: Add hwasan pass and associated gimple changes

2020-10-14 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > @@ -133,6 +137,13 @@ enum asan_mark_flags > #undef DEF > }; > > +enum hwasan_mark_flags > +{ > +#define DEF(X) HWASAN_MARK_##X > + IFN_ASAN_MARK_FLAGS > +#undef DEF > +}; Are these used anywhere? It looks like expand_HWASAN_MARK uses the plain asan versions. > @

Aw: Re: [PATCH] PR fortran/97408 - Diagnose non-constant KIND argument to intrinsics

2020-10-14 Thread Harald Anlauf
Hi Tobias, > > The KIND argument to intrinsics must be a compile-time argument. > > Improve check so that the proper diagnostics is emitted. > > > > > > - if (!gfc_check_init_expr (k)) > > + if (!gfc_check_init_expr (k) || k->expr_type == EXPR_VARIABLE) > > I think the real question is why is t

Re: [PATCH] Add if-chain to switch conversion pass.

2020-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/12/20 8:39 AM, Martin Liška wrote: On 10/6/20 4:12 PM, Jakub Jelinek wrote: On Tue, Oct 06, 2020 at 03:48:38PM +0200, Martin Liška wrote: On 10/6/20 9:47 AM, Richard Biener wrote: But is it really extensible with the current implementation?  I doubt so. I must agree with the statement.

Re: [PATCH] configure: Suppress output from multi-do recipes

2020-10-14 Thread Jonathan Wakely via Gcc-patches
On 14/10/20 17:29 +0100, Jonathan Wakely wrote: The FIXME comment saying "Leave out until this is tested a bit more" is from 1997. I think it's been sufficiently tested. ChangeLog: * config-ml.in (multi-do): Add @ to silence recipe. Remove FIXME comment. OK for trunk? This rem

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-14 Thread Richard Biener via Gcc-patches
On October 14, 2020 7:35:32 PM GMT+02:00, Segher Boessenkool wrote: >Hi! > >On Wed, Oct 14, 2020 at 01:43:45PM +0800, Hongtao Liu wrote: >> On Wed, Oct 14, 2020 at 4:01 AM Segher Boessenkool >> wrote: >> > On Tue, Oct 13, 2020 at 04:40:53PM +0800, Hongtao Liu wrote: >> > > For rtx like >> > >

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-14 Thread Segher Boessenkool
Hi! On Wed, Oct 14, 2020 at 01:43:45PM +0800, Hongtao Liu wrote: > On Wed, Oct 14, 2020 at 4:01 AM Segher Boessenkool > wrote: > > On Tue, Oct 13, 2020 at 04:40:53PM +0800, Hongtao Liu wrote: > > > For rtx like > > > (vec_select:V2SI (subreg:V4SI (inner:V2SI) 0) > > >(para

c++: DECL_FRIEND_P cleanup

2020-10-14 Thread Nathan Sidwell
DECL_FRIEND_P's meaning has changed over time. It now (almost) means the the friend function decl has not been met via an explicit decl. This completes that transition, renaming it to DECL_UNIQUE_FRIEND_P, so one doesn't think it is the sole indicator of friendliness (plenty of friends do not ha

Re: [PUSHED] operator_trunc_mod::wi_fold: Return VARYING for mod by zero.

2020-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/13/20 2:10 AM, Richard Biener wrote: On Mon, Oct 12, 2020 at 6:57 PM Aldy Hernandez via Gcc-patches wrote: Division by zero should return VARYING, otherwise we propagate undefine all over the ranger and cause bad things to happen :) So we never should propagate UNDEFINED? I added a co

[PATCH] configure: Suppress output from multi-do recipes

2020-10-14 Thread Jonathan Wakely via Gcc-patches
The FIXME comment saying "Leave out until this is tested a bit more" is from 1997. I think it's been sufficiently tested. ChangeLog: * config-ml.in (multi-do): Add @ to silence recipe. Remove FIXME comment. OK for trunk? This removes 44 lines of irrelevant noise from various bui

Re: libbacktrace integration for _GLIBCXX_DEBUG mode

2020-10-14 Thread François Dumont via Gcc-patches
After further testing this version was bugged because ld considered that __create_backtrace/__render_backtrace symbols existed several times in the different linked .o. I tried making those inline but it failed, __render_backtrace was not substituted anymore, only __create_backtrace was. The

Re: [PATCH 5/X] libsanitizer: mid-end: Introduce stack variable handling for HWASAN

2020-10-14 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > @@ -75,6 +89,31 @@ extern hash_set *asan_used_labels; > > #define ASAN_USE_AFTER_SCOPE_ATTRIBUTE "use after scope memory" > > +/* NOTE: The values below define an ABI and are hard-coded to these values in > + libhwasan, hence they can't be changed independ

[PATCH] c-family: Fix regression in location-overflow-test-1.c [PR97117]

2020-10-14 Thread Patrick Palka via Gcc-patches
The r11-3266 patch that added macro support to -Wmisleading-indentation accidentally suppressed the column-tracking diagnostic in get_visual_column in some cases, e.g. in the location-overflow-test-1.c testcase. More generally, when all three tokens are on the same line and we've run out of locati

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

2020-10-14 Thread Uros Bizjak via Gcc-patches
Hello! > This patch is about to support Intel Key Locker extension. > > Key Locker provides a mechanism to encrypt and decrypt data with an AES key without having access to the raw key value. > > For more details, please refer to https://software.intel.com/content/dam/develop/external/us/en/docume

ping x3 [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations

2020-10-14 Thread Jozef Lawrynowicz
3rd ping for below. On Tue, Sep 15, 2020 at 09:30:22PM +0100, Jozef Lawrynowicz wrote: > Ping x2 for below. > > On Fri, Aug 07, 2020 at 12:02:59PM +0100, Jozef Lawrynowicz wrote: > > Pinging for this series of patches. > > Attached all patches to this mail with the ammended patch 4 thanks to > >

[committed] libstdc++: Fix tests that fail with old std::string ABI

2020-10-14 Thread Jonathan Wakely via Gcc-patches
These two tests have started to fail with the old std::string ABI. The scan-assembler-not checks fail because they match debug info, not code. Adding -g0 to the test flags fixes them. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 5:06 PM Hongyu Wang wrote: > > Hi Uros, > > Sorry for my misunderstanding. The test is for the correctness check > of intrinsic header. > I have add -muintr to x86gprintrin-{1,2,3,4,5}.c. > > UINTR is 64bit only, so I add them with dg-additional-option. > > Updated patch. I

Re: [Patch] x86: Enable GCC support for Intel Hreset extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
> > The patch doesn't include all testsuite changes. > Yes, I update -mhreset in x86gprintrin-{1,2,3,4,5}.c We will check-in the attached patch. Thanks. Uros Bizjak 于2020年10月14日周三 下午2:26写道: > > On Tue, Oct 13, 2020 at 10:49 AM Hongyu Wang wrote: > > > > Hi: > > > > This patch is about to suppo

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
Hi Uros, Sorry for my misunderstanding. The test is for the correctness check of intrinsic header. I have add -muintr to x86gprintrin-{1,2,3,4,5}.c. UINTR is 64bit only, so I add them with dg-additional-option. Updated patch. If you agree, we will check-in the attached patch. Thanks for your he

Re: [RFA,PATCH] Bail in bounds_of_var_in_loop if no step found.

2020-10-14 Thread Aldy Hernandez via Gcc-patches
On 10/14/20 4:31 PM, Richard Biener wrote: On Wed, Oct 14, 2020 at 4:19 PM Aldy Hernandez wrote: On 10/14/20 9:43 AM, Richard Biener wrote: On Tue, Oct 13, 2020 at 6:12 PM Aldy Hernandez wrote: On 10/13/20 6:02 PM, Richard Biener wrote: On October 13, 2020 5:17:48 PM GMT+02:00, Ald

Re: [PATCH] x86: Add missing intrinsics [PR95483]

2020-10-14 Thread Uros Bizjak via Gcc-patches
> gcc/ChangeLog: > > * config/i386/avx2intrin.h (_mm_broadcastsi128_si256): New intrinsics. > (_mm_broadcastsd_pd): Ditto. > * config/i386/avx512bwintrin.h (_mm512_loadu_epi16): New intrinsics. > (_mm512_storeu_epi16): Ditto. > (_mm512_loadu_epi8): Ditto. > (_mm512_storeu_epi8): Ditto. > * config/i

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 3:49 PM Jakub Jelinek wrote: > > On Wed, Oct 14, 2020 at 03:17:03PM +0200, Uros Bizjak wrote: > > > +(define_insn_and_split "*setcc_qi_addqi3_cconly_overflow_1_" > > > + [(set (reg:CCC FLAGS_REG) > > > + (compare:CCC (neg:QI (geu:QI (reg:CC_CCC FLAGS_REG) (const_int

Re: [RFA,PATCH] Bail in bounds_of_var_in_loop if no step found.

2020-10-14 Thread Richard Biener via Gcc-patches
On Wed, Oct 14, 2020 at 4:19 PM Aldy Hernandez wrote: > > > > On 10/14/20 9:43 AM, Richard Biener wrote: > > On Tue, Oct 13, 2020 at 6:12 PM Aldy Hernandez wrote: > >> > >> > >> > >> On 10/13/20 6:02 PM, Richard Biener wrote: > >>> On October 13, 2020 5:17:48 PM GMT+02:00, Aldy Hernandez via Gcc-

[PATCH] More vect_get_and_check_slp_defs refactoring

2020-10-14 Thread Richard Biener
This is another tiny piece in some bigger refactoring of vect_get_and_check_slp_defs. Split out a test that has nothing to do with def types or commutation. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-10-14 Richard Biener * tree-vect-slp.c (vect_get_and_check_sl

Re: [PATCH] IPA: fix profile handling in IRA

2020-10-14 Thread Jan Hubicka
> Hello. > > There's a new version of the patch that fixes profile scaling > in IRA. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? OK, thanks! Honza > Thanks, > Martin > From 052fe1cb256226108648b2fe93977beec7ca4209 Mon Sep 17 00:00:00 200

[PATCH] IPA: fix profile handling in IRA

2020-10-14 Thread Martin Liška
Hello. There's a new version of the patch that fixes profile scaling in IRA. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From 052fe1cb256226108648b2fe93977beec7ca4209 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 13 Oct

Re: [RFA,PATCH] Bail in bounds_of_var_in_loop if no step found.

2020-10-14 Thread Aldy Hernandez via Gcc-patches
On 10/14/20 9:43 AM, Richard Biener wrote: On Tue, Oct 13, 2020 at 6:12 PM Aldy Hernandez wrote: On 10/13/20 6:02 PM, Richard Biener wrote: On October 13, 2020 5:17:48 PM GMT+02:00, Aldy Hernandez via Gcc-patches wrote: [Neither Andrew nor I are familiar with the SCEV code. We treat

Re: Fix possible overflow in ipa-fnsummary

2020-10-14 Thread Martin Jambor
Hi, On Wed, Oct 14 2020, Jan Hubicka wrote: > Hi, > while looking into jump functions I noticed that offset_map in > ipa-fnsummary is array of integers while everywhere else the offsets are > HOST_WIDE_INTs (for good reason since the offsets are pointer > adjustments moreover multplied by UNIT_SIZ

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 14, 2020 at 03:17:03PM +0200, Uros Bizjak wrote: > > +(define_insn_and_split "*setcc_qi_addqi3_cconly_overflow_1_" > > + [(set (reg:CCC FLAGS_REG) > > + (compare:CCC (neg:QI (geu:QI (reg:CC_CCC FLAGS_REG) (const_int 0))) > > +(ltu:QI (reg:CC_CCC FLAGS_REG) (co

[PATCH][testsuite] Don't overwrite compiler_flags in check_compile

2020-10-14 Thread Tom de Vries
Hi, Consider the test-case gcc.c-torture/compile/pr42717.c, which has: ... /* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O0" } { "" } } */ ... When running make check-gcc, I get: ... XPASS: gcc.c-torture/compile/pr42717.c -O0 (test for excess errors) ... but when forcing to run only that

Fix possible overflow in ipa-fnsummary

2020-10-14 Thread Jan Hubicka
Hi, while looking into jump functions I noticed that offset_map in ipa-fnsummary is array of integers while everywhere else the offsets are HOST_WIDE_INTs (for good reason since the offsets are pointer adjustments moreover multplied by UNIT_SIZE) Bootstrapped/regtested x86_64-linux, will commit it

Handle POINTER_PLUS_EXPR in jump functions

2020-10-14 Thread Jan Hubicka
Hi, this patch adds logic to handle POINTER_PLUS_EXPR in compute_parm_map that I originally did not since I tought that all such adjustments are done by ancestor function. Bootstrapped/regtested x86_64-linux, will commit it shortly. Honza gcc/ChangeLog: 2020-10-14 Jan Hubicka * ipa-m

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread H.J. Lu via Gcc-patches
On Wed, Oct 14, 2020 at 6:31 AM Hongyu Wang via Gcc-patches wrote: > > Uros Bizjak 于2020年10月14日周三 下午7:19写道: > > > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > > > >> > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new > intrinsics > > > > >> > > header. > > > > >>

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
Uros Bizjak 于2020年10月14日周三 下午7:19写道: > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > > >> > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > > > >> > > header. > > > >> > > > > > >> > > > > >> > Thanks for your review. We found that without adding -mui

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 11:01 AM Jakub Jelinek wrote: > > Hi! > > These builtins have two known issues and this patch fixes one of them. > > One issue is that the builtins effectively return two results and > they make the destination addressable until expansion, which means > a stack slot is allo

[PATCH] adjust BB SLP build from scalars heuristics

2020-10-14 Thread Richard Biener
We can end up with { _1, 1.0 } * { 3.0, _2 } which isn't really profitable. The following adjusts things so we reject more than one possibly expensive (non-constant and not uniform) vector CTOR and instead build a CTOR for the scalar operation results. This also moves a check in vect_get_and_chec

[PATCH] Fix up plugin header install

2020-10-14 Thread Jakub Jelinek via Gcc-patches
Hi! Jeff has noticed and I've confirmed that config/i386/i386.h header which is installed on x86 in plugin/include/ directory newly in GCC 11 has #include "common/config/i386/i386-cpuinfo.h" which breaks all plugins that include tm.h etc. because that header is not shipped. The following patch see

Re: [RFC][gimple] Move can_duplicate_bb_p to gimple_can_duplicate_bb_p

2020-10-14 Thread Richard Biener
On Wed, 14 Oct 2020, Tom de Vries wrote: > On 10/14/20 8:15 AM, Richard Biener wrote: > >> I've tried to address this by merging can_duplicate_stmt_p and > >> can_duplicate_last_stmt_p, and adding a default parameter. > >> > >> Better like this? > > Sorry for iterating again but since we now would

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Richard Biener via Gcc-patches
On Wed, Oct 14, 2020 at 11:49 AM Jakub Jelinek wrote: > > On Wed, Oct 14, 2020 at 11:22:48AM +0200, Richard Biener wrote: > > > + if (mode == CCCmode > > > + && GET_CODE (XEXP (x, 0)) == NEG > > > + && GET_CODE (XEXP (XEXP (x, 0), 0)) == GEU > > > + && REG_P (XEXP (XEX

c++: Instantiation with local extern [PR97395]

2020-10-14 Thread Nathan Sidwell
It turns out that pushdecl_with_scope has somewhat strange behaviour, which probably made more sense way back. Unfortunately making it somewhat saner turned into a rathole. Instead use a push_nested_namespace around pushing the alias -- this is similar to some of the friend handling we already h

[committed] libstdc++: Improve comments in std::string tests

2020-10-14 Thread Jonathan Wakely via Gcc-patches
The COW std::string does support some features of C++11 allocators, just not propagation. Change some comments in the tests to be more precise about that. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make comment more precise about what isn't

[committed] libstdc++: Improve comments for check_effective_target_cxx11-abi

2020-10-14 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi): Add comments about which test flags get used by the check. Tested powerpc64le-linux. Committed to trunk. commit a1b6b013615082f0837ea34c5a65136822523be7 Author: Jonathan Wakely Date: Wed

[committed] libstdc++: Enable tests that incorrectly require cxx11-abi

2020-10-14 Thread Jonathan Wakely via Gcc-patches
These tests were not being run when -D_GLIBCXX_USE_CXX11_ABI=0 was added to the test flags, but they actually work OK with the old string. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string/allocator/char/minimal.cc: Do not require cxx11-abi effective target. * te

[committed] libstdc++: Define some std::string constructors inline

2020-10-14 Thread Jonathan Wakely via Gcc-patches
There are a lot of very simple constructors for the old string which are not defined inline. I don't see any reason for this and it probably makes them less likely to be optimized away. Move the definitions into the class body. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_

[committed] libstdc++: Implement LWG 3706 for COW strings

2020-10-14 Thread Jonathan Wakely via Gcc-patches
The basic_string deduction guides are defined for the old ABI, but the tests are currently disabled. This is because a single case fails when using the old ABI, which is just because LWG 3706 isn't implemented for the old ABI. That can be done easily, and the tests can be enabled. libstdc++-v3/Cha

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Uros Bizjak via Gcc-patches
> > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > >> > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > > >> > > header. > > >> > > > > >> > > > >> > Thanks for your review. We found that without adding -muintr, the > > >> > intrinsics header could also be t

Re: [patch] Rework CPP_BUILTINS_SPEC for powerpc-vxworks

2020-10-14 Thread Olivier Hainque
> On 13 Oct 2020, at 17:38, Segher Boessenkool >> >> Same ChangeLog. Patch hopefully quotable if needed now. > > It is, thank you! Sure. > The patch looks fine to me now. Great, thanks! > Not that you need my approval :-) Always happy to get constructive suggestions for improvements :)

[RFC] Automatic linking of libatomic via gcc.c or ...? [PR81358] (dependency for libgomp on nvptx dep, configure overriddable, ...)

2020-10-14 Thread Tobias Burnus
Hi all, hi Joseph & Jakub, BACKGROUND: The main reason I am interested in this is offloading where OpenACC/OpenMP code might run into: unresolved symbol __atomic_compare_exchange_16 and it is nontrivial to find out that the solution is: -foffload=nvptx-none=-latomic And the atomic use ca

Re: Support ofsetted parameters in local modref

2020-10-14 Thread Jan Hubicka
> Hi, > > On Wed, Oct 14 2020, Jan Hubicka wrote: > > Hi, > > here is updated patch with cap on number of iterations. > > I set the limit to 8 and bootstrapped it with additional assert that the > > limit is not met, it did not fire. > > > > Bootstrapped/regtested x86_64-linux, OK? > > > > gcc/Cha

Re: Support ofsetted parameters in local modref

2020-10-14 Thread Martin Jambor
Hi, On Wed, Oct 14 2020, Jan Hubicka wrote: > Hi, > here is updated patch with cap on number of iterations. > I set the limit to 8 and bootstrapped it with additional assert that the > limit is not met, it did not fire. > > Bootstrapped/regtested x86_64-linux, OK? > > gcc/ChangeLog: > > 2020-10-14

Re: [RFC][gimple] Move can_duplicate_bb_p to gimple_can_duplicate_bb_p

2020-10-14 Thread Tom de Vries
On 10/14/20 8:15 AM, Richard Biener wrote: >> I've tried to address this by merging can_duplicate_stmt_p and >> can_duplicate_last_stmt_p, and adding a default parameter. >> >> Better like this? > Sorry for iterating again but since we now would appropriately > handle things in the CFG hook there's

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 14, 2020 at 5:21 PM Uros Bizjak wrote: > > On Wed, Oct 14, 2020 at 11:04 AM Hongyu Wang wrote: > > > > > > > > Uros Bizjak 于2020年10月14日周三 下午4:42写道: > >> > >> On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang > >> wrote: > >> > > >> > > > >> > > Please also add -muintr to g++.dg/other/i3

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 14, 2020 at 11:22:48AM +0200, Richard Biener wrote: > > + if (mode == CCCmode > > + && GET_CODE (XEXP (x, 0)) == NEG > > + && GET_CODE (XEXP (XEXP (x, 0), 0)) == GEU > > + && REG_P (XEXP (XEXP (XEXP (x, 0), 0), 0)) > > + && (GET_MODE (XEXP (XEXP (XEX

Re: [PATCH 4/X] libsanitizer: options: Add hwasan flags and argument parsing

2020-10-14 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > ### Attachment also inlined for ease of reply > ### > > > diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c > index > 372148315389db6671dfd943fd1a68670fcb1cbc..f8bf165aa48b5709c26f4e8245e5ab929b44fca6 > 100644 > --- a/gcc

Re: Support ofsetted parameters in local modref

2020-10-14 Thread Richard Biener
On Wed, 14 Oct 2020, Jan Hubicka wrote: > Hi, > here is updated patch with cap on number of iterations. > I set the limit to 8 and bootstrapped it with additional assert that the > limit is not met, it did not fire. > > Bootstrapped/regtested x86_64-linux, OK? OK. Richard. > gcc/ChangeLog: >

Re: [PATCH] i386: Improve chaining of _{addcarry, subborrow}_u{32, 64} [PR97387]

2020-10-14 Thread Richard Biener via Gcc-patches
On Wed, Oct 14, 2020 at 11:01 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > These builtins have two known issues and this patch fixes one of them. > > One issue is that the builtins effectively return two results and > they make the destination addressable until expansion, which means > a st

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 11:04 AM Hongyu Wang wrote: > > > > Uros Bizjak 于2020年10月14日周三 下午4:42写道: >> >> On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang wrote: >> > >> > > >> > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and >> > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new

RE: [PATCH][Arm] Auto-vectorization for MVE: vmin/vmax

2020-10-14 Thread Kyrylo Tkachov via Gcc-patches
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 06 October 2020 17:59 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; nd ; > Richard Earnshaw ; Ramana Radhakrishnan > > Subject: [PATCH][Arm] Auto-vectorization for MVE: vmin/vmax > > Hi all, > > This patch enables MVE

RE: [PATCH][Arm] Auto-vectorization for MVE: vmul

2020-10-14 Thread Kyrylo Tkachov via Gcc-patches
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 06 October 2020 17:55 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; nd ; > Richard Earnshaw ; Ramana Radhakrishnan > > Subject: [PATCH][Arm] Auto-vectorization for MVE: vmul > > Hi all, > > This patch enables MVE vmul

Re: Support ofsetted parameters in local modref

2020-10-14 Thread Jan Hubicka
Hi, here is updated patch with cap on number of iterations. I set the limit to 8 and bootstrapped it with additional assert that the limit is not met, it did not fire. Bootstrapped/regtested x86_64-linux, OK? gcc/ChangeLog: 2020-10-14 Jan Hubicka * doc/invoke.texi: (ipa-jump-function

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
Uros Bizjak 于2020年10月14日周三 下午4:53写道: > > On Wed, Oct 14, 2020 at 10:42 AM Uros Bizjak wrote: > > > > On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang wrote: > > > > > > > > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test n

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
Uros Bizjak 于2020年10月14日周三 下午4:42写道: > On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang > wrote: > > > > > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > > > header. > > > > > > > Thanks for your review. We

[PATCH] i386: Improve chaining of _{addcarry,subborrow}_u{32,64} [PR97387]

2020-10-14 Thread Jakub Jelinek via Gcc-patches
Hi! These builtins have two known issues and this patch fixes one of them. One issue is that the builtins effectively return two results and they make the destination addressable until expansion, which means a stack slot is allocated for them and e.g. with -fstack-protector* DSE isn't able to opt

[PATCH v3] arm&aarch64: subdivide the type attribute "alu_shfit_imm"

2020-10-14 Thread Qian, Jianhua
Hi Richard Thanks for reviewing again. I have updated the patch to v3. Regards Qian > -Original Message- > From: Richard Sandiford > Sent: Tuesday, October 13, 2020 4:00 PM > To: Qian, Jianhua/钱 建华 > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH v2] arm&aarch64: subdivide the type

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 10:42 AM Uros Bizjak wrote: > > On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang wrote: > > > > > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > > > header. > > > > > > > Thanks for y

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 14, 2020 at 10:34 AM Hongyu Wang wrote: > > > > > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > > header. > > > > Thanks for your review. We found that without adding -muintr, the intrinsics > heade

Fix SCC discovery in ipa-modref

2020-10-14 Thread Jan Hubicka
Hi, this patch fixes SCC discovery in ipa-modref which is causing misoptimization of gnat bootstrapped with LTO, PGO and -O3. I also improved debug info and spotted wrong parameter to ignore_stores_p (which is probably quite harmless since we only inline matching functions, but it is better to be

Re: [Patch] x86: Enable support for Intel UINTR extension

2020-10-14 Thread Hongyu Wang via Gcc-patches
> > Please also add -muintr to g++.dg/other/i386-{2,3}.C and > gcc.target/i386-sse-{12,13,14,22,23}.c. This will test new intrinsics > header. > Thanks for your review. We found that without adding -muintr, the intrinsics header could also be tested. Make-check for these file all get passed. And

Re: [PATCH] openmp: Add support for omp_get_supported_active_levels

2020-10-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 13, 2020 at 07:05:10PM +0100, Kwok Cheung Yeung wrote: > +* omp_get_supported_active_levels:: Maxiumum number of active levels > supported Sorry for not catching it during review, but there is a typo above. Fixed with patch below, committed to trunk. > +@node omp_get_supported_activ

Re: [PATCH 3/X] libsanitizer: Add option to bootstrap using HWASAN

2020-10-14 Thread Stott Graham via Gcc-patches
I'm fine, thanks Sara On Wed, 14 Oct 2020, 08:53 Richard Sandiford via Gcc-patches, < gcc-patches@gcc.gnu.org> wrote: > Matthew Malcomson writes: > > diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi > > index > d581a34653f61a440b3c3b832836fe109e2fbd08..25d041fcbb1f7c16f7ac47b7b5d4ea8308

Re: [PATCH 3/X] libsanitizer: Add option to bootstrap using HWASAN

2020-10-14 Thread Richard Sandiford via Gcc-patches
Matthew Malcomson writes: > diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi > index > d581a34653f61a440b3c3b832836fe109e2fbd08..25d041fcbb1f7c16f7ac47b7b5d4ea8308c6f69c > 100644 > --- a/gcc/doc/install.texi > +++ b/gcc/doc/install.texi > @@ -2767,6 +2767,11 @@ the build tree. > Compile

Re: [RFA,PATCH] Bail in bounds_of_var_in_loop if no step found.

2020-10-14 Thread Richard Biener via Gcc-patches
On Tue, Oct 13, 2020 at 6:12 PM Aldy Hernandez wrote: > > > > On 10/13/20 6:02 PM, Richard Biener wrote: > > On October 13, 2020 5:17:48 PM GMT+02:00, Aldy Hernandez via Gcc-patches > > wrote: > >> [Neither Andrew nor I are familiar with the SCEV code. We treat it as > >> a > >> black box :).