[PATCH] expansion: Improve double-word modulo by certain constant divisors [PR97459]

2020-11-27 Thread Jakub Jelinek via Gcc-patches
Hi! As discussed in the PR, e.g. on x86_64 (both -m32 and -m64) there is no double-word modulo and so we expand it to a __{,u}mod[dt]i3 call. For certain constant divisors we can do better. E.g. consider 32-bit word-size, 0x1ULL % 3 == 1, so we can use partly the Hacker's delight modulo b

Re: [07/23] Add a class that multiplexes two pointer types

2020-11-27 Thread Martin Sebor via Gcc-patches
On 11/26/20 10:06 AM, Richard Sandiford wrote: Martin Sebor writes: I do have one concern: the tendency to prioritize efficiency over safety (this can be said about most GCC code). Specifically in this class, the address bit twiddling makes me uneasy. I don't think the object model in either l

Re: [PATCH] RISC-V: Always define MULTILIB_DEFAULTS

2020-11-27 Thread Jim Wilson
On Fri, Nov 20, 2020 at 10:38 PM Kito Cheng wrote: > On Sat, Nov 21, 2020 at 6:12 AM Jim Wilson wrote: > > On Fri, Nov 20, 2020 at 12:34 AM Kito Cheng > wrote: > > > > > - Define MULTILIB_DEFAULTS can reduce the total number of multilib if > > >the default arch and ABI are listed in the mu

Re: [PATCH] Fix print_multilib_info when default arguments appear in the option list with '!'

2020-11-27 Thread Jim Wilson
On Thu, Nov 26, 2020 at 1:04 AM Kito Cheng wrote: > * gcc.c (print_multilib_info): Check default arguments not > appeared in multi-lib option list with '!' > OK. Jim

Re: [PATCH] clean up more -Wformat-diag (PR 94982)

2020-11-27 Thread Martin Sebor via Gcc-patches
On 11/26/20 8:42 AM, H.J. Lu wrote: On Tue, Nov 24, 2020 at 5:13 PM Martin Sebor via Gcc-patches wrote: The attached patch cleans up most remaining -Wformat-diag instances in an x86_64-build. I tried to minimize using #pragma diagnostic so I tweaked the code instead. A preferable solution mi

preprocessor: Fix #line overflow check [PR97602]

2020-11-27 Thread Joseph Myers
The preprocessor check for overflow (of linenum_type = unsigned int) when reading the line number in a #line directive is incomplete; it checks "reg < reg_prev" which doesn't cover all cases where multiplying by 10 overflowed. Fix this by checking for overflow before rather than after it occurs (u

Re: Fortran: With OpenACC, ignore OpenMP's cond comp sentinels [PR98011]

2020-11-27 Thread Tobias Burnus
On 27.11.20 18:31, Jakub Jelinek via Fortran wrote: Depends on what does the OpenACC standard say. If it has similar wording to OpenMP that '!$ ' stands ... It only has '!$acc' (free) and !$acc + c$acc + *$acc (fixed). cf. https://www.openacc.org/sites/default/files/inline-images/Specification

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

2020-11-27 Thread Kwok Cheung Yeung
Hello This patch still needs review. Thanks Kwok On 19/11/2020 6:07 pm, Kwok Cheung Yeung wrote: On 29/10/2020 10:03 am, Jakub Jelinek wrote: I'm actually not sure how this can work correctly. Let's say we have int foo () { return 1; } int bar () { return 2; } int baz () { return 3; } int qu

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

2020-11-27 Thread Kwok Cheung Yeung
Hello This is an updated version of the WIP patch for task detach support. Any comments would be welcome! On 11/11/2020 7:06 pm, Kwok Cheung Yeung wrote: - No error checking at the front-end. The detach clause is now parsed properly in C, C++ and Fortran, and will raise an error if the syn

PING^1 Re: [PATCH] C++ : Add the -stdlib= option.

2020-11-27 Thread Iain Sandoe
Hi Folks, this patch needs C++ review thanks Iain Iain Sandoe wrote: resending - the first & second attempt didn’t seem to make it to gcc-patches. Hi This option allows the user to specify alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runti

PING^1 Re: [PATCH v2] C-family : Add attribute 'unavailable'.

2020-11-27 Thread Iain Sandoe
Hi I believe this version addressed Joseph’s and Richard’s comment, but it C++ review. thanks Iain Iain Sandoe wrote: Joseph Myers wrote: This patch seems to be missing documentation for the new attribute in extend.texi. Apologies, for that omission, revised patch includes the documen

[PATCH v3 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-27 Thread Maciej W. Rozycki
From: Matt Thomas Fix an ICE with the handling of RTL expressions like: (subreg:QI (mem/c:SI (plus:SI (plus:SI (mult:SI (reg/v:SI 0 %r0 [orig:67 i ] [67]) (const_int 4 [0x4])) (reg/v/f:SI 7 %r7 [orig:59 doacross ] [59])) (const_int 40 [0x28])) [1

Re: [PATCH v2 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-27 Thread Maciej W. Rozycki
On Fri, 27 Nov 2020, Maciej W. Rozycki wrote: > > That said, if it fixes the test suite errors you're seeing, it would > > probably be OK to go with just this minimal change -- unless we can > > just move to LRA as mentioned above. > > I've looked through the test results and indeed these suspic

RE: [PATCH] fold-const: Don't consider NaN non-negative [PR97965]

2020-11-27 Thread Joseph Myers
On Thu, 26 Nov 2020, Roger Sayle wrote: > NaNs have a sign-bit, so copyexpr (and negate and ABS_EXPR) are > well-defined, and it's reasonable for nonnegative_p to reflect this. > IMHO, the true bug is that we can't fold away (any) comparisons against > NaN when flag_trapping_math, irrespective

Re: [PATCH] fold-const: Don't consider NaN non-negative [PR97965]

2020-11-27 Thread Joseph Myers
On Thu, 26 Nov 2020, Richard Biener wrote: > Is copysign (x, NaN) supposed to be well-defined? We'd stop folding copysign with NaN arguments (including sNaN) is well-defined and copies the sign bit without raising any exceptions. > this then, no? I think the ABS_EXPR < 0 to false folding is >

[committed] libphobos: Fix segfault at run-time when using custom Fibers (PR 98025)

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, When libphobos is configured with --enable-cet, this adds extra fields to the Fiber class to support the ucontext_t fallback implementation. These fields get omitted when compiling user code unless they also used `-fversion=CET' to build their project, which resulted in data being overwritten

[committed] d: Merge upstream dmd db0df3f7e.

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream DMD db0df3f7e, removing all support code and tests for the extern(Pascal) calling convention. Bootstrapped and regression tested on x86_64-linux-gnu with -mx32/-m32, committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * dmd/MERG

[committed] libphobos: Merge upstream druntime d37ef985.

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D runtime library with upstream druntime d37ef985, adding support for FreeBSD/x86 53-bit precision reals, updating bindings for FreeBSD 12.x, and removing all support code and tests for the extern(Pascal) calling convention. Bootstrapped and regression tested on x86_64-l

[committed] libphobos: Merge upstream phobos 38873fe6e.

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D standard library with upstream phobos 38873fe6e, adding support for FreeBSD/x86 53-bit precision reals, and removing all support code and tests for the extern(Pascal) calling convention. Bootstrapped and regression tested on x86_64-linux-gnu with -mx32/-m32, committed

[committed] d: Add float and double overloads for all core.math intrinsics

2020-11-27 Thread Iain Buclaw via Gcc-patches
Hi, For the math intrinsics: cos, fabs, ldexp, rint, rndtol, and sin, new overloads have been added to the core.math module for matching float and double types. These have been implemented in the compiler. A recent change to dump_function_to_file started triggering some scan-tree-dump tests to F

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Iain Buclaw via Gcc-patches
Excerpts from H.J. Lu's message of November 27, 2020 8:28 pm: > On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose wrote: >> >> On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote: >> > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener wrote: >> >> >> >> OK. >> >> >> >> On Fri, 27 Nov 2020, H.J. Lu wrot

Re: [RFC] Decrease default timeout for libstdc++ tests to 6 minutes

2020-11-27 Thread Christophe Lyon via Gcc-patches
On Fri, 27 Nov 2020 at 17:13, Jonathan Wakely via Gcc-patches wrote: > > The default for the GCC testsuite is 300, i.e. 5 minutes, which is the > same as the DejaGnu default. > > Libstdc++ overrides this to 600, i.e. 10 minutes. > > This seems ridiculously long. If any test takes that long on mode

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 11:02 AM Matthias Klose wrote: > > On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote: > > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener wrote: > >> > >> OK. > >> > >> On Fri, 27 Nov 2020, H.J. Lu wrote: > >> > >>> PR other/98027 > >>> * doc/install: Default t

Re: [PATCH v2 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-27 Thread Maciej W. Rozycki
On Fri, 27 Nov 2020, Ulrich Weigand wrote: > > NB I find the reindentation resulting in `push_reload' awful, just as I > > do either version of the massive logical expression involved. Perhaps we > > could factor these out into `static inline' functions sometime, and then > > have them split

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Matthias Klose
On 11/27/20 3:54 PM, H.J. Lu via Gcc-patches wrote: > On Fri, Nov 27, 2020 at 6:24 AM Richard Biener wrote: >> >> OK. >> >> On Fri, 27 Nov 2020, H.J. Lu wrote: >> >>> PR other/98027 >>> * doc/install: Default to --enable-cet=auto. >>> --- >>> gcc/doc/install.texi | 9 - >>> 1

[PATCH] testsuite: Correct check_effective_target_hwaddress_exec

2020-11-27 Thread Matthew Malcomson via Gcc-patches
Hello, - This test should ensure that we can compile with hwasan, that such a compiled binary runs as expected, *and* that we're running on a kernel which implements the capability to ignore the top bytes of pointers in syscalls. It was expected that a basic test of `int main(void) { return

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 8:22 AM Gerald Pfeifer wrote: > > On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote: > > +@code{--enable-cet=auto} is default. CET is enabled on Linux/x86 if > > +target binutils supports @code{Intel CET} instructions and disabled > > +otherwise. In this case, the target

Re: [07/23] Add a class that multiplexes two pointer types

2020-11-27 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > One thing I'd deliberately tried to avoid was converting integers > “back” to pointers, because that seemed like a more dangerous thing. > That's why: > >>> +template >>> +inline T2 * >>> +pointer_mux::second_or_null () const >>> +{ >>> + // Micro optim

Re: More new AIX errors

2020-11-27 Thread David Edelsohn via Gcc-patches
On Thu, Nov 26, 2020 at 6:02 PM Jonathan Wakely wrote: > > On 26/11/20 22:33 +, Jonathan Wakely wrote: > >On 26/11/20 15:33 -0500, David Edelsohn via Libstdc++ wrote: > >>Hi, Jonathan > >> > >>Thanks for the recent fixes. I still see a few errors that have crept > >>in on AIX. All the same:

Re: [PATCH] libstdc++: Add support for C++20 barriers

2020-11-27 Thread Jonathan Wakely via Gcc-patches
On 20/11/20 16:30 -0800, Thomas Rodgers wrote: From: Thomas Rodgers Should include all discussion on and off list to date. Most of the comments in https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558090.html still apply to this version. Adds libstdc++/ChangeLog: * include/

[PATCH] testsuite/i386: Fix XOP and FMA4 checking functions [PR98036].

2020-11-27 Thread Uros Bizjak via Gcc-patches
Add missing returns and remove unnecessary postfix increments. 2020-11-27 Uroš Bizjak PR testsuite/98036 gcc/testsuite/ * gcc.target/i386/fma4-256-maccXX.c (check_maccps): Remove unnecessary postfix increment on a returned variable. (check_maccpd): Ditto. * gcc.target/i386

Re: Fortran: With OpenACC, ignore OpenMP's cond comp sentinels

2020-11-27 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 27, 2020 at 06:18:46PM +0100, Tobias Burnus wrote: > '!' starts in Fortran a comment (+ fixed-form variants) > OpenACC defines as sentinel "!$acc" (likewise) > But OpenMP has two: Besides "!$omp" there is additionally > "!$ " (with space) to permit conditional compilation. > > Currentl

Fortran: With OpenACC, ignore OpenMP's cond comp sentinels

2020-11-27 Thread Tobias Burnus
'!' starts in Fortran a comment (+ fixed-form variants) OpenACC defines as sentinel "!$acc" (likewise) But OpenMP has two: Besides "!$omp" there is additionally "!$ " (with space) to permit conditional compilation. Currently, -fopenacc also executes the '!$ ' code, which I think does not make sen

Re: [PING] [PATCH] libstdc++: Pretty printers for std::_Bit_reference, std::_Bit_iterator and std::_Bit_const_iterator

2020-11-27 Thread Jonathan Wakely via Gcc-patches
On 25/11/20 15:05 +0100, Michael Weghorn via Libstdc++ wrote: I'd like to ping for this patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553870.html Thanks, I'll take another look next week. Michael On 11/10/2020 19.22, Michael Weghorn via Gcc-patches wrote: On 22/09/2020 12

Re: [00/23] Make fwprop use an on-the-side RTL SSA representation

2020-11-27 Thread Richard Sandiford via Gcc-patches
Michael Matz writes: > Hello, > > On Thu, 26 Nov 2020, Richard Sandiford via Gcc-patches wrote: > >> >> The aim is only to provide a different view of existing RTL instructions. >> >> Unlike gimple, and unlike (IIRC) the old RTL SSA project from way back, >> >> the new framework isn't a “native” S

[PATCH] gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixes

2020-11-27 Thread Jonathan Wakely via Gcc-patches
This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which was one of the original motivations for adding wildcard support in the first place: https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html contrib/ChangeLog: * gcc-changelog/git_commit.py (wildcard_prefixes): Add li

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Gerald Pfeifer
On Fri, 27 Nov 2020, H.J. Lu via Gcc-patches wrote: > +@code{--enable-cet=auto} is default. CET is enabled on Linux/x86 if > +target binutils supports @code{Intel CET} instructions and disabled > +otherwise. In this case, the target libraries are configured to get > +additional @option{-fcf-prote

[RFC] Decrease default timeout for libstdc++ tests to 6 minutes

2020-11-27 Thread Jonathan Wakely via Gcc-patches
The default for the GCC testsuite is 300, i.e. 5 minutes, which is the same as the DejaGnu default. Libstdc++ overrides this to 600, i.e. 10 minutes. This seems ridiculously long. If any test takes that long on modern hardware, something is wrong. We've seen this a lot recently with buggy tests,

OpenMP patch ping

2020-11-27 Thread Tobias Burnus
OpenMP-related patch pings: Kwok's: * Re: [PATCH] openmp: Implicit 'declare target' for C++ static initializers https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559624.html * RFC: Nested declare target support https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559758.html Chung

Re: OpenACC 'kernels' testsuite failures

2020-11-27 Thread Thomas Schwinge
Hi David! On 2020-11-27T10:47:17-0500, David Edelsohn wrote: > Actually, yes, AIX does allow dereference of a NULL pointer. Oh. That's not what I expected! Heh. Anyway, that then indeed completely explains what was going on here -- which is good. :-) Grüße Thomas > On Fri, Nov 27, 2020

Re: [00/23] Make fwprop use an on-the-side RTL SSA representation

2020-11-27 Thread Michael Matz
Hello, On Thu, 26 Nov 2020, Richard Sandiford via Gcc-patches wrote: > >> The aim is only to provide a different view of existing RTL instructions. > >> Unlike gimple, and unlike (IIRC) the old RTL SSA project from way back, > >> the new framework isn't a “native” SSA representation. This means

[committed] libstdc++: Refactor dejagnu effective-target checks

2020-11-27 Thread Jonathan Wakely via Gcc-patches
This introduces two new procs to replace boilerplate in the effective-target checks. libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (v3_try_preprocess): Define new proc to preprocess a chunk of code. (v3_check_preprocessor_condition): Define new proc to test

Re: OpenACC 'kernels' testsuite failures

2020-11-27 Thread David Edelsohn via Gcc-patches
Hi, Thomas Actually, yes, AIX does allow dereference of a NULL pointer. Thanks, David On Fri, Nov 27, 2020 at 9:15 AM Thomas Schwinge wrote: > > Hi David! > > On 2020-11-24T15:29:17-0500, David Edelsohn via Gcc-patches > wrote: > > On Tue, Nov 24, 2020 at 5:19 AM Thomas Schwinge > > wrote:

Re: [patch, fortran] Correct fndecls for some library functions

2020-11-27 Thread Tobias Burnus
Hi Thomas, On 25.11.20 12:58, Tobias Burnus wrote: On 15.11.20 18:52, Thomas Koenig via Fortran wrote: +#define ADD_CHAR(c) do { *fp++ = c; *fp++ = ' '; } while(0) ... + ADD_CHAR ('.'); /* Function return. */ Shouldn't this be ".c" instead of ". " as neither global memory is read nor writte

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

2020-11-27 Thread Christophe Lyon via Gcc-patches
On Fri, 27 Nov 2020 at 15:13, Andre Vieira (lists) wrote: > > Hi Christophe, > > On 26/11/2020 15:31, Christophe Lyon wrote: > > Hi Andre, > > > > Thanks for the quick feedback. > > > > On Wed, 25 Nov 2020 at 18:17, Andre Simoes Dias Vieira > > wrote: > >> Hi Christophe, > >> > >> Thanks for thes

Re: [PATCH 0/3] Enable PGO/LTO build for binutils+gdb

2020-11-27 Thread Martin Liška
On 10/29/20 8:11 PM, H.J. Lu wrote: Add the --enable-pgo-build[=lto] configure option. When binutils+gdb is not built together with GCC, --enable-pgo-build enables the PGO build: I would like to support the patch. It significantly speeds up gas for free (based on my measurements). Thanks, Mar

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

2020-11-27 Thread Martin Liška
On 11/20/20 3:37 PM, Richard Biener wrote: On Fri, Nov 20, 2020 at 9:57 AM Martin Liška wrote: On 11/19/20 3:46 PM, Richard Biener wrote: OK, so can you send an updated patch? + tree pos_one = build_int_cst (type, 1); + if (!left->m_has_forward_bb + && !right->m_has_forwar

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
On Fri, Nov 27, 2020 at 6:24 AM Richard Biener wrote: > > OK. > > On Fri, 27 Nov 2020, H.J. Lu wrote: > > > PR other/98027 > > * doc/install: Default to --enable-cet=auto. > > --- > > gcc/doc/install.texi | 9 - > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff

Re: [PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread Richard Biener
OK. On Fri, 27 Nov 2020, H.J. Lu wrote: > PR other/98027 > * doc/install: Default to --enable-cet=auto. > --- > gcc/doc/install.texi | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi > index 5f879ca4cea..021

Re: OpenACC 'kernels' testsuite failures

2020-11-27 Thread Thomas Schwinge
Hi David! On 2020-11-24T15:29:17-0500, David Edelsohn via Gcc-patches wrote: > On Tue, Nov 24, 2020 at 5:19 AM Thomas Schwinge > wrote: >> On 2020-11-21T10:50:10-0500, David Edelsohn wrote: >> > I see >> > >> > "during GIMPLE pass: omplower" >> > >> > message for kernels-decompose-ice-2.c. k

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

2020-11-27 Thread Andre Vieira (lists) via Gcc-patches
Hi Christophe, On 26/11/2020 15:31, Christophe Lyon wrote: Hi Andre, Thanks for the quick feedback. On Wed, 25 Nov 2020 at 18:17, Andre Simoes Dias Vieira wrote: Hi Christophe, Thanks for these! See some inline comments. On 25/11/2020 13:54, Christophe Lyon via Gcc-patches wrote: This pat

Re: Decompose OpenACC 'kernels' constructs into parts, a sequence of compute constructs

2020-11-27 Thread Thomas Schwinge
Hi! On 2020-11-13T23:22:30+0100, I wrote: > [...] I've pushed to master branch [...] commit > e898ce7997733c29dcab9c3c62ca102c7f9fa6eb "Decompose OpenACC 'kernels' > constructs into parts, a sequence of compute constructs", see attached. > >> There's more work to be done there, and we're aware of

[PATCH] INSTALL: Default to --enable-cet=auto

2020-11-27 Thread H.J. Lu via Gcc-patches
PR other/98027 * doc/install: Default to --enable-cet=auto. --- gcc/doc/install.texi | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 5f879ca4cea..021c347cc09 100644 --- a/gcc/doc/install.texi +++ b/gcc/d

[committed] libstdc++: Fix -Wrange-loop-construct warnings in filesystem tests

2020-11-27 Thread Jonathan Wakely via Gcc-patches
Many tests do `for (const path& p : test_paths)` where test_paths is an array of strings. To avoid -Wrange-loop-construct warnings the loop variable should be an object, not a reference bound to a temporary. Tested powerpc64le-linux and x86_64-w64-mingw32, pushed to trunk. commit 4a7c7999086756b

[C++ patch] Re: Free more of CFG in release_function_body

2020-11-27 Thread Jan Hubicka
> > On Wed, Nov 25, 2020 at 3:11 PM Jan Hubicka wrote: > > > > > > > On Tue, 24 Nov 2020, Jan Hubicka wrote: > > > > > > > > > Hi, > > > > > at the end of processing function body we loop over basic blocks and > > > > > free all edges while we do not free the rest. I think this is > > > > > left

Re: [PATCH] aarch64: Introduce --param=aarch64-autovec-preference to select autovec preference in backend

2020-11-27 Thread Richard Sandiford via Gcc-patches
Kyrylo Tkachov writes: >> -Original Message- >> From: Richard Sandiford >> Sent: 27 November 2020 08:29 >> To: Richard Biener >> Cc: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH] aarch64: Introduce --param=aarch64-autovec- >> preference to select autovec preference in

[PATCH][pushed] changelog: allow flexible "cherry picked" format.

2020-11-27 Thread Martin Liška
It handles the following: (cherry picked from commit c0c7270cc4efd896fe99f8ad5409dbef089a407f (testsuite changes only)) contrib/ChangeLog: * gcc-changelog/git_commit.py: Use regex for cherry pick prefix. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patche

Re: [committed] libstdc++: Use __libc_single_threaded for locale initialization

2020-11-27 Thread Jonathan Wakely via Gcc-patches
On 27/11/20 11:15 +, Jonathan Wakely wrote: On 27/11/20 09:43 +0100, Stephan Bergmann via Libstdc++ wrote: On 24/11/2020 15:59, Jonathan Wakely via Gcc-patches wrote: Most initialization of locales and facets happens before main() during startup, when the program is likely to only have one

Re: [PATCH] testsuite: i386: Extend effective-target checks for AVX512BW, AVX512DQ

2020-11-27 Thread Rainer Orth
Hi Uros, > On Fri, Nov 27, 2020 at 11:08 AM Rainer Orth > wrote: >> >> When using the Solaris/x86 assembler with gcc, a couple of testcases >> currently FAIL. Those failures follow two patterns: >> >> FAIL: gcc.target/i386/avx512bw-vpmovb2m-2.c (test for excess errors) >> Excess errors: >> Assem

Re: [PATCH] testsuite: i386: Extend effective-target checks for AVX512BW, AVX512DQ

2020-11-27 Thread Uros Bizjak via Gcc-patches
On Fri, Nov 27, 2020 at 11:08 AM Rainer Orth wrote: > > When using the Solaris/x86 assembler with gcc, a couple of testcases > currently FAIL. Those failures follow two patterns: > > FAIL: gcc.target/i386/avx512bw-vpmovb2m-2.c (test for excess errors) > Excess errors: > Assembler: avx512bw-vpmovb

RE: [PATCH] aarch64: Introduce --param=aarch64-autovec-preference to select autovec preference in backend

2020-11-27 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: 27 November 2020 08:29 > To: Richard Biener > Cc: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] aarch64: Introduce --param=aarch64-autovec- > preference to select autovec preference in backend > > Richard Biener

[PATCH] tree-optimization/98024 - fix rnflow regression

2020-11-27 Thread Richard Biener
The change to make PRE insertion iterate less had a typo in checking successors RPO state. Fixing this exposes that regular PRE insertion when facing a value that is the same on all edges inserts an assignment in place of a PHI node but fails to set up things so that this insertion is not repeated

Re: [committed] libstdc++: Use __libc_single_threaded for locale initialization

2020-11-27 Thread Jonathan Wakely via Gcc-patches
On 27/11/20 09:43 +0100, Stephan Bergmann via Libstdc++ wrote: On 24/11/2020 15:59, Jonathan Wakely via Gcc-patches wrote: Most initialization of locales and facets happens before main() during startup, when the program is likely to only have one thread. By using the new __gnu_cxx::__is_single_t

RE: [PATCH] fold-const: Don't consider NaN non-negative [PR97965]

2020-11-27 Thread Roger Sayle
Doh! Wrong patch2.txt file. Sorry. -Original Message- From: Roger Sayle Sent: 27 November 2020 10:52 To: 'Jakub Jelinek' ; 'Joseph S. Myers' Cc: 'Richard Biener' ; 'gcc-patches@gcc.gnu.org' Subject: RE: [PATCH] fold-const: Don't consider NaN non-negative [PR97965] Hi Jakub, Technic

Re: [PATCH v2 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-27 Thread Ulrich Weigand via Gcc-patches
On Tue, Nov 24, 2020 at 06:19:41AM +, Maciej W. Rozycki wrote: > NB I find the reindentation resulting in `push_reload' awful, just as I > do either version of the massive logical expression involved. Perhaps we > could factor these out into `static inline' functions sometime, and then >

RE: [PATCH] fold-const: Don't consider NaN non-negative [PR97965]

2020-11-27 Thread Roger Sayle
Hi Jakub, Technically, PR97965 doesn't explicitly mention equality/inequality, but you're right, it makes sense to tackle this missed optimization at the same time as we fix the wrong-code. On Thu, Nov 26, 2020, Jakub Jelinek wrote: >On Thu, Nov 26, 2020 at 01:56:03PM -, Roger Sayle wrote: >>

[Patch, committed] gfortran.dg/gomp/requires-4.f90: Fix !$omp syntax

2020-11-27 Thread Tobias Burnus
Found when grepping & post commit. There were two !$omp issues in the testcase – which (currently) do not show up due to the previous (and intended) errors. Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955,

Re: [PATCH v2] configury : Fix LEB128 support for non-GNU assemblers.

2020-11-27 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 27, 2020 at 10:29:53AM +, Iain Sandoe wrote: > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > @@ -3114,34 +3114,38 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix) > gcc_AC_INITFINI_ARRAY > > # Check if we have .[us]leb128, and support symbol arithmetic with it. > +# Older versions of G

Re: [PATCH] arm: [testsuite] fix lob tests for -mfloat-abi=hard

2020-11-27 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > "Richard Earnshaw (lists)" writes: > >> On 26/11/2020 13:53, Andrea Corallo via Gcc-patches wrote: >>> Hi all, >>> >>> I'd like to submit the following simple patch to clean some Low Loop >>> Overhead test failing on hard float configurations. >>> >>> l

Re: [PATCH] tree-ssanames: Allow non-SSA_NAME arguments to get_range_info

2020-11-27 Thread Richard Biener
On Fri, 27 Nov 2020, Jakub Jelinek wrote: > Hi! > > My recent match.pd change required quite a lot of code due to the separate > need to handle INTEGER_CSTs and SSA_NAMEs, and after all, I didn't even > handle one case there, when in x * y / y the x is INTEGER_CST and y is > SSA_NAME. > The follo

[PATCH v2] configury : Fix LEB128 support for non-GNU assemblers.

2020-11-27 Thread Iain Sandoe via Gcc-patches
Hi Folks. Iain Sandoe via Gcc-patches wrote: Rainer Orth wrote: maybe this is enough to cover all bases without having to do any version or target checks. (untested) objdump is not available on quite a few Darwin versions with perfectly functional uleb128 - so I don’t want to punt on thos

[PATCH] tree-ssanames: Allow non-SSA_NAME arguments to get_range_info

2020-11-27 Thread Jakub Jelinek via Gcc-patches
Hi! My recent match.pd change required quite a lot of code due to the separate need to handle INTEGER_CSTs and SSA_NAMEs, and after all, I didn't even handle one case there, when in x * y / y the x is INTEGER_CST and y is SSA_NAME. The following patch allows to simplify it, by allowing non-SSA_NAM

Re: [Patch] OpenACC: Fix integer-type issue with collapse/tile [PR97880]

2020-11-27 Thread Tobias Burnus
Now committed as r11-5489-gf324479caf0ac326534f4fcf72cb12991ccddb3d Tobias On 25.11.20 12:00, Tobias Burnus wrote: Here, the problem was that we were mixing types when calculating the product of loop-steps, each type was taken from the loop var. Solution: take the largest type as diff_type and

[Patch] Fortran: -fno-automatic and -fopenacc / recusion check cleanup

2020-11-27 Thread Tobias Burnus
Two fixes – simple, see patch + commit text. Longer description: * options: Background: - OpenMP, OpenACC and imply that a function is called concurrently and -frecursive implies recusive. In all those cases, the code may fail if a local variable is in static memory instead of stack or heap. – I

[PATCH] testsuite: i386: Extend effective-target checks for AVX512BW, AVX512DQ

2020-11-27 Thread Rainer Orth
When using the Solaris/x86 assembler with gcc, a couple of testcases currently FAIL. Those failures follow two patterns: FAIL: gcc.target/i386/avx512bw-vpmovb2m-2.c (test for excess errors) Excess errors: Assembler: avx512bw-vpmovb2m-2.c "/var/tmp//ccPh3IRc.s", line 58 : Invalid instructi

Re: [committed obvious][arm] Add test that was missing from old commit [PR91816]

2020-11-27 Thread Christophe Lyon via Gcc-patches
On Fri, 27 Nov 2020 at 02:03, Stam Markianos-Wright wrote: > > On 26/11/2020 09:01, Christophe Lyon wrote: > > On Wed, 25 Nov 2020 at 14:24, Stam Markianos-Wright via Gcc-patches > > wrote: > >> > >> Hi all, > >> > >> A while back I submitted GCC10 commit: > >> > >>44f77a6dea2f312ee1743f3dde4

[Ada] Small tweaks to couple of Value routines

2020-11-27 Thread Pierre-Marie de Rodat
This fixes a minor oversight in Integer_To_Fixed and restricts the previous change to System.Value_R.Scan_Raw_Real for the sake of backward compatibility with earlier conversions of the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valuef.adb (Integer_T

[Ada] Wrong compile time evaluation of Shift_Right

2020-11-27 Thread Pierre-Marie de Rodat
When using the Shift_Right operator on negative values (e.g. -1 on a signed type), the wrong value is incorrectly folded after recent changes in sem_eval.adb to add compile time evaluation of the shift operators. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.adb (

[Ada] Reference before declaration on C392015

2020-11-27 Thread Pierre-Marie de Rodat
When working on LLVM/CCG, we found that the generated tree had a wrong reference before declaration usage. Fixed for LLVM/CCG. The issue might still be latent with Modify_Tree_For_C, but this expansion will disappear in the future, so not worth bothering. Tested on x86_64-pc-linux-gnu, committed o

[Ada] Restore access type instead of mode out parameter

2020-11-27 Thread Pierre-Marie de Rodat
Replace an access type parameter, which is unusual in the GNAT sources and more difficult to understand, with a parameter of mode out. Code cleanup only; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.ads (Compile_Time_Compare): Restore par

[Ada] Small improvement to System.Value_R.Scan_Raw_Real

2020-11-27 Thread Pierre-Marie de Rodat
This makes System.Value_R.Scan_Raw_Real round the extra digit it returns to the caller, so that it is precise to the last 'Aft digits for strings that are the exact representation of a number, i.e. not already rounded. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/

[Ada] Do not apply range checks inside generics in GNATprove mode

2020-11-27 Thread Pierre-Marie de Rodat
Similar to what is done for compilation, range checks should not be applied inside generics during GNATprove analysis. This fixes an assertion failure in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Selected_Range_Checks): Adapt the condition for

[Ada] Do not use 128-bit division for 64-bit fixed-point types

2020-11-27 Thread Pierre-Marie de Rodat
This restricts the use of 128-bit division for fixed-point types to the cases where there is a 128-bit type in the source code, that is to say this prevents the compiler from using it for 64-bit types. This is done mainly for the sake of backward compatibility with earlier compilers not supporting

[Ada] Implement AI12-0187 (Stable properties of abstract data types)

2020-11-27 Thread Pierre-Marie de Rodat
This is only an initial implementation, subject to many limitations. Some interactions with derived types and inheritance are not implemented. Other limitations are idenitified in the code with "???" comments. However, Stable_Properties and Stable_Properties'Class aspect specifications are implem

[Ada] To_GM_Time returning invalid value for Invalid_Time

2020-11-27 Thread Pierre-Marie de Rodat
Some code currently relies on To_GM_Time returning some reasonable value in this case rather than e.g. raising an exception and it appears that Windows returns 1970-01-01 except with second set to -1 (triggering an exception), while linux returns 1970-01-01 minus 1 second (so 1969-12-31 at 23:59:59

[Ada] Default_Initial_Condition assertion policy is now RM defined

2020-11-27 Thread Pierre-Marie de Rodat
Default_Initial_Condition was created for SPARK, but has been adopted by Ada 202x, so now it is an RM defined aspect and an assertion policy. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: (Assertion_Policy): Move "Def

[Ada] Sync doc and code for pragma Assertion_Policy

2020-11-27 Thread Pierre-Marie de Rodat
In the listing of assertion kinds accepted for pragma Assertion_Policy some items were wrongly included while other were missing. Now this listing is synchronized with Sem_Prag.Is_Valid_Assertion_Kind. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementatio

[Ada] Assertion_Policy is not a valid assertion policy

2020-11-27 Thread Pierre-Marie de Rodat
The following pragma is currently accepted: pragma Assertion_Policy (Assertion_Policy => Ignore); because of what appears to be a typo in a previous commit on this topic. With this patch the above pragma is rejected as illegal. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Abort defer mismatch with SJLJ exceptions

2020-11-27 Thread Pierre-Marie de Rodat
Enabling checks in the runtime made a latent bug with the sjlj runtime visible. We used to handle abort deferral differently between GCC ZCX and GNAT "Front-End" SJLJ, which is no longer the case with GCC SJLJ, so remove differences to simplify the code and fix the inconsistency. Tested on x86_64-

[Ada] Change parameter from access type to mode out

2020-11-27 Thread Pierre-Marie de Rodat
Replace an access type parameter, which is unusual in the GNAT sources and more difficult to understand, with a parameter of mode out. Code cleanup only; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.ads (Compile_Time_Compare): Change para

[Ada] Reimplement Ada.Numerics.Big_Numbers.Big_Reals.Float_Conversions

2020-11-27 Thread Pierre-Marie de Rodat
This reimplements the aforementioned generic package according to the requirements of the Ada 2020 RM, namely that To_Big_Real be exact and that From_Big_Real use the common floating-point conversion rules, which are round to nearest, ties to even, in GNAT as per IEEE 754. Tested on x86_64-pc-linu

[Ada] Optimize generation of checks for fixed-point types

2020-11-27 Thread Pierre-Marie de Rodat
This set of changes aimed at optimizing the generation of range and overflow checks for fixed-point types contains two parts: 1. a cleanup to the generation of range checks for type conversions involving fixed-point types, which is now more clearly deferred entirely to after the expans

[Ada] Restore general case for folding comparison of static strings

2020-11-27 Thread Pierre-Marie de Rodat
When reorganizing the mechanism which evaluates relational operators and potentially folds them, the "General case" in routine Eval_Relational_Op was put into an ELSE branch. This was subtly wrong, because it must be executed unless the special case in the THEN branch exits with a RETURN statement.

[Ada] Do not compile predefined units with -gnatp in gnatmake

2020-11-27 Thread Pierre-Marie de Rodat
This aligns the behavior of gnatmake with the way the runtime is now built. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * make.adb (GNAT_Flag): Change to "-gnatg". (Compile): Adjust comments accordingly.diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb --- a/gcc/ada

[Ada] Adjust head comment of various subprograms in Exp_Fixd

2020-11-27 Thread Pierre-Marie de Rodat
None of these programs analyzes the resulting node on return any more. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_fixd.adb (Build_Conversion): Adjust head comment. (Build_Divide): Likewise. (Build_Double_Divide): Likewise. (Build_Multiply): L

[Ada] Move down call to Narrow_Large_Operation in Expand_N_Op_Multiply

2020-11-27 Thread Pierre-Marie de Rodat
It can block the transformation of the multiplication by a power of 2 into a shift operation when the context is Universal_Integer and checks are disabled. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_N_Op_Multiply): Move down block calling Nar

[Ada] To_Big_Integer and 128bits integers

2020-11-27 Thread Pierre-Marie de Rodat
Add support for the recently added 128bits integer support in Big_Integers.To_Big_Integer. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-genbig.ads, libgnat/s-genbig.adb (To_Bignum): New variant taking an Unsigned_128. * libgnat/a-nbnbin.adb (To_B

[Ada] Optimize magnitude of integer operations for fixed point

2020-11-27 Thread Pierre-Marie de Rodat
In most cases, the common operations for fixed-point types are implemented by means of corresponding integer operations, in particular multiplication and division. Because scaling is required to go back and forth between the two representations, the expander needs to control the magnitude of opera

[Ada] Small tweaks to new implementation of Set_Image_Fixed

2020-11-27 Thread Pierre-Marie de Rodat
This removes a use of the absolute value that could potentially fail the overflow check and add assertions guarding a second use and the manipulation of string buffers, the latter for the sake of CodePeer. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-imagef.adb

[Ada] Emit error messages for null/generic nonreturning procedures

2020-11-27 Thread Pierre-Marie de Rodat
This commit adds checks for rule 6.5.1 4/3 of the Ada RM which declares nonreturning procedures and nonreturning generic procedure instances illegal. The reason this check is performed in sem_prag.adb rather than in Check_Returns in sem_ch6.adb is that generic procedure instances won't have their

  1   2   >