[pushed] c++: generic lambda fn parm pack [PR104624]

2022-04-25 Thread Jason Merrill via Gcc-patches
Parameter packs from the enclosing context can be used unexpanded in a lambda that is itself part of a pack expansion, but not packs that are part of the lambda itself. We already check for capture packs; we also need to check for function parameter packs of the lambda call operator. Tested

[committed] analyzer: fix ICEs on complex constants [PR105365, 105366]

2022-04-25 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-8254-g6ad3ca0077ec0d5f740cef5fdb743ffb61575941. gcc/analyzer/ChangeLog: PR analyzer/105365 PR analyzer/105366 * svalue.cc (cmp_cst): Rename to... (cmp_csts_same_type):

testsuite -fno-file [was: Re: [PATCH] PR52665 do not let .ident confuse assembler scan tests]

2022-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 2 Feb 2018 14:25:22 +0100 Bernhard Reutner-Fischer wrote: > On 19 June 2016 at 22:21, Mike Stump wrote: > > On Jun 18, 2016, at 12:31 PM, Bernhard Reutner-Fischer > > wrote: > >> > >> A branch with a name matching scan-assembler pattern triggers > >> inappropriate FAIL. > > > >>

testsuite -Wcomment [was: Re: [RFC/CFT] auto-wipe dump files [was: Re: [committed] Fix up bb-slp-31.c testcase]]

2022-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 30 Oct 2013 10:41:33 +0100 Bernhard Reutner-Fischer wrote: > > Hi! > > > > I've noticed that this testcase doesn't clean up after itself. > > Fixed thusly, committed as obvious to trunk. > > This was nagging me last weekend.. ;) > What about automating this? > > Manual part is

Re: [AArch64] PR105162: emit barrier for __sync and __atomic builtins on CPUs without LSE

2022-04-25 Thread Pop, Sebastian via Gcc-patches
Hi Wilco, Thanks for your review. Please find attached the patch amended following your recommendations. The number of new functions for _sync is reduced by 3x. I tested the patch on Graviton2 aarch64-linux. I also checked by hand that the outline functions in libgcc look similar to what GCC

Re: [PATCH] c++: partial ordering with dependent NTTP type [PR105289]

2022-04-25 Thread Jason Merrill via Gcc-patches
On 4/25/22 14:10, Patrick Palka wrote: On Mon, 25 Apr 2022, Jason Merrill wrote: On 4/22/22 15:27, Patrick Palka wrote: On Fri, 22 Apr 2022, Patrick Palka wrote: Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing (respectively) on two testcases that we used to accept in

Re: [PATCH, testsuite]: Cleanup dumps

2022-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 29 May 2015 10:44:02 +0200 Bernhard Reutner-Fischer wrote: > On 29 May 2015 at 10:21, Bernhard Reutner-Fischer > wrote: > > On 31 January 2015 at 22:10, Bernhard Reutner-Fischer > > wrote: > >> On January 31, 2015 9:17:57 PM GMT+01:00, Mike Stump > >> wrote: > > >>>If you want

Re: [PATCH] fortran: Fix up gfc_trans_oacc_construct [PR104717]

2022-04-25 Thread Thomas Schwinge
Hi! On 2022-04-20T19:06:17+0200, Jakub Jelinek wrote: > So that move_sese_region_to_fn works properly, OpenMP/OpenACC constructs > for which that function is invoked need an extra artificial BIND_EXPR > around their body so that we move all variables of the bodies. > > The C/C++ FEs do that both

Re: [pushed] testsuite: add additional option to force DSE execution [PR103662]

2022-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 April 2022 14:12:30 CEST, Jakub Jelinek via Fortran wrote: >On Mon, Apr 25, 2022 at 01:38:25PM +0200, Mikael Morin wrote: >> I have just pushed the attached fix for two UNRESOLVED checks at -O0 that I >> hadn’t seen. > >I don't like forcing of DSE in -O0 compilation, wouldn't it be better

Re: [PATCH] c++: partial ordering with dependent NTTP type [PR105289]

2022-04-25 Thread Patrick Palka via Gcc-patches
On Mon, 25 Apr 2022, Jason Merrill wrote: > On 4/22/22 15:27, Patrick Palka wrote: > > On Fri, 22 Apr 2022, Patrick Palka wrote: > > > > > Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing > > > (respectively) on two testcases that we used to accept in C++17 mode. > > > Both

[wwwdocs] Document support for C++23 constexpr std::unique_ptr

2022-04-25 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs. --- htdocs/gcc-12/changes.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 4f904bfd..78b7b05f 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -467,11 +467,13 @@

[committed] libstdc++: Implement constexpr std::unique_ptr for C++23 (P2273R3)

2022-04-25 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define conditionally. * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory): Define for C++23. (default_delete,

[committed] libstdc++: Add deduction guides for std::packaged_task [PR105375]

2022-04-25 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- This change was LWG 3117. The test is copied from 20_util/function/cons/deduction.cc libstdc++-v3/ChangeLog: PR libstdc++/105375 * include/std/future (packaged_task): Add deduction guides. *

[RFA] gcc.misc-tests/outputs.exp: Use link test to check for -gsplit-dwarf support

2022-04-25 Thread Joel Brobecker via Gcc-patches
Hello, We have noticed that, when running the GCC testsuite on AArch64 RTEMS 6, we have about 150 tests failing due to a link failure. When investigating, we found that all the tests were failing due to the use of -gsplit-dwarf. On this platform, using -gsplit-dwarf currently causes an error

Re: [PATCH] c++: crash with requires-expr and -Wsequence-point [PR105304]

2022-04-25 Thread Jason Merrill via Gcc-patches
On 4/22/22 14:36, Patrick Palka wrote: Here we're crashing from verify_sequence_points for this requires-expr condition because it contains a templated CAST_EXPR with empty operand, and verify_tree doesn't ignore this empty operand only because the manual tail recursion that it perform for unary

Re: [PATCH] c++: __builtin_shufflevector with value-dep expr [PR105353]

2022-04-25 Thread Jason Merrill via Gcc-patches
On 4/22/22 19:57, Marek Polacek wrote: Here we issue an error from c_build_shufflevector while parsing a template because it got a TEMPLATE_PARM_INDEX, but this function expects INTEGER_CSTs (except the first two arguments). It checks if any of the arguments are type-dependent, if so, we leave

Re: [PATCH] c++: partial ordering with dependent NTTP type [PR105289]

2022-04-25 Thread Jason Merrill via Gcc-patches
On 4/22/22 15:27, Patrick Palka wrote: On Fri, 22 Apr 2022, Patrick Palka wrote: Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing (respectively) on two testcases that we used to accept in C++17 mode. Both testcases declare partial specializations for which the primary

Re: [PATCH] tree-optimization/105276 - Retain existing range knowledge when prefilling statements.

2022-04-25 Thread Andrew MacLeod via Gcc-patches
On 4/22/22 01:51, Richard Biener wrote: On Thu, Apr 21, 2022 at 5:59 PM Andrew MacLeod wrote: When range_of_stmt was adjusted to avoid large recursion depth, I added code to precalculate the dependencies without recursion. This patch adjusted that pre-fill code to intersect the current known

[OG11-committed][stage1-patch] Fortran: Fix finalization resolution with deep copy (was: [Patch][Stage 1] Fortran/OpenMP: Support mapping of DT with allocatable components)

2022-04-25 Thread Tobias Burnus
Found another issue – applied to OG11 as attached. Will include it in the mainline patch once Stage1. (However, I intent to split the original patch (+ follow ups) into smaller pieces for mainline incorporation.) Tobias On 02.03.22 23:20, Tobias Burnus wrote: Some testing found an issue in

Re: [pushed] testsuite: add additional option to force DSE execution [PR103662]

2022-04-25 Thread Mikael Morin
Le 25/04/2022 à 14:12, Jakub Jelinek a écrit : On Mon, Apr 25, 2022 at 01:38:25PM +0200, Mikael Morin wrote: I have just pushed the attached fix for two UNRESOLVED checks at -O0 that I hadn’t seen. I don't like forcing of DSE in -O0 compilation, wouldn't it be better to just not check the dse

Re: [PATCH] libstdc++: Add pretty printer for std::initializer_list

2022-04-25 Thread Jonathan Wakely via Gcc-patches
On Sun, 24 Apr 2022 at 16:51, Philipp Fent via Libstdc++ wrote: > > Re-using the std::span printer, this now shows the contents of the > initializer list instead of the pointer and length members. Nice, I've pushed this to trunk. Thanks! > > Signed-off-by: Philipp Fent > --- >

Re: [pushed] testsuite: add additional option to force DSE execution [PR103662]

2022-04-25 Thread Jakub Jelinek via Gcc-patches
On Mon, Apr 25, 2022 at 01:38:25PM +0200, Mikael Morin wrote: > I have just pushed the attached fix for two UNRESOLVED checks at -O0 that I > hadn’t seen. I don't like forcing of DSE in -O0 compilation, wouldn't it be better to just not check the dse dump at -O0 like in the following patch? Even

[pushed] testsuite: add additional option to force DSE execution [PR103662]

2022-04-25 Thread Mikael Morin
I have just pushed the attached fix for two UNRESOLVED checks at -O0 that I hadn’t seen.From 6cc26f3037a18b9a958b4ac2a1363149a7fccd39 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Mon, 25 Apr 2022 13:14:20 +0200 Subject: [pushed] =?UTF-8?q?testsuite:=C2=A0add=20additional=20option=20to?=

[x86 PATCH] PR target/92578: Peephole2s to tweak cmove register allocation.

2022-04-25 Thread Roger Sayle
This patch addresses a (minor) missed-optimization regression revealed by Richard Biener's example/variant in comment #1 of PR target/92578. int foo(int moves, int movecnt, int komove) { int newcnt = movecnt; if (moves == komove) newcnt -= 2; return newcnt; } Comparing code

[PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-25 Thread Richard Biener via Gcc-patches
The following extends the equality compare dangling pointer diagnostics suppression for uses following free or realloc to also cover those following invalidation of auto variables via CLOBBERs. That avoids diagnosing idioms like return std::find(std::begin(candidates), std::end(candidates), s)

[PATCH] tree-optimization/105368 - avoid overflow in powi_cost

2022-04-25 Thread Richard Biener via Gcc-patches
The following avoids undefined signed overflow when computing the absolute of the exponent in powi_cost. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-04-25 Richard Biener PR tree-optimization/105368 * tree-ssa-math-opts.cc (powi_cost): Use absu_hwi. ---

Re: [PING] Re: [PATCH] tree-optimization/100810 - avoid undefs in IVOPT rewrites

2022-04-25 Thread Richard Biener via Gcc-patches
On Tue, Apr 19, 2022 at 1:06 PM Richard Biener via Gcc-patches wrote: > > On Fri, 1 Apr 2022, Richard Biener wrote: > > > The following attempts to avoid IVOPTs rewriting uses using > > IV candidates that involve undefined behavior by using uninitialized > > SSA names. First we restrict the set

Re: [PATCH] PR target/89125

2022-04-25 Thread Steve Kargl via Gcc-patches
On Mon, Apr 25, 2022 at 09:26:26AM +0200, Richard Biener wrote: > On Sat, Apr 23, 2022 at 8:40 PM Steve Kargl via Gcc-patches > wrote: > > > > ping. > > I have tested the patch on x86_64-linux and pushed it. > Thanks. -- Steve

Re: [PATCH] PR target/89125

2022-04-25 Thread Richard Biener via Gcc-patches
On Sat, Apr 23, 2022 at 8:40 PM Steve Kargl via Gcc-patches wrote: > > ping. I have tested the patch on x86_64-linux and pushed it. Richard. > On Fri, Apr 15, 2022 at 09:23:43AM -0700, Steve Kargl wrote: > > Can someone, anyone, please commit the attach patch, which is > > also attached to

Re: [PATCH] loongarch: ignore zero-size fields in calling convention

2022-04-25 Thread Lulu Cheng
This modification will cause the ABI to change, we are discussing solutions. And we will give a conclusion at the latest tommorrow. Thanks! 在 2022/4/25 下午1:57, Xi Ruoyao 写道: Ping. Normally we shouldn't ping a patch after only a few days, but we're running out of time to catch GCC 12

[gcov v2 05/14] gcov: Add __gcov_filename_to_gcfn()

2022-04-25 Thread Sebastian Huber
gcc/ * doc/invoke.texi (fprofile-info-section): Mention __gcov_filename_to_gcfn(). Use "freestanding" to match with C11 standard language. Fix minor example code issues. * gcov-io.h (GCOV_FILENAME_MAGIC): Define and document. gcc/testsuite/ *

[gcov v2 13/14] gcov: Use xstrerror()

2022-04-25 Thread Sebastian Huber
libgcc/ * libgcov-util.c (ftw_read_file): Improve notice using xstrerror(). (gcov_profile_merge_stream): Likewise. --- libgcc/libgcov-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index

[gcov v2 06/14] gcov-tool: Support file input from stdin

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-io.cc (GCOV_MODE_STDIN): Define. (gcov_position): For gcov-tool, return calculated position if file is stdin. (gcov_open): For gcov-tool, use stdin if filename is NULL. (gcov_close): For gcov-tool, do not close stdin. (gcov_read_bytes):

[gcov v2 07/14] gcov: Use xstrdup()

2022-04-25 Thread Sebastian Huber
Move duplication of filename to caller and use xstrdup() instead of custom code. This helps to reuse read_gcda_file() for other purposes. libgcc/ * libgcov-util.c (read_gcda_file): Do not duplicate filename. (ftw_read_file): Duplicate filename for read_gcda_file(). ---

[gcov v2 08/14] gcov: Move prepend to list to read_gcda_file()

2022-04-25 Thread Sebastian Huber
This helps to reuse read_gcda_file(). libgcc/ * libgcov-util.c (read_gcda_file): Prepend new info object to global list. (ftw_read_file): Remove list append here. --- libgcc/libgcov-util.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git

[gcov v2 10/14] gcov: Fix integer types in ftw_read_file()

2022-04-25 Thread Sebastian Huber
libgcc/ * libgcov-util.c (ftw_read_file): Use size_t for strlen() variables. --- libgcc/libgcov-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 6093a74531d..bf96f508db0 100644 --- a/libgcc/libgcov-util.c

[gcov v2 14/14] gcov: Add section for freestanding environments

2022-04-25 Thread Sebastian Huber
gcc/ * doc/gcov.texi (Profiling and Test Coverage in Freestanding Environments): New section. --- gcc/doc/gcov.texi | 375 ++ 1 file changed, 375 insertions(+) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index

[gcov v2 11/14] gcov: Record EOF error during read

2022-04-25 Thread Sebastian Huber
Use an enum for file error codes. gcc/ * gcov-io.cc (gcov_file_error): New enum. (gcov_var): Use gcov_file_error enum for the error member. (gcov_open): Use GCOV_FILE_NO_ERROR. (gcov_close): Use GCOV_FILE_WRITE_ERROR. (gcov_write): Likewise.

[gcov v2 09/14] gcov: Move gcov_open() to caller of read_gcda_file()

2022-04-25 Thread Sebastian Huber
This allows to reuse read_gcda_file() to read multiple objects from a single file. libgcc/ * libgcov-util.c (read_gcda_file): Do not open file. (ftw_read_file): Open file here. --- libgcc/libgcov-util.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[gcov v2 03/14] gcov: Add open mode parameter to gcov_do_dump()

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-tool.cc (gcov_do_dump): Add mode parameter. (gcov_output_files): Open files for reading and writing. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Add mode parameter. Pass mode to gcov_open() calls. * libgcov-driver.c

[gcov v2 12/14] gcov-tool: Add merge-stream subcommand

2022-04-25 Thread Sebastian Huber
gcc/ * doc/gcov-tool.texi: Document merge-stream subcommand. * doc/invoke.texi (fprofile-info-section): Mention merge-stream subcommand of gcov-tool. * gcov-tool.cc (gcov_profile_merge_stream): Declare. (print_merge_stream_usage_message): New.

[gcov v2 04/14] gcov: Make gcov_seek() static

2022-04-25 Thread Sebastian Huber
This function is only used by gcov_write_length() in the gcov-io.cc file. gcc/ * gcov-io.cc (gcov_seek): Make it static. * gcov-io.h (struct gcov_summary): Do not mention gcov_seek(). libgcc/ * libgcov.h (gcov_seek): Remove define and declaration. --- gcc/gcov-io.cc

[gcov v2 02/14] gcov: Add mode to all gcov_open()

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-io.cc (gcov_open): Always use the mode parameter. * gcov-io.h (gcov_open): Declare it unconditionally. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for reading and writing. * libgcov-util.c (read_gcda_file): Open

[gcov v2 01/14] gcov-tool: Allow merging of empty profile lists

2022-04-25 Thread Sebastian Huber
The gcov_profile_merge() already had code to deal with profile information which had no counterpart to merge with. For profile information from files with no associated counterpart, the profile information is simply used as is with the weighting transformation applied. Make sure that

[gcov v2 00/14] Add merge-stream subcommand to gcov-tool

2022-04-25 Thread Sebastian Huber
This patch set is for GCC 13. The aim is to better support gcov in free-standing environments. For example, you can run a test executable which dumps all gcov info objects in a serial data stream using __gcov_info_to_gcda() and the new __gcov_filename_to_gcfn(). It could be encoded as base64. It

Re: [PATCH] loongarch: ignore zero-size fields in calling convention

2022-04-25 Thread WANG Xuerui
On 4/25/22 13:57, Xi Ruoyao wrote: Ping. Normally we shouldn't ping a patch after only a few days, but we're running out of time to catch GCC 12 milestone. And once GCC 12 is released the patch will become far more complicated for a psABI warning. And please note that the ABI difference

Re: PING [PATCH] Fix 'modff' reference in extend.texi

2022-04-25 Thread Richard Biener via Gcc-patches
On Fri, Apr 22, 2022 at 8:02 PM Paul A. Clarke via Gcc-patches wrote: > > On Mon, Apr 11, 2022 at 11:23:48AM -0500, Paul A. Clarke via Gcc-patches > wrote: > > In commit a2a919aa501e3 (2003), built-ins for modf and modff were added. > > In extend.texi, section "Other Builtins", "modf" was added

Re: [PATCH] fold, simplify-rtx: Punt on non-representable floating point constants [PR104522]

2022-04-25 Thread Richard Biener via Gcc-patches
On Fri, Apr 22, 2022 at 5:26 PM Qing Zhao wrote: > > > > > On Apr 21, 2022, at 2:09 AM, Richard Biener > > wrote: > > > > On Wed, Apr 20, 2022 at 6:02 PM Qing Zhao wrote: > >> > >> > >> > >>> On Apr 20, 2022, at 5:38 AM, Richard Biener > >>> wrote: > >>> > >>> On Tue, Apr 19, 2022 at 11:36

Re: [PATCH] fold, simplify-rtx: Punt on non-representable floating point constants [PR104522]

2022-04-25 Thread Richard Biener via Gcc-patches
On Fri, Apr 22, 2022 at 5:01 PM Qing Zhao wrote: > > > > > On Apr 20, 2022, at 5:38 AM, Richard Biener > > wrote: > > > > On Tue, Apr 19, 2022 at 11:36 PM Qing Zhao wrote: > >> > >> > >> > >>> On Apr 14, 2022, at 1:53 AM, Richard Biener > >>> wrote: > >>> > >>> On Wed, Apr 13, 2022 at 5:22