Re: [PATCH] Simplify testing symbol sections

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/20/19 11:08 PM, Strager Neds wrote: > While fixing some bugs in __attribute__((section)), I found it difficult > to write tests. Make testing easier: introduce the > scan-assembler-symbol-section and scan-symbol-section helpers. See > in-line documentation for details. > > Testing: > > *

Re: [PATCH v2] PR target/97682 - Fix to reuse t1 register between call address and epilogue.

2020-11-13 Thread Jim Wilson
On Thu, Nov 12, 2020 at 10:56 PM Monk Chiang wrote: > - When expanding the call pattern, choose t1 register be a jump register. > Epilogue also uses a t1 register to adjust Stack point. The call > pattern > and epilogue will initial t1 twice, if both are generated in the same >

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

2020-11-13 Thread Jim Wilson
On Tue, Nov 10, 2020 at 4:18 PM Jeff Law via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > On 11/8/20 7:48 PM, HAO CHEN GUI via Gcc-patches wrote: > > ChangeLog > > > > * combine.c (combine_validate_cost): Add an argument for newi1pat. > > (try_combine): Add a 4-insn combine

Re: [PATCH] Asan changes for RISC-V.

2020-11-13 Thread Jim Wilson
On Fri, Nov 13, 2020 at 11:12 AM Jeff Law wrote: > > On 10/28/20 5:58 PM, Jim Wilson wrote: > > 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

Re: [PATCH][RFC] Make mingw-w64 printf/scanf attribute alias to ms_printf/ms_scanf only for C89

2020-11-13 Thread Liu Hao via Gcc-patches
在 2020/11/14 上午8:12, Joseph Myers 写道: > On Fri, 13 Nov 2020, Liu Hao via Gcc-patches wrote: > >> 在 2020/11/13 2:46, Joseph Myers 写道: >>> I'd expect these patches to include updates to the gcc.dg/format/ms_*.c >>> tests to reflect the changed semantics (or new tests there if some of the >>>

Re: [RS6000] Use LIB2_SIDITI_CONV_FUNCS in place of ppc64-fp.c

2020-11-13 Thread Segher Boessenkool
Hi! On Fri, Nov 13, 2020 at 11:39:35PM +1030, Alan Modra wrote: > This patch retires ppc64-fp.c in favour of using > "LIB2_SIDITI_CONV_FUNCS = yes", which is a lot better solution than > having a copy of selected libgcc2.c functions. Nice :-) > Bootstrapped and regression tested

Re: [PATCH] std::experimental::simd

2020-11-13 Thread Matthias Kretz
On Donnerstag, 12. November 2020 00:43:31 CET Jonathan Wakely wrote: > On 08/05/20 21:03 +0200, Matthias Kretz wrote: > >Here's my last update to the std::experimental::simd patch. It's currently > >based on the gcc-10 branch. > > > > > >+ > >+// __next_power_of_2{{{ > >+/** > >+ * \internal > >

[committed] openmp: Add support for non-VLA {, first}private allocate on omp task

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! This patch adds support for custom allocators on private/firstprivate clauses for task (and taskloop) constructs. Private didn't need anything special, but firstprivate if it is passed by reference needs the GOMP_alloc calls in the copyfn and GOMP_free in the task body.

[committed] libstdc++: Use custom timespec in system calls [PR 93421]

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 32-bit targets where userspace has switched to 64-bit time_t, we cannot pass struct timespec to SYS_futex or SYS_clock_gettime, because the userspace definition of struct timespec will not match what the kernel expects. We use the existence of the SYS_futex_time64 or SYS_clock_gettime_time64

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 22:45 +, Jonathan Wakely wrote: On 13/11/20 21:12 +, Jonathan Wakely wrote: On 13/11/20 20:29 +, Mike Crowe via Libstdc++ wrote: On Friday 13 November 2020 at 17:25:22 +, Jonathan Wakely wrote: + // Return the relative duration from (now_s + now_ns) to (abs_s +

Re: [PATCH][RFC] Make mingw-w64 printf/scanf attribute alias to ms_printf/ms_scanf only for C89

2020-11-13 Thread Joseph Myers
On Fri, 13 Nov 2020, Liu Hao via Gcc-patches wrote: > 在 2020/11/13 2:46, Joseph Myers 写道: > > I'd expect these patches to include updates to the gcc.dg/format/ms_*.c > > tests to reflect the changed semantics (or new tests there if some of the > > changes don't result in any failures in the

float.h: Handle C2x __STDC_WANT_IEC_60559_EXT__

2020-11-13 Thread Joseph Myers
TS 18661-1 and 18661-2 have various definitions conditional on __STDC_WANT_IEC_60559_BFP_EXT__ and __STDC_WANT_IEC_60559_DFP_EXT__ macros. When those TSes were integrated into C2x, most of the feature test macro conditionals were removed (with declarations for decimal FP becoming conditional only

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 7:57 AM, Austin Morton wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. You can get consistent behavior with a command line argument and it's much more useful over time as the world changes. > >

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 22:46 +0100, Jakub Jelinek wrote: On Fri, Nov 13, 2020 at 04:39:25PM -0500, Jason Merrill wrote: On 11/13/20 2:20 PM, Tom Tromey wrote: > > > > > > "Jakub" == Jakub Jelinek via Gcc-patches writes: > > Jakub> 2020-11-13 Jakub Jelinek > > Jakub> * c-cppbuiltin.c: Include

Revert accidentally comitted sanity check

2020-11-13 Thread Jan Hubicka
Hi, I have accidentally comitted in the following sanity check that fails and is discussed in https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558538.html The current ipa-icf code is conservatively correct because alias_ptr_types_compatible_p returns false on ref_all_alias_ptr_type_p.

c: C2x binary constants

2020-11-13 Thread Joseph Myers
C2x adds binary integer constants (approved at the last WG14 meeting, though not yet added to the working draft in git). Configure libcpp to consider these a standard feature in C2x mode, with appropriate updates to diagnostics including support for diagnosing them with -std=c2x -Wc11-c2x-compat.

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 21:12 +, Jonathan Wakely wrote: On 13/11/20 20:29 +, Mike Crowe via Libstdc++ wrote: On Friday 13 November 2020 at 17:25:22 +, Jonathan Wakely wrote: + // Return the relative duration from (now_s + now_ns) to (abs_s + abs_ns) + // as a timespec. + struct timespec +

In 'gcc/omp-oacc-kernels-decompose.cc', use langhook instead of accessing language-specific decl information (was: [PATCH 04/10, OpenACC] Turn OpenACC kernels regions into a sequence of, parallel regi

2020-11-13 Thread Thomas Schwinge
Hi! On 2019-08-05T22:51:22+0100, Kwok Cheung Yeung wrote: > On 18/07/2019 10:30 am, Jakub Jelinek wrote: >> On Wed, Jul 17, 2019 at 10:06:07PM +0100, Kwok Cheung Yeung wrote: >>> --- a/gcc/omp-oacc-kernels.c >>> +++ b/gcc/omp-oacc-kernels.c >>> @@ -30,6 +30,7 @@ along with GCC; see the file

Re: Ping: [PATCH] Ensure colorization doesn't corrupt multibyte sequences in diagnostics

2020-11-13 Thread Jeff Law via Gcc-patches
On 1/14/20 5:05 PM, Lewis Hyatt wrote: > Hello- > > I thought I might ping this short patch please, just in case it may > make sense to include in GCC 10 along with the other UTF-8-related > fixes to diagnostics. Thanks! > > https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00915.html This is fine

[PATCH] IBM Z: Do not run long double tests on old machines

2020-11-13 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on z13 s390x-redhat-linux. Ok for master? gcc/testsuite/ChangeLog: 2020-11-12 Ilya Leoshkevich * gcc.target/s390/s390.exp (check_effective_target_s390_z14_hw): New predicate. * gcc.target/s390/vector/long-double-caller-abi-run.c: Use the

Re: [PATCH v5 2/8] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 21:58 +, Mike Crowe via Libstdc++ wrote: On Thursday 12 November 2020 at 23:07:47 +, Jonathan Wakely wrote: On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: > The futex system call supports waiting for an absolute time if > FUTEX_WAIT_BITSET is used rather than

Decompose OpenACC 'kernels' constructs into parts, a sequence of compute constructs (was: [og8] OpenACC 'kernels' construct changes: splitting of the construct into several regions)

2020-11-13 Thread Thomas Schwinge
Hi! On 2019-02-01T00:59:30+0100, I wrote: > I've just pushed the attached nine patches to openacc-gcc-8-branch: > OpenACC 'kernels' construct changes: splitting of the construct into > several regions. Now, slightly more polished, I've pushed to master branch a variant of most of these patches

More explicit checking of which OMP constructs we're expecting

2020-11-13 Thread Thomas Schwinge
Hi! I've pushed "More explicit checking of which OMP constructs we're expecting" to master branch in commit bd7885755405bc9947ebe805a53d6100c78c8e82, and backported to releases/gcc-10 branch in commit 00d4aa2128fd73b49e28c8a8c5fcb81150b640fe, see attached. Grüße Thomas -

Attach an attribute to all outlined OpenACC compute regions

2020-11-13 Thread Thomas Schwinge
Hi! I've pushed "Attach an attribute to all outlined OpenACC compute regions" to master branch in commit 703e4f86496214e4915db898397fcd0ae1d955e0, and backported to releases/gcc-10 branch in commit 40bf92be5b621318a43347236508696cc387f3a6, see attached. Grüße Thomas - Mentor

Re: testsuite: Adjust pr96789.c to exclude vect_load_lanes

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/10/20 7:42 PM, Kewen.Lin via Gcc-patches wrote: > Hi Richard, > > Thanks for the review! > > on 2020/11/10 涓嬪崍7:31, Richard Sandiford wrote: >> "Kewen.Lin" writes: >>> Hi, >>> >>> As Lyon pointed out, the newly introduced test case >>> gcc.dg/tree-ssa/pr96789.c fails on

Re: [PATCH v3] Include checking of 0 cost dependency due to bypass in rank_for_schedule

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/6/20 2:37 AM, Jojo R wrote: > Insn seqs before sched: > > .L1: > a5 = insn-1 (a0) > a6 = insn-2 (a1) > a7 = insn-3 (a7, a5) > a8 = insn-4 (a8, a6) > Jmp .L1 > > Insn-3 & insn-4 is REG_DEP_TRUE of insn-1 & insn-2, > so insn-3 & insn-4 will be as the last of ready list. > And this patch will

Re: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/6/20 1:38 AM, Thomas Schwinge wrote: > Hi! > > On 2018-09-25T16:00:14-0400, David Malcolm wrote: >> As noted at Cauldron, dumpfile.c currently emits "note: " for all kinds >> of dump message, so that (after filtering) there's no distinction between >> MSG_OPTIMIZED_LOCATIONS vs MSG_NOTE

Add 'libgomp.oacc-fortran/pr94358-1.f90' [PR94358] (was: [PATCH, OpenACC] Rework OpenACC Fortran DO loop initialization)

2020-11-13 Thread Thomas Schwinge
Hi! The whole topic of GCC PR94358 "[OMP] Privatize internal array variables introduced by the Fortran FE" is yet to be resolved, but we may already now add Gergő's testcase: On 2019-01-25T15:13:48+0100, Gergö Barany wrote: > --- /dev/null > +++

Re: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/6/20 1:50 AM, Thomas Schwinge wrote: > Hi! > > On 2018-09-25T16:00:14-0400, David Malcolm wrote: >> The patch adds "dg-optimized" and "dg-missed" directives > Another small thing I just noticed: > >> --- a/gcc/testsuite/lib/gcc-dg.exp >> +++ b/gcc/testsuite/lib/gcc-dg.exp >> +# Handle

[PATCH] ipa-cp: Avoid unwanted multiple propagations (PR 97816)

2020-11-13 Thread Martin Jambor
Hi, when looking at the testcase of PR 97816 I realized that the reason why we were hitting overflows in size growth estimates in IPA-CP is not because the chains of how lattices feed values to each other are so long but mainly because we add estimates in callee lattices to caller lattices for

[PATCH, rs6000] Add Power10 scheduling description

2020-11-13 Thread Pat Haugen via Gcc-patches
Add Power10 scheduling description. This patch adds the Power10 scheduling description. Since power10.md was pretty much a complete rewrite (existing version of power10.md is mostly just a copy of power9.md), I diffed power10.md with /dev/null so that the full contents of the file are shown as

Re: [PATCH v5 2/8] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2020-11-13 Thread Mike Crowe via Gcc-patches
On Thursday 12 November 2020 at 23:07:47 +, Jonathan Wakely wrote: > On 29/05/20 07:17 +0100, Mike Crowe via Libstdc++ wrote: > > The futex system call supports waiting for an absolute time if > > FUTEX_WAIT_BITSET is used rather than FUTEX_WAIT. Doing so provides two > > benefits: > > > >

Re: [00/32] C++ 20 Modules

2020-11-13 Thread Mike Stump via Gcc-patches
On Nov 3, 2020, at 1:12 PM, Nathan Sidwell wrote: > > Here is the implementation of C++20 modules that I have been developing on > the devel/c++-modules branch over the last few years. I was just recently wondering about this. Congratulations. > It is some 25K new lines of code (plus

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jason Merrill via Gcc-patches
On 11/13/20 4:46 PM, Jakub Jelinek wrote: On Fri, Nov 13, 2020 at 04:39:25PM -0500, Jason Merrill wrote: On 11/13/20 2:20 PM, Tom Tromey wrote: "Jakub" == Jakub Jelinek via Gcc-patches writes: Jakub> 2020-11-13 Jakub Jelinek Jakub> * c-cppbuiltin.c: Include configargs.h. Jakub>

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 04:39:25PM -0500, Jason Merrill wrote: > On 11/13/20 2:20 PM, Tom Tromey wrote: > > > > > > > "Jakub" == Jakub Jelinek via Gcc-patches > > > > > > > writes: > > > > Jakub> 2020-11-13 Jakub Jelinek > > > > Jakub> * c-cppbuiltin.c: Include configargs.h. > > Jakub>

[PATCH] detect allocation/deallocation mismatches in user-defined functions (PR94527)

2020-11-13 Thread Martin Sebor via Gcc-patches
Bug 94527 is request from the kernel developers for an attribute to indicate that a user-defined function deallocates an object allocated by an earlier call to an allocation function. Their goal is to detect misuses of such functions and the pointers or objects returned from them. The recently

Re: [PATCH] RFC: add "deallocated_by" attribute for use by analyzer

2020-11-13 Thread Jeff Law via Gcc-patches
On 10/5/20 5:12 PM, David Malcolm via Gcc-patches wrote: > This work-in-progress patch generalizes the malloc/free problem-checking > in -fanalyzer so that it can work on arbitrary acquire/release API pairs. > > It adds a new __attribute__((deallocated_by(FOO))) that could be used > like this in

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jonathan Wakely via Gcc-patches
>> "Jakub" == Jakub Jelinek via Gcc-patches >> writes: > >Jakub> * c-cppbuiltin.c: Include configargs.h. >Jakub> (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is >not >Jakub> defined, predefine __STDCPP_THREADS__ to 1 unless thread_model >is >Jakub>

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jason Merrill via Gcc-patches
On 11/13/20 2:20 PM, Tom Tromey wrote: "Jakub" == Jakub Jelinek via Gcc-patches writes: Jakub> 2020-11-13 Jakub Jelinek Jakub> * c-cppbuiltin.c: Include configargs.h. Jakub> (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not Jakub> defined, predefine

Re: [PATCH] handle conditionals in -Wstringop-overflow et al. (PR 92936)

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/2/20 7:24 PM, Martin Sebor wrote: > The attached patch extends compute_objsize() to handle conditional > expressions represented either as PHIs or MIN_EXPR and MAX_EXPR. > > To simplify the handling of the -Wstringop-overflow/-overread > warnings the change factors this code out of

[pushed] c++: Add feature test macro for C++20 using enum.

2020-11-13 Thread Jason Merrill via Gcc-patches
Missing piece from the 'using enum' implementation patch. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/c-family/ChangeLog: * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/feat-cxx2a.C: Check it. ---

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 21:12 +, Jonathan Wakely wrote: On 13/11/20 20:29 +, Mike Crowe via Libstdc++ wrote: On Friday 13 November 2020 at 17:25:22 +, Jonathan Wakely wrote: + // Return the relative duration from (now_s + now_ns) to (abs_s + abs_ns) + // as a timespec. + struct timespec +

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 20:29 +, Mike Crowe via Libstdc++ wrote: On Friday 13 November 2020 at 17:25:22 +, Jonathan Wakely wrote: + // Return the relative duration from (now_s + now_ns) to (abs_s + abs_ns) + // as a timespec. + struct timespec + relative_timespec(chrono::seconds abs_s,

Re: [RFC, Instruction Scheduler, Stage1] New hook/code to perform fusion of dependent instructions

2020-11-13 Thread Pat Haugen via Gcc-patches
On 11/12/20 10:05 AM, Jeff Law wrote: >> I have coded up a proof of concept that implements our needs via a new >> target hook. The hook is passed a pair of dependent insns and returns if >> they are a fusion candidate. It is called while removing the forward >> dependencies of the just scheduled

Re: [PATCH] nvptx: Cache stacks block for OpenMP kernel launch

2020-11-13 Thread Julian Brown
Hi Alexander, Thanks for the review! Comments below. On Tue, 10 Nov 2020 00:32:36 +0300 Alexander Monakov wrote: > On Mon, 26 Oct 2020, Jakub Jelinek wrote: > > > On Mon, Oct 26, 2020 at 07:14:48AM -0700, Julian Brown wrote: > > > This patch adds caching for the stack block allocated for >

float.h: C2x *_IS_IEC_60559 macros

2020-11-13 Thread Joseph Myers
C2x adds float.h macros that say whether float, double and long double match an IEC 60559 (IEEE 754) format and operations. Add these macros to GCC's float.h. Bootstrapped with no regressions for x86_64-pc-linux-gnu. OK to commit? Although this changes the same part of float.h as

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Mike Crowe via Gcc-patches
On Friday 13 November 2020 at 17:25:22 +, Jonathan Wakely wrote: > On 13/11/20 11:02 +, Jonathan Wakely wrote: > > On 12/11/20 23:49 +, Jonathan Wakely wrote: > > > To poll a std::future to see if it's ready you have to call one of the > > > timed waiting functions. The most obvious

[PATCH] pru: Add builtins for HALT and LMBD

2020-11-13 Thread Dimitar Dimitrov
Add builtins for HALT and LMBD, per Texas Instruments document SPRUHV7C. Use the new LMBD pattern to define an expand for clz. Binutils [1] and sim [2] support for LMBD instruction are merged now. [1] https://sourceware.org/pipermail/binutils/2020-October/113901.html [2]

[PATCH] Add MODE_OPAQUE

2020-11-13 Thread acsawdey--- via Gcc-patches
From: Aaron Sawdey After discussion with Richard Sandiford on IRC, he suggested adding a new mode class MODE_OPAQUE to deal with the problems (PR 96791) we had been having with POImode/PXImode in powerpc target. This patch is the accumulation of changes I needed to make to add this and make it

Re: [PATCH] dwarf2: Emit DW_TAG_unspecified_parameters even in late DWARF [PR97599]

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 10:54 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > Aldy's PR71855 fix avoided emitting multiple redundant > DW_TAG_unspecified_parameters sub-DIEs of a single DIE by restricting > it to early dwarf only. That unfortunately means if we need to emit > another DIE for the

Re: [PATCH] PR preprocessor/94657: use $AR, not 'ar',

2020-11-13 Thread Sergei Trofimovich via Gcc-patches
On Fri, 13 Nov 2020 11:45:56 -0700 Jeff Law wrote: > > On 4/22/20 4:05 PM, Sergei Trofimovich wrote: > > From: Sergei Trofimovich > > > > On system with 'ar' and '${CHOST}-ar' the latter is preferred. > > as it might not match default 'ar'. > > > > Bug is initially reported downstream as

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Tom Tromey
> "Jakub" == Jakub Jelinek via Gcc-patches writes: Jakub> 2020-11-13 Jakub Jelinek Jakub> * c-cppbuiltin.c: Include configargs.h. Jakub> (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not Jakub> defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is Jakub>

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
>Backporting the change to gcc-10 revealed an overflow bug in the >existing code, resulting in blocking for years when given an absolute >timeout in the distant past. There's still a similar bug in the new >code (using futexes with absolute timeouts against clocks) where a >large chrono::seconds

Re: [PATCH 1/7] C-SKY: Add fpuv3 instructions and CK860 arch

2020-11-13 Thread Jeff Law via Gcc-patches
On 10/29/20 9:28 PM, Cooper Qu via Gcc-patches wrote: > Hi gengqi, > > I could not find the patchs [3/7], [4/7] and [7/7]. Could you check > the emails and send them again ? That's strange, I have them in my inbox.  I can send them to you directly -- if you could review them it'd be greatly

Re: [PATCH] Asan changes for RISC-V.

2020-11-13 Thread Jeff Law via Gcc-patches
On 10/28/20 5:58 PM, Jim Wilson wrote: > 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

Re: [PATCH] Clarify the documentation for the ms_abi function attribute

2020-11-13 Thread Jeff Law via Gcc-patches
On 9/10/20 11:04 AM, Peter Jones via Gcc-patches wrote: > Somewhere in the process of writing the documentation for the ms_abi > function attribute, there has been some (justifiable) confusion about > which calling conventions are which, and the documentation currently > states that on

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 12:03 PM, John David Anglin wrote: > On 2020-11-13 1:20 p.m., Jeff Law wrote: >> On 11/13/20 10:29 AM, Jakub Jelinek via Gcc-patches wrote: >>> Hi! >>> >>> The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or >>> later and thread model (e.g. printed by gcc -v) is

Re: ubsan: d-demangle.c:214 signed integer overflow

2020-11-13 Thread Jeff Law via Gcc-patches
On 9/4/20 7:34 AM, Alan Modra via Gcc-patches wrote: > So this one is on top of the previously posted patch. > > * d-demangle.c (string_need): Take a size_t n arg, and use size_t tem. > (string_append): Use size_t n. > (string_appendn, string_prependn): Take a size_t n arg. >

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread John David Anglin
On 2020-11-13 1:20 p.m., Jeff Law wrote: > On 11/13/20 10:29 AM, Jakub Jelinek via Gcc-patches wrote: >> Hi! >> >> The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or >> later and thread model (e.g. printed by gcc -v) is not single. >> There are two targets not handled by this

[PATCH] Re: Fix gimple_expr_code?

2020-11-13 Thread Andrew MacLeod via Gcc-patches
On 11/13/20 4:05 AM, Richard Biener wrote: On Thu, Nov 12, 2020 at 10:12 PM Andrew MacLeod > wrote: On 11/12/20 3:53 PM, Richard Biener wrote: > On November 12, 2020 9:43:52 PM GMT+01:00, Andrew MacLeod via Gcc-patches mailto:gcc-patches@gcc.gnu.org>>

Re: [PATCH] libiberty: Make strstr.c in libiberty ANSI compliant

2020-11-13 Thread Jeff Law via Gcc-patches
On 5/1/20 6:06 PM, Seija Kijin via Gcc-patches wrote: > The original code in libiberty says "FIXME" and then says it has not been > validated to be ANSI compliant. However, this patch changes the function to > match implementations that ARE compliant, and such code is in the public > domain. > >

Re: [pushed] c++: Implement C++20 'using enum'. [PR91367]

2020-11-13 Thread Nathan Sidwell
On 11/13/20 1:35 PM, Jason Merrill via Gcc-patches wrote: This feature allows the programmer to import enumerator names into the current scope so later mentions don't need to use the fully-qualified name. These usings are not subject to the usual restrictions on using-declarations: in

Re: [PATCH] PR preprocessor/94657: use $AR, not 'ar',

2020-11-13 Thread Jeff Law via Gcc-patches
On 4/22/20 4:05 PM, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > On system with 'ar' and '${CHOST}-ar' the latter is preferred. > as it might not match default 'ar'. > > Bug is initially reported downstream as https://bugs.gentoo.org/718004. > > libcpp/ChangeLog: > > PR

[pushed] c++: Implement C++20 'using enum'. [PR91367]

2020-11-13 Thread Jason Merrill via Gcc-patches
This feature allows the programmer to import enumerator names into the current scope so later mentions don't need to use the fully-qualified name. These usings are not subject to the usual restrictions on using-declarations: in particular, they can move between class and non-class scopes, and

[PATCH] vect: Add a “very cheap” cost model

2020-11-13 Thread Richard Sandiford via Gcc-patches
Currently we have three vector cost models: cheap, dynamic and unlimited. -O2 -ftree-vectorize uses “cheap” by default, but that's still relatively aggressive about peeling and aliasing checks, and can lead to significant code size growth. This patch adds an even more conservative choice, which

Re: [PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 10:29 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or > later and thread model (e.g. printed by gcc -v) is not single. > There are two targets not handled by this patch, those that define > THREAD_MODEL_SPEC.

Re: [PATCH] testsuite: guality/redeclaration1.C test workaround

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 10:37 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > Apparently older GDB versions didn't handle this test right and so while > it has been properly printing 42 on line 14 (e.g. on x86_64), it issued > a weird error on line 17 (and because it didn't print any value, guality >

[COMMITTED] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
The original patch has been modified according to the reviewers comments and the following patch has been committed. commit e3b3b59683c1e7d31a9d313dd97394abebf644be Author: Vladimir N. Makarov Date: Fri Nov 13 12:45:59 2020 -0500 [PATCH] Implementation of asm goto outputs gcc/

[committed] openmp: Support allocate for C/C++ array section reductions

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! This adds allocate clause support for array section reductions. Furthermore, it fixes one bug that would cause inscan reductions with allocate to be rejected by C, and for now just ignores allocate for inscan/task reductions, that will need slightly more work. Bootstrapped/regtested on

[PATCH] dwarf2: Emit DW_TAG_unspecified_parameters even in late DWARF [PR97599]

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! Aldy's PR71855 fix avoided emitting multiple redundant DW_TAG_unspecified_parameters sub-DIEs of a single DIE by restricting it to early dwarf only. That unfortunately means if we need to emit another DIE for the function (whether it is for LTO, or e.g. because of IPA cloning), we don't emit

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> How much does this pragma get used "in the wild"? A quick search on github for "#pragma region" comes back with 170k C++ results and searching for "#pragma" comes back with 38M C++ results Possibly not the best metric, but we can "conclude" roughly 0.45% of open source C++ code files on github

Improve handling of memory operands in ipa-icf 3/4

2020-11-13 Thread Jan Hubicka
Hi, this patch is based on Maritn's patch https://gcc.gnu.org/legacy-ml/gcc-patches/2019-11/msg02633.html however based on new code that track and compare memory accesses so it can be implemented correctly. As shown here https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558773.html the

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> But in that case the pragma shouldn't be ignored, but instead checked > against the various requirements. E.g. that region is followed by a single > optional name (are there any requirements on what name can be, can it be > just a single token, can it be C/C++ keyword, etc.), guess ignore all

[PATCH] testsuite: guality/redeclaration1.C test workaround

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! Apparently older GDB versions didn't handle this test right and so while it has been properly printing 42 on line 14 (e.g. on x86_64), it issued a weird error on line 17 (and because it didn't print any value, guality testsuite wasn't marking it as FAIL). That has been apparently fixed in GDB

Re: [PATCH PR93334][GCC11]Refine data dependence of two refs storing the same constant with the same bytes

2020-11-13 Thread Jeff Law via Gcc-patches
On 1/29/20 6:52 AM, bin.cheng wrote: > Hi, > > As discussed in the PR, this simple patch refines data dependence of two write > references storing the same constant with the same bytes. It simply detects > the case with some restrictions and treats it as no dependence. For now the > added

Re: [PATCH] ipa-cp: One more safe_add (PR 97816)

2020-11-13 Thread Jan Hubicka
> Hi, > > The new behavior of safe_add triggered an ICE because of one use where > it had not been used instead of a simple addition. I'll fix it with the > following obvious patch so that periodic benchmarkers can continue > working because a proper fix (see below) will need a review. > > The

[PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or later and thread model (e.g. printed by gcc -v) is not single. There are two targets not handled by this patch, those that define THREAD_MODEL_SPEC. In one case - QNX - it looks just like a mistake to me, instead of

Re: [PATCH][c++] Do not warn about unused macros while processing #pragma GCC optimize

2020-11-13 Thread Jeff Law via Gcc-patches
On 8/5/19 7:53 PM, Piotr H. Dabrowski wrote: > Fixes c++/91318. > > libcpp/ChangeLog: > > 2019-08-06 Piotr Henryk Dabrowski > > PR c++/91318 > * include/cpplib.h: Added cpp_define_unused(), > cpp_define_formatted_unused() > * directives.c: Likewise. > >

[PATCH] ipa-cp: One more safe_add (PR 97816)

2020-11-13 Thread Martin Jambor
Hi, The new behavior of safe_add triggered an ICE because of one use where it had not been used instead of a simple addition. I'll fix it with the following obvious patch so that periodic benchmarkers can continue working because a proper fix (see below) will need a review. The testcase showed

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 11:02 +, Jonathan Wakely wrote: On 12/11/20 23:49 +, Jonathan Wakely wrote: To poll a std::future to see if it's ready you have to call one of the timed waiting functions. The most obvious way is wait_for(0s) but this was previously very inefficient because it would turn the

Re: [Patch 0/X] HWASAN v4

2020-11-13 Thread Martin Liška
On 11/13/20 5:57 PM, Matthew Malcomson wrote: Hi there, Thanks for the heads-up. As it turns out the most recent `libhwasan` crashes when displaying an address on the stack in Linux. Hello. What a bad luck. I'm currently working on getting it fixed here

Re: [Patch 0/X] HWASAN v4

2020-11-13 Thread Matthew Malcomson via Gcc-patches
Hi there, Thanks for the heads-up. As it turns out the most recent `libhwasan` crashes when displaying an address on the stack in Linux. I'm currently working on getting it fixed here https://reviews.llvm.org/D91344#2393371 . If this hwasan patch series gets approved and if that patch goes in

Re: [3/3][aarch64] Add support for vec_widen_shift pattern

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed all the comments. > > +#include > > + > > SVE targets will need a: > > #pragma GCC target "+nosve" > > here, since we'll generate different code for SVE. Fixed. > > +/* { dg-final { scan-assembler-times "shll\t" 1} } */ > > +/* {

Re: [2/3][vect] Add widening add, subtract vect patterns

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed all the comments. > Like Richard said, the new patterns need to be documented in md.texi > and the new tree codes need to be documented in generic.texi. Done. > While we're using tree codes, I think we need to make the naming > consistent

[PATCH] gcov: Add -fprofile-info-section support

2020-11-13 Thread Sebastian Huber
Register the profile information in the specified section instead of using a constructor/destructor. A pointer to the profile information generated by -fprofile-arcs or -ftest-coverage is placed in the specified section for each translation unit. This option disables the profile information

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 10:51 a.m., Uros Bizjak wrote: diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c new file mode 100644 index 000..8685ca2a1cb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c @@ -0,0 +1,14 @@

[PATCH] Add 3 new EVRP testcases.

2020-11-13 Thread Andrew MacLeod via Gcc-patches
This patch adds 3 new evrp testcases which test some enhanced ranger functionality in EVRP. I pulled them from the old rvrp testsuite that was created when the ranger project was first started, and they are things EVRP didn't use to get. Andrew commit

Re: [1/3][aarch64] Add aarch64 support for vec_widen_add, vec_widen_sub patterns

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed the comment. > There are ways in which we could reduce the amount of cut-&-paste here, > but I guess everything is a trade-off between clarity and compactness. > One extreme is to write them all out explicitly, another extreme would > be to

[PATCH][pushed] testsuite: move expected error location

2020-11-13 Thread Martin Liška
Hello. One obvious fix of expected error location. Martin gcc/testsuite/ChangeLog: PR testsuite/97788 * g++.dg/ubsan/pr61272.C: Move expected error location. --- gcc/testsuite/g++.dg/ubsan/pr61272.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [22.2/32] module flags

2020-11-13 Thread Nathan Sidwell
On 11/13/20 9:27 AM, Richard Biener wrote: On Fri, Nov 13, 2020 at 3:04 PM Nathan Sidwell wrote: struct GTY(()) lang_decl_base { - /* Larger than necessary for faster access. */ - ENUM_BITFIELD(lang_decl_selector) selector : 16; + ENUM_BITFIELD(lang_decl_selector) selector : 3; ... +

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2020-11-13 Thread Jose E. Marchesi via Gcc-patches
> PING^7 on the following patch proposed 8 months ago for gcc11: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542198.html > > > The deadline for gcc11 stage 1 is approaching. The pinged patch is > one that has been

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 04:51:09PM +0100, Uros Bizjak via Gcc-patches wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c > @@ -0,0 +1,14 @@ > +/* Check that LRA really puts output reloads for p4 in two successors blocks > */ > +/* { dg-do compile { target x86_64-*-* }

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Uros Bizjak via Gcc-patches
Hello! >The following patch implements asm goto with outputs. Kernel > developers several times expressed wish to have this feature. Asm > goto with outputs was implemented in LLVM recently. This new feature > was presented on 2020 linux plumbers conference >

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-13 Thread Patrick Palka via Gcc-patches
On Thu, 12 Nov 2020, Jason Merrill wrote: > On 11/12/20 1:27 PM, Patrick Palka wrote: > > The atom_cache in normalize_atom relies on the assumption that two > > equivalent (templated) trees (in the sense of cp_tree_equal) must use > > the same template parameters (according to

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 09:57:31AM -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread David Malcolm via Gcc-patches
On Fri, 2020-11-13 at 09:57 -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go away" >

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
On the contrary, as a user of GCC I would much prefer a consistent behavior for #pragma region based purely on GCC version. IE, so you can tell people: "just update to GCC X.Y and those warnings will go away" rather than: "update to GCC X.Y and pass some new flags - but make sure not

[committed] arm: Make use of RTL predicates

2020-11-13 Thread Andrea Corallo via Gcc-patches
Hi all, this is to fix missing uses of RTL predicates in the arm backend. Regtested and bootstraped on arm-linux-gnueabihf. Commited into master as 156edf21fab as pre-approved [1]. Andrea [1] >From

[PATCH] Cleanup range of address calculations.

2020-11-13 Thread Andrew MacLeod via Gcc-patches
There were some slight differences between when ranger would get non-zero for and what EVRP was getting. Ive extracted the bits from vrp_stmt_computes_nonzero required and now the 2 versions should be aligned. Ive also renamed the function from the previously cryptic

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 4:00 a.m., Richard Biener wrote: On Thu, Nov 12, 2020 at 8:55 PM Vladimir Makarov via Gcc-patches wrote: The following patch implements asm goto with outputs. Kernel developers several times expressed wish to have this feature. Asm goto with outputs was implemented in LLVM

  1   2   >