[PATCH] c/99275 - fix missing space in diagnostic

2021-02-25 Thread Richard Biener
This fixes a missing space as reported by translators. Pused as obvious. 2021-02-26 Richard Biener PR c/99275 * builtins.c (warn_string_no_nul): Fix diagnostic formatting. --- gcc/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/builtins.c b/

[PATCH] Honor --disable-decimal-float in building _Float128 support.

2021-02-25 Thread Michael Meissner via Gcc-patches
Honor --disable-decimal-float in building _Float128 support. Joseph Myers reported that my previous patch to add conversions between _Float128 and the Decimal types was still being built even if GCC was configured with the --disable-decimal-float option. This patch fixes that by only building the

[pushed] c++: Fix class NTTP constness handling [PR98810]

2021-02-25 Thread Jason Merrill via Gcc-patches
Here, when substituting still-dependent args into an alias template, we see a non-const type because the default argument is non-const, and is not a template parm object because it's still dependent. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/98810 *

Re: PING [PATCH] avoid -Warray-bounds checks for vtable assignments (PR 98266)

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 6:47 PM, Jeff Law wrote: On 2/23/21 2:52 PM, Jason Merrill wrote: I don't see how the issue here depends on the artificiality of the vptr; That's what I was trying to get at -- is DECL_ARTIFICIAL really a good way to detect these kinds of cases.  It sounds like it likely isn't, bu

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 5:41 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: On 2/12/21 6:12 PM, Marek Polacek wrote: We represent deduction guides with FUNCTION_DECLs, but they are built without DECL_CONTEXT Hmm, that seems wrong: "A deduction-guide shall be declar

Re: rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-25 Thread Peter Bergner via Gcc-patches
On 2/25/21 7:08 PM, David Edelsohn wrote: > On Thu, Feb 25, 2021 at 8:05 PM Peter Bergner wrote: >> >> The initialization of compat builtins assumes the builtin we are creating >> a compatible builtin for exists and ICEs if it doesn't. However, there are >> valid reasons why some builtins are dis

Re: [PATCH v4 1/2] MIPS: unaligned load: use SImode for SUBREG if OK (PR98996)

2021-02-25 Thread YunQiang Su via Gcc-patches
Jeff Law via Gcc-patches 于2021年2月26日周五 上午10:57写道: > > > > On 2/23/21 3:05 AM, YunQiang Su wrote: > > It is found by ada s-pack96.adb ftbfs, due to 96bit load: 96 = 64 + 32. > > While the 32bit pair of l r is mark as SUBREG, so they are > > not in SImode, make it fail to find suitable insn. > > > >

Re: [PATCH v4 1/2] MIPS: unaligned load: use SImode for SUBREG if OK (PR98996)

2021-02-25 Thread Jeff Law via Gcc-patches
On 2/23/21 3:05 AM, YunQiang Su wrote: > It is found by ada s-pack96.adb ftbfs, due to 96bit load: 96 = 64 + 32. > While the 32bit pair of l r is mark as SUBREG, so they are > not in SImode, make it fail to find suitable insn. > > gcc/ChangeLog: > > PR target/98996 > * config/mips/mi

[pushed] builtins: Fix typos in warn_for_access [PR99278]

2021-02-25 Thread Marek Polacek via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. gcc/ChangeLog: * builtins.c (warn_for_access): Fix typos. --- gcc/builtins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/builtins.c b/gcc/builtins.c index 42150cee0bd..d804b0e6617 100644 --- a/gcc/builtins.c

Re: rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-25 Thread Segher Boessenkool
On Thu, Feb 25, 2021 at 07:05:26PM -0600, Peter Bergner wrote: > The initialization of compat builtins assumes the builtin we are creating > a compatible builtin for exists and ICEs if it doesn't. However, there are > valid reasons why some builtins are disabled for a particular compile. > In this

Re: rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-25 Thread David Edelsohn via Gcc-patches
On Thu, Feb 25, 2021 at 8:05 PM Peter Bergner wrote: > > The initialization of compat builtins assumes the builtin we are creating > a compatible builtin for exists and ICEs if it doesn't. However, there are > valid reasons why some builtins are disabled for a particular compile. > In this case,

rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]

2021-02-25 Thread Peter Bergner via Gcc-patches
The initialization of compat builtins assumes the builtin we are creating a compatible builtin for exists and ICEs if it doesn't. However, there are valid reasons why some builtins are disabled for a particular compile. In this case, the MMA builtins are disabled for -mcpu=440 (and other cpus), so

[committed] analyzer: eliminate dedupe_candidate [PR96374]

2021-02-25 Thread David Malcolm via Gcc-patches
In gcc/analyzer/diagnostic-manager.cc the code partitions saved_diagnostic instances by dedupe_key, and tries to find the "best" saved_diagnostic for each dedupe_key. Ideally we would find the shortest feasible path for each saved_diagnostic and pick the winner in each deduplication set. Currentl

libgo patch committed: Ensure 8 byte atomicity on ppc64

2021-02-25 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Lynn Boger ensures 8 byte atomicity in memmove and memset on ppc64. Go requires that pointer moves are done 8 bytes at a time, so that the concurrent garbage collector always sees an entire pointer value. gccgo uses libc's memmove and memset which does not require that, and the

New German PO file for 'gcc' (version 11.1-b20210207)

2021-02-25 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file, 'gcc-11.1-b20210207.de.po',

Re: [RFC][patch for gcc12][version 1] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-02-25 Thread Qing Zhao via Gcc-patches
Hi, Kees, Just noticed that you didn’t add -fauto-var-init-approach=D to the command line. [qinzhao@localhost uninit]$ cat t8.c a() { char b[1]; } [qinzhao@localhost uninit]$ sh t /home/qinzhao/Install/latest/bin/gcc -ftrivial-auto-var-init=pattern -fauto-var-init-approach=D t8.c -S t8.c:1:1: war

Re: [RFC] ldist: Recognize rawmemchr loop patterns

2021-02-25 Thread Jeff Law via Gcc-patches
On 2/25/21 10:01 AM, Stefan Schulze Frielinghaus via Gcc-patches wrote: > Ping Given this is not a regression it needs to wait for gcc-12. jeff

Re: PING [PATCH] avoid -Warray-bounds checks for vtable assignments (PR 98266)

2021-02-25 Thread Jeff Law via Gcc-patches
On 2/23/21 2:52 PM, Jason Merrill wrote: > > I don't see how the issue here depends on the artificiality of the vptr; That's what I was trying to get at -- is DECL_ARTIFICIAL really a good way to detect these kinds of cases.  It sounds like it likely isn't, but it may also be the best we can do.

Re: [PATCH] avoid -Warray-bounds checks for vtable assignments (PR 98266)

2021-02-25 Thread Jeff Law via Gcc-patches
On 2/8/21 3:44 PM, Martin Sebor wrote: > > I think the underlying problem is the same.  We're getting a size > that doesn't correspond to what's actually being accessed, and it > happens because of the virtual inheritance.  In pr97595 Jason > suggested to use the decl/type size inequality to ide

Re: [PATCH] avoid -Warray-bounds checks for vtable assignments (PR 98266)

2021-02-25 Thread Jeff Law via Gcc-patches
On 2/8/21 2:56 PM, Martin Sebor wrote: > On 2/8/21 12:59 PM, Jeff Law wrote: >> >> >> On 1/19/21 5:56 PM, Martin Sebor via Gcc-patches wrote: >>> Similar to the problem reported for -Wstringop-overflow in pr98266 >>> and already fixed, -Warray-bounds is also susceptible to false >>> positives in

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Marek Polacek via Gcc-patches
On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: > On 2/12/21 6:12 PM, Marek Polacek wrote: > > We represent deduction guides with FUNCTION_DECLs, but they are built > > without DECL_CONTEXT > > Hmm, that seems wrong: "A deduction-guide shall be declared in the > same scope as the co

Re: [PATCH] c++: abbreviated function template return type rewriting [PR98990]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 5:09 PM, Patrick Palka wrote: On Tue, 9 Feb 2021, Patrick Palka wrote: When an abbreviated function template has a complex placeholder return type such auto& or auto**, the level adjustment performed by splice_late_return_type directly replaces the 'auto' inside the original return t

Re: [PATCH] c++: abbreviated function template return type rewriting [PR98990]

2021-02-25 Thread Patrick Palka via Gcc-patches
On Tue, 9 Feb 2021, Patrick Palka wrote: > When an abbreviated function template has a complex placeholder return > type such auto& or auto**, the level adjustment performed by > splice_late_return_type directly replaces the 'auto' inside the original > return type with the level-adjusted 'auto',

Re: [PATCH v2] c++: const_cast of null pointer in constant expr [PR99176]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 4:20 PM, Marek Polacek wrote: On Wed, Feb 24, 2021 at 10:32:59PM -0500, Jason Merrill wrote: On 2/24/21 5:34 PM, Marek Polacek wrote: Here we reject constexpr const int *p = nullptr; constexpr int *q = const_cast(p); with "conversion of 'const int*' null pointer to 'int*' i

Re: [PATCH] c++: Implement P1102R2 - Down with ()!

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 1:44 PM, Jakub Jelinek wrote: Hi! The following patch implements P1102R2. For attributes, we have already attribute parsing before the parameter declarations and so when that is omitted, if the attributes are first we already accept it. Bootstrapped/regtested on x86_64-linux and i686

Re: [PATCH v2] c++: const_cast of null pointer in constant expr [PR99176]

2021-02-25 Thread Marek Polacek via Gcc-patches
On Wed, Feb 24, 2021 at 10:32:59PM -0500, Jason Merrill wrote: > On 2/24/21 5:34 PM, Marek Polacek wrote: > > Here we reject > > > >constexpr const int *p = nullptr; > >constexpr int *q = const_cast(p); > > > > with "conversion of 'const int*' null pointer to 'int*' is not a > > constant

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-25 Thread Segher Boessenkool
On Thu, Feb 25, 2021 at 02:23:01AM +, Joseph Myers wrote: > On Wed, 24 Feb 2021, Segher Boessenkool wrote: > > > The other option, which we need for correctness *anyway*, is to have > > libgcc do the conversion without using any specific libc. > > Which ends up being quite complicated (see e.

Re: [PATCH] c++: Fix operator() lookup in lambdas [PR95451]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 1:48 PM, Jakub Jelinek wrote: Hi! During name lookup, name-lookup.c uses: if (!(!iter->type && HIDDEN_TYPE_BINDING_P (iter)) && (bool (want & LOOK_want::HIDDEN_LAMBDA) || !is_lambda_ignored_entity (iter->value)) && qu

Re: [RFC][patch for gcc12][version 1] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-02-25 Thread Kees Cook via Gcc-patches
On Thu, Feb 25, 2021 at 12:15:01PM -0600, Qing Zhao wrote: > > On Feb 24, 2021, at 10:41 PM, Kees Cook wrote: > > [...] > > test_stackinit: trailing_hole_none ok > > test_stackinit: packed_none ok > > test_stackinit: user ok > > test_stackinit: failures: 8 > > Does the above testing include “patt

Re: [PATCH] c++: Fix call to push_tinst_level during satisfaction [PR99214]

2021-02-25 Thread Patrick Palka via Gcc-patches
On Thu, 25 Feb 2021, Jason Merrill wrote: > On 2/25/21 1:37 AM, Patrick Palka wrote: > > In-Reply-To: <20210225063712.3725111-1-ppa...@redhat.com> > > BTW, This patch doesn't seem in any way a reply to your previous patch, so > it's confusing for the mail headers (and thus MUA threading) to say t

[PATCH] c++: Fix operator() lookup in lambdas [PR95451]

2021-02-25 Thread Jakub Jelinek via Gcc-patches
Hi! During name lookup, name-lookup.c uses: if (!(!iter->type && HIDDEN_TYPE_BINDING_P (iter)) && (bool (want & LOOK_want::HIDDEN_LAMBDA) || !is_lambda_ignored_entity (iter->value)) && qualify_lookup (iter->value, want))

[PATCH] c++: Implement P1102R2 - Down with ()!

2021-02-25 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements P1102R2. For attributes, we have already attribute parsing before the parameter declarations and so when that is omitted, if the attributes are first we already accept it. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Or defer for GCC 12?

Re: [RFC][patch for gcc12][version 1] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-02-25 Thread Qing Zhao via Gcc-patches
Hi, Kees, Thanks a lot for your testings on linux kernel. I am happy to know that the initial implementation works fine. I will study the padding case and the switch case to fix the issues there. > On Feb 24, 2021, at 10:41 PM, Kees Cook wrote: > > (please keep me in CC, I'm not subscribed...

Re: [PATCH, V2] Add conversions between _Float128 and Decimal.

2021-02-25 Thread Michael Meissner via Gcc-patches
On Wed, Feb 24, 2021 at 11:12:54PM +, Joseph Myers wrote: > This change appears to have broken builds for powerpc in a configuration > that bootstraps a cross toolchain starting with a GCC build with no libc > available. > > Specifically, such a bootstrap build uses --disable-decimal-float a

[PATCH] arm: force use of r4 for __gnu_cmse_nonsecure_call when !FPCXT [PR99271]

2021-02-25 Thread Richard Earnshaw (lists) via Gcc-patches
Commit r10-6017 relaxed the constraint on thumb2 calls to __gnu_cmse_nonsecure_call to allow any register for the call address. Although the initial code expansion continues to use r4 with the FPCXT extension is not enabled, the change was unsafe because subsequent optimizations could use the addi

Re: [RFC] ldist: Recognize rawmemchr loop patterns

2021-02-25 Thread Stefan Schulze Frielinghaus via Gcc-patches
Ping On Sun, Feb 14, 2021 at 11:27:40AM +0100, Stefan Schulze Frielinghaus wrote: > On Tue, Feb 09, 2021 at 09:57:58AM +0100, Richard Biener wrote: > > On Mon, Feb 8, 2021 at 3:11 PM Stefan Schulze Frielinghaus via > > Gcc-patches wrote: > > > > > > This patch adds support for recognizing loops w

Re: [PATCH 1/4] libstdc++: More efficient date from days.

2021-02-25 Thread Jonathan Wakely via Gcc-patches
On 25/02/21 14:19 +, Jonathan Wakely wrote: On 25/02/21 14:02 +, Jonathan Wakely wrote: On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote: Hi Jonathan, The issue is that I didn't cast __dp.count() to uint32_t: - const auto __r0 = __dp.count() + __r2_e3; + const auto _

c++: Rename new -flang-note-module-read option [PR 99166]

2021-02-25 Thread Nathan Sidwell
I realized that the just-added flang-note-module-read option should also cover module writes, and was therefore misnamed. This addresses that, replacing it with a -flang-note-module-cmi pair of options. As this was such a recent addition, I didn't leave the old option available. PR

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 25, 2021 at 04:21:31PM +, Kwok Cheung Yeung wrote: > Reversing the order reduces the hole to 3 bytes: > > size_t num_dependees;/*80 8 */ > union { > gomp_sem_t * completion_sem; /*88 8 */ >

Committed, pr95690.f90: move error line for CRIS.

2021-02-25 Thread Hans-Peter Nilsson via Gcc-patches
I don't know what it is that ix86, x86_64, Solaris and apparently CRIS has in common here. According to https://gcc.gnu.org/pipermail/gcc-testresults/2021-February/652763.html m68k-unknown-linux-gnu is also in that bunch, but since there's a *-*-solaris* in the target specifier and also m68k vs. m

c++tools: Make NETWORKING define check consistent [PR 98318]

2021-02-25 Thread Nathan Sidwell
PR98318 also pointed out that the NETWORKING #define was being checked with both #if and #ifdef. Let's consistently use one form. c++tools/ * server.cc: Use #if NETWORKING not #ifdef, to be consistent with elsewhere. -- Nathan Sidwell diff --git c/c++tools/server.cc w

Re: [PATCH,rs6000] [v2] Optimize pcrel access of globals

2021-02-25 Thread Segher Boessenkool
Hi! On Thu, Feb 25, 2021 at 09:45:29AM +0100, Richard Biener wrote: > On Wed, Feb 24, 2021 at 6:39 PM Segher Boessenkool > wrote: > > On Tue, Feb 23, 2021 at 09:48:28AM +0100, Richard Biener wrote: > > > stage1 please? > > > > Versions of this patch were first submitted in August. Of 2019. > > >

[committed] [PR99233] testsuite: Run test pr96264.c only for little endian target

2021-02-25 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99233 commit 557a0d3b1b389c46d5a8aa24e27abed4c401d17e Author: Vladimir N. Makarov Date: Thu Feb 25 11:20:32 2021 -0500 [PR99233] tesstsuite: Run test pr96264.c only for little endian The test in question is

[PATCH][committed]middle-end slp: Don't traverse tree on (nil) nodes.

2021-02-25 Thread Tamar Christina via Gcc-patches
Hi All, The given testcase shows that one of the children of the complex MUL contains a PHI node. This results in the vectorizer having a child that's (nil). The pattern matcher handles this correctly, but optimize_load_redistribution_1 needs to not traverse/inspect the NULL nodes. This however

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Kwok Cheung Yeung
On 24/02/2021 7:46 pm, Jakub Jelinek wrote: @@ -545,8 +548,15 @@ struct gomp_task entries and the gomp_task in which they reside. */ struct priority_node pnode[3]; - bool detach; - gomp_sem_t completion_sem; + union { +/* Valid only if deferred_p is false. */ +gomp_sem

Re: [PATCH] coroutines : Remove throwing_cleanup marks from the ramp [PR95822].

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/24/21 3:06 PM, Iain Sandoe wrote: Hi, The FE contains a mechanism for cleaning up return expressions if a function throws during the execution of cleanups prior to the return. If the original function has a return value with a non-trivial DTOR and the body contains a var with a DTOR that m

Re: [PATCH] clear more front end VLA bounds from IL (PR 97172)

2021-02-25 Thread Martin Sebor via Gcc-patches
On 2/25/21 9:06 AM, Christophe Lyon wrote: Hi, On Wed, 24 Feb 2021 at 09:57, Richard Biener via Gcc-patches wrote: On Tue, Feb 23, 2021 at 8:53 PM Martin Sebor via Gcc-patches wrote: Adding attribute access to declarations of functions that take VLA arguments relies on the front end addi

Re: [PATCH] clear more front end VLA bounds from IL (PR 97172)

2021-02-25 Thread Christophe Lyon via Gcc-patches
Hi, On Wed, 24 Feb 2021 at 09:57, Richard Biener via Gcc-patches wrote: > > On Tue, Feb 23, 2021 at 8:53 PM Martin Sebor via Gcc-patches > wrote: > > > > Adding attribute access to declarations of functions that take > > VLA arguments relies on the front end adding attribute "arg spec" > > to

Re: [PATCH] c++: Fix CTAD from single-element initializer list [PR99103]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/15/21 2:30 PM, Patrick Palka wrote: When determining whether to rule out initializer-list constructors during CTAD with a single-element initializer list, the element type's cv-qualifiers should be irrelevant. This patch fixes this by making is_spec_or_derived strip cv-qualifiers from the s

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/12/21 6:12 PM, Marek Polacek wrote: We represent deduction guides with FUNCTION_DECLs, but they are built without DECL_CONTEXT Hmm, that seems wrong: "A deduction-guide shall be declared in the same scope as the corresponding class template and, for a member class template, with the same

[committed] libstdc++: Do not assume std::FILE is complete [PR 99270]

2021-02-25 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/99270 * testsuite/27_io/headers/cstdio/types_std.cc: Use pointer to FILE instead of FILE. Tested x86_64-linux. Committed to trunk. commit 31002af9040876dfb6444fabd524b11ca0739519 Author: Jonathan Wakely Date: Thu Feb 25 15:31:19 202

[committed] libstdc++: Document library versioning for GCC 11

2021-02-25 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * doc/xml/manual/abi.xml: Document versioning for GCC 11. * doc/html/manual/abi.html: Regenerate. Committed to trunk. commit ed255fd5eda5e2530779bb69b8805c916ddfe0c2 Author: Jonathan Wakely Date: Thu Feb 25 14:09:40 2021 libstdc++: Document library

[OG10] backport an additional commit – was: [PATCH 0/7] [og10] openacc: Arrays/derived types/character type backports

2021-02-25 Thread Tobias Burnus
On 24.02.21 22:57, Julian Brown wrote: This series contains several backports from mainline to the og10 branch I have now also backported mainline commit https://gcc.gnu.org/g:65167982efa4dbb96698d026e6d7e17acb513f0a Fortran: add contiguous check for ptr assignment, fix non-contig check (PR972

Re: [PATCH] c++: Fix call to push_tinst_level during satisfaction [PR99214]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 1:37 AM, Patrick Palka wrote: In-Reply-To: <20210225063712.3725111-1-ppa...@redhat.com> BTW, This patch doesn't seem in any way a reply to your previous patch, so it's confusing for the mail headers (and thus MUA threading) to say that it is. Maybe you want git send-email --no-thr

Re: [PATCH] c++: Fix pretty printing of context of local class [PR99213]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 1:37 AM, Patrick Palka wrote: My r10-7705 patch for PR94521 made us set TFF_NO_FUNCTION_ARGUMENTS when pretty printing the function scope of a local class type in order to eliminate infinite recursion with a function signature that contains decltype([]{}). But due to the way dump_func

Re: [PATCH 1/4] libstdc++: More efficient date from days.

2021-02-25 Thread Jonathan Wakely via Gcc-patches
On 25/02/21 14:02 +, Jonathan Wakely wrote: On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote: Hi Jonathan, The issue is that I didn't cast __dp.count() to uint32_t: - const auto __r0 = __dp.count() + __r2_e3; + const auto __r0 = static_cast(__dp.count()) + __r2_e3; The a

Re: [PATCH 1/4] libstdc++: More efficient date from days.

2021-02-25 Thread Jonathan Wakely via Gcc-patches
On 25/02/21 13:46 +, Cassio Neri via Libstdc++ wrote: Hi Jonathan, The issue is that I didn't cast __dp.count() to uint32_t: - const auto __r0 = __dp.count() + __r2_e3; + const auto __r0 = static_cast(__dp.count()) + __r2_e3; The above would be a better fix. Indeed, __r0 belongs

Re: [PATCH 1/4] libstdc++: More efficient date from days.

2021-02-25 Thread Cassio Neri via Gcc-patches
Hi Jonathan, The issue is that I didn't cast __dp.count() to uint32_t: - const auto __r0 = __dp.count() + __r2_e3; + const auto __r0 = static_cast(__dp.count()) + __r2_e3; The above would be a better fix. Indeed, __r0 belongs to [0, 2^32[ which allows all arithmetics that follow to be

Re: [PATCH] coroutines : Call promise CTOR with parm copies [PR97587].

2021-02-25 Thread Nathan Sidwell
On 2/24/21 3:09 PM, Iain Sandoe wrote: Hi, As the PR notes, we were calling the promise CTOR with the original function parameters, not the copy (as pointed, a previous wording of the section on this was unambiguous). Fixed thus. tested on x86_64-darwin, x86_64-linux-gnu, this is a wrong-code

c++: Fix typo in module-mapper [PR 98318]

2021-02-25 Thread Nathan Sidwell
User reported this typo: '0' and '-' are right next to each other, and as it happened I always had networking, so it went unnoticed. PR c++/98318 gcc/cp/ * mapper-client.cc (module_client::open_module_client): Fix typo of fd init. -- Nathan Sidwell diff --git c

[PATCH] First do add_noreturn_fake_exit_edges in connect_infinite_loops_to_exit

2021-02-25 Thread Richard Biener
Most callers of connect_infinite_loops_to_exit already do this but the few that do not end up with extra exit edges. The following makes that consistent, also matching the post-dominance DFS walk code. Boostrapped and tested on x86_64-unknown-linux-gnu, queued for stage1. 2021-02-25 Richard Bie

[wwwdocs] Document new libstdc++ features

2021-02-25 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. commit 86937d6dfe04c81c805cfc321c62a520dfd2a59f Author: Jonathan Wakely Date: Thu Feb 25 12:54:45 2021 + Document new libstdc++ features diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index de75b8d6..6a47b0b8 100644 --- a/htdocs/gcc-11/changes

Re: [PATCH 1/4] libstdc++: More efficient date from days.

2021-02-25 Thread Jonathan Wakely via Gcc-patches
On 24/02/21 17:28 +, Jonathan Wakely wrote: On 23/02/21 13:24 +, Cassio Neri via Libstdc++ wrote: This patch reimplements std::chrono::year_month_day::_S_from_days() which retrieves a date from the number of elapsed days since 1970/01/01. The new implementation is based on Proposition 6

[committed] libstdc++: Add std::to_underlying for C++23

2021-02-25 Thread Jonathan Wakely via Gcc-patches
Implement P1682R2 as just approved for C++23. libstdc++-v3/ChangeLog: * include/std/utility (to_underlying): Define. * include/std/version (__cpp_lib_to_underlying): Define. * testsuite/20_util/to_underlying/1.cc: New test. * testsuite/20_util/to_underlying/version

Fortran: Create CLASS(*) early to avoid ICE [PR99254]

2021-02-25 Thread Tobias Burnus
The issue is that for CLASS – and in particular CLASS(*) the ts.u.derived->components is not yet created when it is accessed. – PR99138 shows a similar case (unfixed! See comment 5 and initial report for two examples). There is an issue for code like: class(*) var dimension :: var(..) that th

[PATCH] tree-optimization/99253 - fix reduction path check

2021-02-25 Thread Richard Biener
This fixes an ordering problem with verifying that no intermediate computations in a reduction path are used outside of the chain. The check was disabled for value-preserving conversions at the tail but whether a stmt was a conversion or not was only computed after the first use. The following fi

Re: [PATCH] match.pd: Use single_use for (T)(A) + CST -> (T)(A + CST) [PR95798]

2021-02-25 Thread Richard Biener
On Thu, 25 Feb 2021, Jakub Jelinek wrote: > On Wed, Feb 24, 2021 at 08:56:55PM +0100, Jakub Jelinek via Gcc-patches wrote: > > On Wed, Feb 24, 2021 at 08:52:44PM +0100, Marc Glisse wrote: > > > On Wed, 24 Feb 2021, Jakub Jelinek via Gcc-patches wrote: > > > > > > > The following patch adds single

Re: [PATCH] vrp: Handle VCE in vrp_simplify_cond_using_ranges [PR80635]

2021-02-25 Thread Richard Biener
On Wed, 24 Feb 2021, Jakub Jelinek wrote: > On Wed, Feb 24, 2021 at 01:32:02PM +0100, Richard Biener wrote: > > Small comment about the patch below, which otherwise is OK: > > > > I think that !INTEGRAL_TYPE_P (TREE_TYPE (innerop)) is a sufficient > > condition here. > > Unfortunately as shown d

Re: [PATCH,rs6000] [v2] Optimize pcrel access of globals

2021-02-25 Thread Richard Biener via Gcc-patches
On Wed, Feb 24, 2021 at 6:39 PM Segher Boessenkool wrote: > > Hi! > > On Tue, Feb 23, 2021 at 09:48:28AM +0100, Richard Biener wrote: > > On Tue, Feb 23, 2021 at 4:48 AM acsawdey--- via Gcc-patches > > wrote: > > > > > > From: Aaron Sawdey > > > > > > This patch implements a RTL pass that looks

[PATCH] Make the PR99220 fix more robust

2021-02-25 Thread Richard Biener
This avoids interleaving pattern recognition and load redistribution optimization since the load_map used in the latter is fragile with respect to release and reuse of SLP nodes, something which can also occur within the pattern recognition machinery. Bootstrapped and tested on x86_64-unknown-linu

Re: [PATCH] match.pd, expand: Fold VCE from integer with [0, 1] range to bool into NOP_EXPR [PR80635]

2021-02-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 24, 2021 at 05:54:08PM -0700, Martin Sebor via Gcc-patches wrote: > > > Why does uninit warn with VCE but not with NOP_EXPR? Or does the > > > warning disappear because of those other optimizations you mention? > > Can you comment on Jeff's POC patch in the PR? Would it make sense >

Re: [PATCH] match.pd: Use single_use for (T)(A) + CST -> (T)(A + CST) [PR95798]

2021-02-25 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 24, 2021 at 08:56:55PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Wed, Feb 24, 2021 at 08:52:44PM +0100, Marc Glisse wrote: > > On Wed, 24 Feb 2021, Jakub Jelinek via Gcc-patches wrote: > > > > > The following patch adds single_use case which restores these testcases > > > but ke