Re: [PATCH] c++, coroutines: Fix handling of bool await_suspend() [PR115905].

2024-09-14 Thread Iain Sandoe
Hi Jason, > On 10 Sep 2024, at 20:22, Jason Merrill wrote: > > On 9/7/24 6:45 AM, Iain Sandoe wrote: >> As noted in the PR the action of the existing implementation was to >> treat a false value from await_suspend () as equivalent to "do not >> suspend". Actually it needs to be the equivalent o

Re: [PATCH] vect: release defs of removed statement

2024-09-14 Thread Richard Biener
On Sat, Sep 14, 2024 at 9:24 AM Andrew Pinski wrote: > > While trying to add use of simple_dce_from_worklist > to the vectorizer so we don't need to run a full blown > DCE pass after the vectorizer, there was a crash noticed > due to a ssa name which has a stmt without a bb. This was > due to not

Re: [PATCH] Mark the copy/move constructor/operator= of auto_bitmap as delete

2024-09-14 Thread Richard Biener
On Sat, Sep 14, 2024 at 9:24 AM Andrew Pinski wrote: > > Since we are written in C++11, these should be marked as delete rather > than just private. OK > Bootstrapped and tested on x86_64-linux-gnu. > > gcc/ChangeLog: > > * bitmap.h (class auto_bitmap): Mark copy/move constructor/operato

Re: [PATCH] phi-opt: Improve heuristics for factoring out with constant (again) [PR116699]

2024-09-14 Thread Richard Biener
On Sat, Sep 14, 2024 at 1:02 AM Andrew Pinski wrote: > > The heuristics for factoring out with a constant checks that the assignment > statement > is the last statement of the basic block but sometimes there is a predicate > or a nop statement > after the assignment. Rejecting this case does not

New Chinese (simplified) PO file for 'gcc' (version 14.2.0)

2024-09-14 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 Chinese (simplified) team of translators. The file is available at: https://translationproject.org/latest/gcc/zh_CN.po (This file, 'gcc-14.2.

Re: RFC PATCH: contrib/test_summary mode for submitting testsuite results to bunsen

2024-09-14 Thread Eric Gallager
On Fri, Sep 13, 2024 at 4:19 PM Frank Ch. Eigler wrote: > > Hi - > > The gcc-testresults mailing list is a well-established place to plop > snippets of testsuite results. It's an okay way to archive and > distribute overall counts, but it's not machine readable, and it's way > incomplete (lacks .

libgomp: with USM, init 'link' variables with host address

2024-09-14 Thread Tobias Burnus
The idea of link variables is to replace he full device variable by a pointer, permitting to map only parts of the variable to the device, saving memory. However, having a pointer permits for (unified) shared memory to point to the host variable. That's what this patch does: instead of havin

[PUSHED] testsuite; Fix execute/pr52286.c for 16bit

2024-09-14 Thread Andrew Pinski
The code path which was added for 16bit had a broken inline-asm which would only assign maybe half of the registers for the `long` type to 0. Adding L to the input operand of the inline-asm fixes the issue by now assigning the full 32bit value of the input register that would match up with the out

[RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-14 Thread Yangyu Chen
I recently found that target_clones functions cannot inline even when the caller has exactly the same target. However, if we only use target attributes in C++ and let the compiler generate IFUNC for us, the functions with the same target will be inlined. For example, the following code compiled on

Re: [PATCH v5] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-14 Thread Jakub Jelinek
On Wed, Sep 11, 2024 at 09:13:40PM +, Qing Zhao wrote: > @@ -11741,6 +11770,55 @@ c_parser_postfix_expression (c_parser *parser) > set_c_expr_source_range (&expr, loc, close_paren_loc); > break; > } > + case RID_BUILTIN_COUNTED_BY_REF: > + { > + vec

Re: [Patch, Fortran] Implement Unsigned for SUM and PRODUCT

2024-09-14 Thread Thomas Koenig
As Jerry wrote (thanks!), this was missing the attached patch. Best regards Thomasdiff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 829ab00c665..e5ffe67 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -2788,7 +2788,7 @@ As of now, the

Re: [PATCH] Try fixing RISC-V .SELECT_VL with SLP

2024-09-14 Thread Richard Biener
> Am 14.09.2024 um 11:38 schrieb Robin Dapp : > >  >> >> The following simply removes a seemingly bogus guard. >> >>* tree-vect-loop.cc (vect_analyze_loop_1): Remove SLP guard >>from .SELECT_VL disabling. >> --- >> gcc/tree-vect-loop.cc | 2 +- >> 1 file changed, 1 insertion(+), 1 del

Re: *PING* [PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-09-14 Thread Steve Kargl
On Sat, Sep 14, 2024 at 11:02:42AM -0700, Steve Kargl wrote: > > While I understand the intent of 'positive form' vs 'negative form', the > above might be clearer as > >Usage of intrinsics can be implemented either by generating a call >to the libgfortran library function or by directly g

Re: [PATCH v2] Provide more contexts for -Warray-bounds warning messages

2024-09-14 Thread Joern Rennecke
> 1. Change the name of the option from: > > -fdiagnostic-try-to-explain-harder > To > -fdiagnostic-explain-harder I can think of a lot of connotations for this name, but alas, they are unfortunate, off-topic, or both. Some more neutral ideas: -fdiagnostics-verbose -fdiagnostic-details Or maybe

Re: *PING* [PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-09-14 Thread Steve Kargl
On Fri, Sep 13, 2024 at 12:27:07PM +0200, Mikael Morin wrote: > > > > gcc/fortran/ChangeLog: > > > > * invoke.texi(finline-intrinsics): Document new flag. > > * lang.opt (finline-intrinsics, finline-intrinsics=, > > fno-inline-intrinsics): New flags. > > * options.cc (gfc_post_opt

Re: [PATCH v2] c++: Don't crash when mangling member with anonymous union or template types [PR100632, PR109790]

2024-09-14 Thread Simon Martin
Hi Jason, On 14 Sep 2024, at 18:11, Jason Merrill wrote: > On 9/13/24 11:06 AM, Simon Martin wrote: >> Hi Jason, >> >> On 12 Sep 2024, at 16:48, Jason Merrill wrote: >> >>> On 9/12/24 7:23 AM, Simon Martin wrote: Hi, While looking at more open PRs, I have discovered that the proble

Re: [PATCH] tree-object-size: Fold PHI node offsets with constants [PR116556]

2024-09-14 Thread Siddhesh Poyarekar
On 2024-09-14 12:10, Andrew Pinski wrote: + /* Note that this is the *opposite* of what we usually do with sizes, +because the maximum offset estimate here will give us a minimum size +estimate and vice versa. */ + enum tree_code code = (object_size_type & OST_MINIMUM +

Re: [PATCH v2] c++: Don't crash when mangling member with anonymous union or template types [PR100632, PR109790]

2024-09-14 Thread Jason Merrill
On 9/13/24 11:06 AM, Simon Martin wrote: Hi Jason, On 12 Sep 2024, at 16:48, Jason Merrill wrote: On 9/12/24 7:23 AM, Simon Martin wrote: Hi, While looking at more open PRs, I have discovered that the problem reported in PR109790 is very similar to that in PR100632, so I’m combining both in

Re: [PATCH] tree-object-size: Fold PHI node offsets with constants [PR116556]

2024-09-14 Thread Andrew Pinski
On Sat, Sep 14, 2024 at 5:31 AM Siddhesh Poyarekar wrote: > > In PTR + OFFSET cases, try harder to see if the target offset could > result in a constant. Specifically, if the offset is a PHI node with > all constant branches, return the minimum (or maximum for OST_MINIMUM) > of the possible value

Re: [PATCH] libstdc++: Enable most of for freestanding

2024-09-14 Thread Jonathan Wakely
On Sat, 14 Sept 2024 at 10:39, Arsen Arsenović wrote: > > Jonathan Wakely writes: > > > This restores support for most of with -ffreestanding. In case > > there are users who want a minimal freestanding implementation that only > > provides what the standard guarantees, there's a new macro that

[pushed] c++: avoid init_priority warning in system header

2024-09-14 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We don't want a warning about a reserved init_priority in a system header even with -Wsystem-headers. gcc/cp/ChangeLog: * tree.cc (handle_init_priority_attribute): Check in_system_header_at. --- gcc/cp/tree.cc | 3 ++- 1 f

[PATCH] tree-object-size: Fold PHI node offsets with constants [PR116556]

2024-09-14 Thread Siddhesh Poyarekar
In PTR + OFFSET cases, try harder to see if the target offset could result in a constant. Specifically, if the offset is a PHI node with all constant branches, return the minimum (or maximum for OST_MINIMUM) of the possible values. gcc/ChangeLog: PR tree-optimization/116556 * tre

[pushed] testsuite: adjust pragma-diag-17.c diagnostics

2024-09-14 Thread Jason Merrill
Tested x86_64-pc-linux-gnu and armv8l-unknown-linuxgnueabihf, applying to trunk. -- 8< -- The Linaro CI runs of this testcase pointed out that I need to check for DFP support, as well. gcc/testsuite/ChangeLog: * c-c++-common/pragma-diag-17.c: Handle !dfp targets. --- gcc/testsuite/c-c+

[Patch, Fortran] Implement Unsigned for SUM and PRODUCT

2024-09-14 Thread Thomas Koenig
Hello world, this implements SUM and PRODUCT for UNSIGNED. This is actually missing from 24-116.txt, but that is due to an oversight. This patch is on top of https://gcc.gnu.org/pipermail/fortran/2024-September/060975.html and uses the same method suggested by Richard: Use unsigned for the dat

Re: [PATCH] x86-64: Don't use temp for argument in a TImode register

2024-09-14 Thread H.J. Lu
On Sun, Sep 8, 2024 at 12:10 AM Uros Bizjak wrote: > > On Fri, Sep 6, 2024 at 2:24 PM H.J. Lu wrote: > > > > Don't use temp for a PARALLEL BLKmode argument of an EXPR_LIST expression > > in a TImode register. Otherwise, the TImode variable will be put in > > the GPR save area which guarantees on

[patch,avr] Tidy up enum and struct tags and rtx_code.

2024-09-14 Thread Georg-Johann Lay
This patch tidies up enum and struct tags that are not required in C++. It also uses rtx_code for RTX codes instead of RTX_CODE. RTX_CODE is now only used in #ifdef's in avr-protos.h. Ok for trunk? Johann -- AVR: Tidy up enum and struct tags. Use "rtx_code" for RTX codes, not "enum rtx_code

Re: [patch,avr] copysign: Use copysign rtx code, allow const_double

2024-09-14 Thread Denis Chertykov
сб, 14 сент. 2024 г. в 13:00, Georg-Johann Lay : > > This uses new rtx code copysign instead of an unspec. > It also allows const_double as 2nd operand because gcc > does not optimize code like > > __builtin_copysignf (x, -1.0f); > > Ok for trunk? Ok. Please apply. Denis. > > Johann > > -- > >

Re: [PATCH] libstdc++: Enable most of for freestanding

2024-09-14 Thread Arsen Arsenović
Jonathan Wakely writes: > This restores support for most of with -ffreestanding. In case > there are users who want a minimal freestanding implementation that only > provides what the standard guarantees, there's a new macro that disables > again. This can be used to write more portable freesta

Re: [PATCH] Try fixing RISC-V .SELECT_VL with SLP

2024-09-14 Thread Robin Dapp
> The following simply removes a seemingly bogus guard. > > * tree-vect-loop.cc (vect_analyze_loop_1): Remove SLP guard > from .SELECT_VL disabling. > --- > gcc/tree-vect-loop.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-v

[patch,avr] copysign: Use copysign rtx code, allow const_double

2024-09-14 Thread Georg-Johann Lay
This uses new rtx code copysign instead of an unspec. It also allows const_double as 2nd operand because gcc does not optimize code like __builtin_copysignf (x, -1.0f); Ok for trunk? Johann -- AVR: Use rtx code copysign. gcc/ * config/avr/avr.md (UNSPEC_COPYSIGN): Remove

Re: [PATCH] testsuite: a few more hostedlib adjustments

2024-09-14 Thread Alexandre Oliva
On Sep 13, 2024, Mike Stump wrote: > Yeah, the hard issues are resolved, so follow on patches like this are > now obvious. They follow the usual and standard practices now. Thanks. > So, we should expect them to punt to a hosted person to find, discover > and fix the fallout. Kinda like canadia

Re: [PATCH] c++: Don't mix timevar_start and auto_cond_timevar for TV_NAME_LOOKUP [PR116681]

2024-09-14 Thread Jason Merrill
On 9/13/24 1:31 PM, Simon Martin wrote: We currently ICE upon the following testcase when using -ftime-report === cut here === template < int> using __conditional_t = int; template < typename _Iter > concept random_access_iterator = requires { new _Iter; }; template < typename _Iterator > struct

[PATCH] vect: release defs of removed statement

2024-09-14 Thread Andrew Pinski
While trying to add use of simple_dce_from_worklist to the vectorizer so we don't need to run a full blown DCE pass after the vectorizer, there was a crash noticed due to a ssa name which has a stmt without a bb. This was due to not calling release_defs after the call to gsi_remove. Note the code

[PATCH] Mark the copy/move constructor/operator= of auto_bitmap as delete

2024-09-14 Thread Andrew Pinski
Since we are written in C++11, these should be marked as delete rather than just private. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * bitmap.h (class auto_bitmap): Mark copy/move constructor/operator= as deleted. Signed-off-by: Andrew Pinski --- gcc/bitmap.h

[PATCH] MIPS: Add MSUBF.fmt instruction for MIPSr6

2024-09-14 Thread Jie Mei
GCC currently uses two instructions (NEG.fmt and MADDF.fmt) for operations like `x - (y * z)' for MIPSr6. We can further tune this by using only MSUBF.fmt instead of those two. This patch adds MSUBF.fmt instrutions with corresponding tests. gcc/ChangeLog: * config/mips/mips.md (fms4): Ge