GCC 12.0.0 Status Report (2021-10-01), Stage 3 to start Nov 15th

2021-10-01 Thread Richard Biener via Gcc-patches
Status == The GCC development branch is open for general development (Stage 1), but the two-month general bugfixing period (Stage 3) is ahead with historical data telling us to expect it to start Nov 15th and last through the Christmas holidays. Take the quality data below with a big grain

RE: [PATCH][GCC] aarch64: add armv9-a to -march

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Przemyslaw Wirkus > Sent: Wednesday, September 22, 2021 9:33 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: [PATCH][GCC] aarch64: add armv9-a to -march > > Patch is adding new

[patch] Fix ICE with stack checking emulation at -O2

2021-10-01 Thread Eric Botcazou via Gcc-patches
Hi, this is a regression present on mainline, 11 and 10 branches: on bare-metal platforms, the Ada compiler emulates stack checking (it is required by the language and tested by ACATS) in the runtime via the stack_check_libfunc hook of the RTL middle-end. Calls to the function are generated as

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-01 Thread Richard Biener via Gcc-patches
On Thu, 30 Sep 2021, Andre Vieira (lists) wrote: > Hi, > > > >> That just forces trying the vector modes we've tried before. Though I might > >> need to revisit this now I think about it. I'm afraid it might be possible > >> for > >> this to generate an epilogue with a vf that is not lower than

Re: [patch] Fix ICE with stack checking emulation at -O2

2021-10-01 Thread Richard Biener via Gcc-patches
On Fri, Oct 1, 2021 at 10:17 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > this is a regression present on mainline, 11 and 10 branches: on bare-metal > platforms, the Ada compiler emulates stack checking (it is required by the > language and tested by ACATS) in the runtime via the stack_che

Re: [patch] Fix ICE with stack checking emulation at -O2

2021-10-01 Thread Eric Botcazou via Gcc-patches
> OK though I wonder if you could get away with using > built_function_type (void_type_node, NULL_TREE); aka > a non-prototype void f(). See below. > Did you track down what changed the requirement? The new function-abi.cc module, so I'd rather have a correct prototype. -- Eric Botcazou

Re: [patch] Fix ICE with stack checking emulation at -O2

2021-10-01 Thread Richard Biener via Gcc-patches
On Fri, Oct 1, 2021 at 10:30 AM Eric Botcazou wrote: > > > OK though I wonder if you could get away with using > > built_function_type (void_type_node, NULL_TREE); aka > > a non-prototype void f(). > > See below. > > > Did you track down what changed the requirement? > > The new function-abi.cc mo

[committed] openmp: Add alloc_align attribute to omp_aligned_*alloc and testcase for omp_realloc

2021-10-01 Thread Jakub Jelinek via Gcc-patches
Hi! This patch adds alloc_align attribute to omp_aligned_{,c}alloc so that if the first argument is constant, GCC can assume requested alignment. Additionally, it adds testsuite coverage for omp_realloc which I haven't managed to write in the patch from yesterday. Bootstrapped/regtested on x86_6

[committed] openmp: Avoid PLT relocations for omp_* symbols in libgomp

2021-10-01 Thread Jakub Jelinek via Gcc-patches
Hi! This patch avoids the following relocations: readelf -Wr libgomp.so.1.0.0 | grep omp_ 000470e0 02070007 R_X86_64_JUMP_SLOT 0001d9d0 omp_fulfill_event@@OMP_5.0.1 + 0 00047170 00b80007 R_X86_64_JUMP_SLOT e760 omp_display_env@@OMP_5.

[committed] openmp: Differentiate between order(concurrent) and order(reproducible:concurrent)

2021-10-01 Thread Jakub Jelinek via Gcc-patches
Hi! While OpenMP 5.1 implies order(concurrent) is the same thing as order(reproducible:concurrent), this is going to change in OpenMP 5.2, where essentially order(concurrent) means nothing is stated on whether it is reproducible or unconstrained (and is determined by other means, e.g. for/do with

[committed] Fix bb-slp-pr97709.c after computed goto change

2021-10-01 Thread apinski--- via Gcc-patches
From: Andrew Pinski Looks like I tested the change for bb-slp-pr97709.c on an older tree which did not have the error message so I had missed one more place where the change was needed. Anyways committed after testing to make sure the testcase passes now. gcc/testsuite/ChangeLog: * gcc

[Patch] Add/update libgomp.fortran/alloc-*.f90 [Re: [committed] openmp: Add alloc_align attribute to omp_aligned_*alloc and testcase for omp_realloc]

2021-10-01 Thread Tobias Burnus
... and attached the Fortran version of the C/C++ testcase. OK? Tobias On 01.10.21 10:59, Jakub Jelinek wrote: 2021-10-01 Jakub Jelinek * omp.h.in (omp_aligned_alloc, omp_aligned_calloc): Add __alloc_align__ (1) attribute. * testsuite/libgomp.c-c++-common/alloc-9.c: New t

[Patch] Add libgomp.fortran/order-reproducible-*.f90 [Re: [committed] openmp: Differentiate between order(concurrent) and order(reproducible:concurrent)]

2021-10-01 Thread Tobias Burnus
On 01.10.21 11:03, Jakub Jelinek wrote: 2021-10-01 Jakub Jelinek libgomp/ * testsuite/libgomp.c-c++-common/order-reproducible-1.c: New test. * testsuite/libgomp.c-c++-common/order-reproducible-2.c: New test. Attached is the Fortran version of the two patches – the Fortran FE modi

Re: [Patch] Add/update libgomp.fortran/alloc-*.f90 [Re: [committed] openmp: Add alloc_align attribute to omp_aligned_*alloc and testcase for omp_realloc]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 11:32:24AM +0200, Tobias Burnus wrote: > libgomp/ChangeLog: > > * testsuite/libgomp.fortran/alloc-10.f90: Fix alignment check. > * testsuite/libgomp.fortran/alloc-7.f90: Fix array access. > * testsuite/libgomp.fortran/alloc-8.f90: Likewise. > * tests

Re: [Patch] Add libgomp.fortran/order-reproducible-*.f90 [Re: [committed] openmp: Differentiate between order(concurrent) and order(reproducible:concurrent)]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 11:34:15AM +0200, Tobias Burnus wrote: > On 01.10.21 11:03, Jakub Jelinek wrote: > > 2021-10-01 Jakub Jelinek > > libgomp/ > > * testsuite/libgomp.c-c++-common/order-reproducible-1.c: New test. > > * testsuite/libgomp.c-c++-common/order-reproducible-2.c: New t

[PATCH] gcov: make profile merging smarter

2021-10-01 Thread Martin Liška
Support merging of profiles that are built from a different .o files but belong to the same source file. Moreover, a checksum is verified during profile merging and so we can safely combine such profile. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm going to install t

RE: [PATCH][GCC] aarch64: add armv9-a to -march

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
> > Subject: [PATCH][GCC] aarch64: add armv9-a to -march > > > > Patch is adding new command line option 'armv9-a' to -march. > > > > OK for master? > > Ok. commit f0688d42c9b74a6999548ff2e79ae440b049b87f > Thanks, > Kyrill > > > > > gcc/ChangeLog: > > > > 2021-09-22 Przemyslaw Wirkus > > >

[committed] wwwdocs: gcc-12/changes.html: Simplify AVX512-FP16 news

2021-10-01 Thread Gerald Pfeifer
Just some editorial changes to simplify things. Pushed. Gerald --- htdocs/gcc-12/changes.html | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 0e2962ee..45e87ea4 100644 --- a/htdocs/gcc-12/changes.html +++ b

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-10-01 Thread Gerald Pfeifer
On Fri, 24 Sep 2021, Hongtao Liu via Gcc-patches wrote: > + New ISA extension support for Intel AVX512-FP16 was added to GCC. > + AVX512FP16 intrinsics are available [...] So, is it AVX512-FP16 or AVX512FP16? Gerald

Re: [PATCH] gcov: make profile merging smarter

2021-10-01 Thread Richard Biener via Gcc-patches
On Fri, Oct 1, 2021 at 11:55 AM Martin Liška wrote: > > Support merging of profiles that are built from a different .o files > but belong to the same source file. Moreover, a checksum is verified > during profile merging and so we can safely combine such profile. > > Patch can bootstrap on x86_64-

[committed] wwwdocs: Consistently use 32-bit instead of 32bit

2021-10-01 Thread Gerald Pfeifer
Just a little thing I noticed in one of the recent commits. Pushed. --- htdocs/gcc-12/changes.html | 2 +- htdocs/gcc-8/changes.html | 2 +- htdocs/news.html | 4 ++-- htdocs/news/sparc.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/gcc-12/chang

Re: [PATCH] gcov: make profile merging smarter

2021-10-01 Thread Martin Liška
On 10/1/21 12:17, Richard Biener wrote: On Fri, Oct 1, 2021 at 11:55 AM Martin Liška wrote: Support merging of profiles that are built from a different .o files but belong to the same source file. Moreover, a checksum is verified during profile merging and so we can safely combine such profile

Re: [PATCH] Replace VRP threader with a hybrid forward threader.

2021-10-01 Thread Gerald Pfeifer
On Fri, 24 Sep 2021, Aldy Hernandez via Gcc-patches wrote: > This patch implements the new hybrid forward threader and replaces the > embedded VRP threader with it. I'm not sure this is the right of the patches to follow-up around this, but between Jeff writing "Note we've got massive failures

Re: [PATCH] c: [PR32122] Require pointer types for computed gotos

2021-10-01 Thread Eric Gallager via Gcc-patches
On Mon, Sep 20, 2021 at 12:15 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > So GCC has always accepted non-pointer types in computed gotos but > that was wrong based on the documentation: > Any expression of type void * is allowed. > > So this fixes the problem by requiring the

Re: [PATCH] Replace VRP threader with a hybrid forward threader.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
On 10/1/21 12:55 PM, Gerald Pfeifer wrote: On Fri, 24 Sep 2021, Aldy Hernandez via Gcc-patches wrote: This patch implements the new hybrid forward threader and replaces the embedded VRP threader with it. I'm not sure this is the right of the patches to follow-up around this, but between Jef

Re: [PATCH] c: [PR32122] Require pointer types for computed gotos

2021-10-01 Thread Andrew Pinski via Gcc-patches
On Fri, Oct 1, 2021 at 4:03 AM Eric Gallager via Gcc-patches wrote: > > On Mon, Sep 20, 2021 at 12:15 AM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > So GCC has always accepted non-pointer types in computed gotos but > > that was wrong based on the documentation: > > A

RE: [PATCH] aarch64: Improve size heuristic for cpymem expansion

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > LYON via Gcc-patches > Sent: Thursday, September 30, 2021 2:51 PM > To: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] aarch64: Improve size heuristic for cpymem expansion > >

[PATCH] ubsan: Move INT_MIN / -1 instrumentation from -fsanitize=integer-divide-by-zero to -fsanitize=signed-integer-overflow [PR102515]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
Hi! As noted by Richi, in clang INT_MIN / -1 is instrumented under -fsanitize=signed-integer-overflow rather than -fsanitize=integer-divide-by-zero as we did and doing it in the former makes more sense, as it is overflow during division rather than division by zero. I've verified on godbolt that c

RE: [PATCH][GCC] aarch64: enable cortex-a510 CPU

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
Hi Przemek, > -Original Message- > From: Przemyslaw Wirkus > Sent: Wednesday, September 22, 2021 9:35 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: [PATCH][GCC] aarch64: enable cortex-a510 CPU > > Patch is

Re: [PATCH] ubsan: Move INT_MIN / -1 instrumentation from -fsanitize=integer-divide-by-zero to -fsanitize=signed-integer-overflow [PR102515]

2021-10-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Oct 2021, Jakub Jelinek wrote: > Hi! > > As noted by Richi, in clang INT_MIN / -1 is instrumented under > -fsanitize=signed-integer-overflow rather than > -fsanitize=integer-divide-by-zero as we did and doing it in the former > makes more sense, as it is overflow during division rather

Re: [PATCH] ubsan: Move INT_MIN / -1 instrumentation from -fsanitize=integer-divide-by-zero to -fsanitize=signed-integer-overflow [PR102515]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 01:53:37PM +0200, Richard Biener wrote: > OK. Maybe the change is worth mentioning in changes.html or maybe it's > just a bugfix... I think it is worth mentioning it there. And so I'd probably wouldn't try to backport it, except perhaps the recover for float-divide-by-zero

RE: [PATCH][GCC] aarch64: enable cortex-a710 CPU

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Przemyslaw Wirkus > Sent: Wednesday, September 22, 2021 9:37 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: [PATCH][GCC] aarch64: enable cortex-a710 CPU > > Patch is adding 'co

RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Przemyslaw Wirkus > Sent: Wednesday, September 22, 2021 9:38 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: [PATCH][GCC] aarch64: enable cortex-x2 CPU > > Patch is adding 'cort

RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Kyrylo Tkachov > Sent: Friday, October 1, 2021 1:17 PM > To: Przemyslaw Wirkus ; gcc- > patc...@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > > Subject: RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU > > > > > -Original

[COMMITTED] Remove shadowed oracle field.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
The m_oracle field in the path solver was shadowing the base class. This was causing subtle problems while calculating outgoing edges between blocks, because the query object being passed did not have an oracle set. This should further improve our solving ability. Tested on x86-64 Linux. gcc/Cha

[PATCH] Pass relations down to range_operator::op[12]_range.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
It looks like we don't pass relations down to the op[12]_range operators. This is causing problems when implementing some relational magic for the shift operators. Andrew, this looks like an oversight. If so, how does this look? Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-go

[PATCH] Handle EQ_EXPR relation for operator_lshift.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
Knowing that X << X is non-zero means X is also non-zero. This patch teaches this this to range-ops. As usual, the big twiddling experts could come up with all sorts of fancy enhancements in this area, and we welcome all patches :). I will push this pending tests. gcc/ChangeLog: PR tre

Re: [PATCH v2] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-10-01 Thread Richard Biener via Gcc-patches
On Thu, Sep 16, 2021 at 8:13 PM Di Zhao OS wrote: > > Sorry about updating on this after so long. It took me much time to work out a > new plan and pass the tests. > > The new idea is to use one variable to represent a set of equal variables at > some basic-block. This variable is called a "equiva

[PATCH][GCC][committed] aarch64: fix AARCH64_FL_V9 flag value

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
Patch is fixing AARCH64_FL_V9 flag value which is now wrongly set due to merge error. Committed as obvious. gcc/ChangeLog: * config/aarch64/aarch64.h (AARCH64_FL_V9): Update value. --- diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 6908b8f4a16..2792bb29

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 9/30/21 14:24, nick huang wrote: You may need to run contrib/gcc-git-customization.sh to get the git gcc-verify command. I re-setup and can use git gcc-verify. Now I can see it rejects because I forgot to add a description of modified file. Now that it passes gcc-verify and I attach the cha

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 9/30/21 17:56, Marek Polacek wrote: On Thu, Sep 30, 2021 at 03:34:24PM -0400, Jason Merrill wrote: On 9/30/21 10:50, Marek Polacek wrote: This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of ar

Re: [PATCH] Pass relations down to range_operator::op[12]_range.

2021-10-01 Thread Andrew MacLeod via Gcc-patches
On 10/1/21 8:43 AM, Aldy Hernandez wrote: It looks like we don't pass relations down to the op[12]_range operators. This is causing problems when implementing some relational magic for the shift operators. Andrew, this looks like an oversight. If so, how does this look? Hrm.  It's at least

[PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK. This patch fixes this by checking depende

[PATCH][pushed] options: fix concat of options.

2021-10-01 Thread Martin Liška
It's quite an obvious error I made during concat of merged_decoded_options. make check -k RUNTESTFLAGS="i386.exp" works fine now. Martin PR target/102552 gcc/c-family/ChangeLog: * c-common.c (parse_optimize_options): decoded_options[0] is used for program name, so m

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK.

[committed] libstdc++: Replace try-catch in std::list::merge to avoid O(N) size

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The current std::list::merge code calls size() before starting to merge any elements, so that the _M_size members can be updated after the merge finishes. The work is done in a try-block so that the sizes can still be updated in an exception handler if any element comparison throws. The _M_size me

[committed] libstdc++: Fix _ForwardIteratorConcept for __gnu_debug::vector

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The recent changes to the _GLIBCXX_CONCEPT_CHECKS checks for forward iterators don't work for vector iterators in debug mode, because the _Safe_iterator specializations don't match the special cases I added for _Bit_iterator and _Bit_const_iterator. This refactors the _ForwardIteratorReferenceConc

[committed] libstdc++: Add noexcept to istream_iterator and ostream_iterator

2021-10-01 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/stream_iterator.h (istream_iterator): Add noexcept to constructors and non-throwing member functions and friend functions. (ostream_iterator): Likewise. Tested x86_64-linux. Committed to trunk. commit 901fa4cc27ce693b36122081

[committed] libstdc++: Add missing header to test

2021-10-01 Thread Jonathan Wakely via Gcc-patches
We need to include (or one of the containers) to get a definition for std::begin. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/is_permutation/2.cc: Include . Tested x86_64-linux. Committed to trunk. commit 94311bf34704ebecf745043fe2df03df201052fe Author: Jonathan Wakely Date: F

[committed] libstdc++: Define basic_regex::multiline for non-strict modes

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The regex_constants::multiline constant is defined for non-strict C++11 and C++14 modes, on the basis that the feature is a DR (even though it was really a new feature addition to C++17 and probably shouldn't have gone through the issues list). This makes the basic_regex::multiline constant define

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-10-01 Thread H.J. Lu via Gcc-patches
On Thu, Sep 23, 2021 at 8:55 AM Jeff Law via Gcc-patches wrote: > > > > On 9/23/2021 4:17 AM, ibuclaw--- via Gcc-patches wrote: > >> On 22/09/2021 03:31 Luís Ferreira wrote: > >> > >> > >> This patch prevents dereferencing a null reference on a crafted > >> malformed magled name, often causing SI

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Jason Merrill wrote: > On 10/1/21 09:46, Patrick Palka wrote: > > Here during partial ordering of the two partial specializations we end > > up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly > > thereafter because uses_template_parms calls potential_constant_ex

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-10-01 Thread Luís Ferreira via Gcc-patches
Hi, Yes, I'm sorry, I forgot to add --format=dlang parameter. This patch fixes it https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580544.html . On Fri, 2021-10-01 at 07:23 -0700, H.J. Lu wrote: > On Thu, Sep 23, 2021 at 8:55 AM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 9/2

Re: [PATCH] Handle EQ_EXPR relation for operator_lshift.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
Well, after talking with Andrew it seems that X << Y being non-zero also implies X is non-zero. So we don't even need relationals here. So, I leave gori relationals in his capable hands, while I test this much simpler patch which fixes the PR with no additional infrastructure ;-). Will push pend

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Qing Zhao via Gcc-patches
> On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: > > On 9/30/21 11:42, Qing Zhao wrote: >>> On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: >>> >>> On Thu, 30 Sep 2021, Jason Merrill wrote: >>> On 9/29/21 17:30, Qing Zhao wrote: > Hi, > > PR102359 (ICE gimplification

[PATCH, v4] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 30, 2021 at 03:01:49PM -0400, Jason Merrill wrote: > > After fixing the incomplete std::strong_ordering spaceship-synth8.C is now > > accepted, but I'm afraid I'm getting lost in this - clang++ rejects that > > testcase instead complaining that D has <=> operator, but has it pure > > v

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Nick Huang via Gcc-patches
> gcc-verify still fails with this version: > > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line should start with a tab: "* tree.c > > (cp_build_qualified_type_real): Excluding typedef from error" > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line s

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Martin Sebor via Gcc-patches
On 9/30/21 8:50 AM, Marek Polacek via Gcc-patches wrote: This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of array type are deprecated." so this patch adds -Wdeprecated-array-compare (enabled by de

PING^4 [PATCH] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-10-01 Thread H.J. Lu via Gcc-patches
On Mon, Sep 20, 2021 at 10:06 AM H.J. Lu wrote: > > On Mon, Sep 13, 2021 at 6:38 AM H.J. Lu wrote: > > > > On Tue, Sep 7, 2021 at 8:01 PM H.J. Lu wrote: > > > > > > On Sun, Aug 22, 2021 at 8:28 AM H.J. Lu wrote: > > > > > > > > On Tue, Mar 23, 2021 at 09:19:38AM +0100, Richard Biener wrote: > >

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 10:54, Qing Zhao wrote: On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: On 9/30/21 11:42, Qing Zhao wrote: On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: On Thu, 30 Sep 2021, Jason Merrill wrote: On 9/29/21 17:30, Qing Zhao wrote: Hi, PR102359 (ICE gimplification fail

[PATCH 4/4] Update c-c++-common/tsan/atomic_stack.c

2021-10-01 Thread H.J. Lu via Gcc-patches
Print out from __tsan_atomic32_fetch_add was removed by commit da7a5c09c86c3f639c63ce8843d6f21c915ae1c6 Author: Dmitry Vyukov Date: Wed Jul 28 16:57:39 2021 +0200 tsan: don't print __tsan_atomic* functions in report stacks Currently __tsan_atomic* functions do FuncEntry/Exit using cal

[PATCH 3/4] libsanitizer: Bump asan/tsan versions

2021-10-01 Thread H.J. Lu via Gcc-patches
Bump asan/tsan versions for upstream commits: commit f1bb30a4956f83e46406d6082e5d376ce65391e0 Author: Vitaly Buka Date: Thu Aug 26 10:25:09 2021 -0700 [sanitizer] No THREADLOCAL in qsort and bsearch qsort can reuse qsort_r if available. bsearch always passes key as the first compa

[PATCH 1/4] libsanitizer: Merge with upstream

2021-10-01 Thread H.J. Lu via Gcc-patches
Merged revision: 1c2e5fd66ea27d0c51360ba4e22099124a915562 --- libsanitizer/MERGE|2 +- libsanitizer/asan/asan_fuchsia.cpp| 35 +- libsanitizer/asan/asan_globals.cpp| 33 +- libsanitizer/asan/asan_interceptors.cpp | 18 +- libsanit

[PATCH 0/4] libsanitizer: Merge with upstream commit 1c2e5fd66ea

2021-10-01 Thread H.J. Lu via Gcc-patches
Merge with upstream commit: commit 1c2e5fd66ea27d0c51360ba4e22099124a915562 Author: peter klausler Date: Wed Sep 15 08:28:48 2021 -0700 [flang] Enforce constraint: defined ass't in WHERE must be elemental A defined assignment subroutine invoked in the context of a WHERE statement

[PATCH 2/4] libsanitizer: Apply local patches

2021-10-01 Thread H.J. Lu via Gcc-patches
--- libsanitizer/asan/asan_globals.cpp| 19 -- libsanitizer/asan/asan_interceptors.h | 7 ++- libsanitizer/asan/asan_mapping.h | 2 +- .../sanitizer_linux_libcdep.cpp | 4 .../sanitizer_common/sanitizer_mac.cpp| 12

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 10:26, Patrick Palka wrote: On Fri, 1 Oct 2021, Jason Merrill wrote: On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parm

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Marek Polacek via Gcc-patches
On Fri, Oct 01, 2021 at 09:16:53AM -0600, Martin Sebor wrote: > On 9/30/21 8:50 AM, Marek Polacek via Gcc-patches wrote: > > This patch addresses one of my leftovers from GCC 11. C++20 introduced > > [depr.array.comp]: > > "Equality and relational comparisons between two operands of array type are

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread H.J. Lu via Gcc-patches
On Wed, Sep 29, 2021 at 5:51 PM Luís Ferreira wrote: > > This patch adds a missing format parameter that prevents d-demangle-expected > test collection from running successfully. > > Signed-off-by: Luís Ferreira > --- > libiberty/testsuite/d-demangle-expected | 1 + > 1 file changed, 1 insertion

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 11:10, Nick Huang wrote: gcc-verify still fails with this version: ERR: line should start with a tab: "PR c++/101783" ERR: line should start with a tab: "* tree.c (cp_build_qualified_type_real): Excluding typedef from error" ERR: line should start with a tab: "PR c++/101

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Qing Zhao via Gcc-patches
> On Oct 1, 2021, at 10:33 AM, Jason Merrill wrote: > > On 10/1/21 10:54, Qing Zhao wrote: >>> On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: >>> >>> On 9/30/21 11:42, Qing Zhao wrote: > On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: > > On Thu, 30 Sep 2021, Jason Merrill

[PATCH 00/11] OpenMP: Deep struct dereferences

2021-10-01 Thread Julian Brown
This is a series of patches to support deep struct dereferences for OpenMP 5.0 (i.e. with multiple arrow operators, "a->b[foo]->c[lo:hi]"). Apart from a couple of general bug fixes, the main parts of this comprise: 1. Topological sorting of OMP clauses by base pointer dependencies. 2. Hoistin

[PATCH 01/11] libgomp: Release device lock on cbuf error path

2021-10-01 Thread Julian Brown
This patch releases the device lock on a sanity-checking error path in transfer combining (cbuf) handling in libgomp:target.c. This shouldn't happen when handling well-formed mapping clauses, but erroneous clauses can currently cause a hang if the condition triggers. Tested with offloading to NVP

[PATCH 02/11] Remove base_ind/base_ref handling from extract_base_bit_offset

2021-10-01 Thread Julian Brown
In preparation for follow-up patches extending struct dereference handling for OpenMP, this patch removes base_ind/base_ref handling from gimplify.c:extract_base_bit_offset. This arguably simplifies some of the code around the callers of the function also, though subsequent patches modify those par

[PATCH 03/11] OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer)

2021-10-01 Thread Julian Brown
This patch reimplements the omp_target_reorder_clauses function in anticipation of supporting "deeper" struct mappings (that is, with several structure dereference operators, or similar). The idea is that in place of the (possibly quadratic) algorithm in omp_target_reorder_clauses that greedily mo

[PATCH 04/11] Remove omp_target_reorder_clauses

2021-10-01 Thread Julian Brown
This patch has been split out from the previous one to avoid a confusingly-interleaved diff. The two patches should probably be committed squashed together. 2021-10-01 Julian Brown gcc/ * gimplify.c (omp_target_reorder_clauses): Delete. --- gcc/gimplify.c | 183 --

[PATCH 05/11] OpenMP/OpenACC: Hoist struct sibling list handling in gimplification

2021-10-01 Thread Julian Brown
This patch lifts struct sibling-list handling out of the main loop in gimplify_scan_omp_clauses. The reasons for this are several: first, it means that we can subject created sibling list groups to topological sorting (see previous patch) so base-pointer data dependencies are handled correctly. S

[PATCH 06/11] OpenMP: Allow array ref components for C & C++

2021-10-01 Thread Julian Brown
This patch fixes parsing for struct components that are array references in OMP clauses in both the C and C++ front ends. OK for mainline? Thanks, Julian 2021-09-29 Julian Brown gcc/c/ * c-typeck.c (c_finish_omp_clauses): Allow ARRAY_REF components. gcc/cp/ * semantics.c (f

[PATCH 08/11] Not for committing: noisy topological sorting output

2021-10-01 Thread Julian Brown
As a possible aid to review, this is my "printf-style" debugging cruft for the topological sorting implementation. We might want to rework this into something that emits scannable output into the gimple dump in order to write tests to make sure base pointer dependencies are being found properly, b

[PATCH 07/11] OpenMP: Fix non-zero attach/detach bias for struct dereferences

2021-10-01 Thread Julian Brown
This patch fixes attach/detach operations for OpenMP that have a non-zero bias: these can occur if we have a mapping such as: #pragma omp target map(mystruct->a.b[idx].c[:arrsz]) i.e. where there is an offset between the attachment point ("mystruct" here) and the pointed-to data. (The "b" and

[PATCH 09/11] Not for committing: noisy sibling-list handling output

2021-10-01 Thread Julian Brown
As a possible aid to review, this is my "printf-style" debugging cruft for the sibling list handling hoist/rework. It's not meant for committing. --- gcc/gimplify.c | 131 + 1 file changed, 131 insertions(+) diff --git a/gcc/gimplify.c b/gcc/gimpli

[PATCH 10/11] Not for committing: noisy mapping-group taxonomy

2021-10-01 Thread Julian Brown
As a possible aid to review, this is code that can be used to enumerate all the mapping group forms currently in use across the GCC/libgomp testsuites for OpenMP/OpenACC. These groups have been added somewhat organically, so there might be a couple of surprises: see e.g. the patch following this o

[PATCH 11/11] OpenMP/OpenACC: [WIP] Add gcc_unreachable to apparently-dead path in build_struct_comp_nodes

2021-10-01 Thread Julian Brown
The previous "not for committing" taxonomy patch shows that the path handling "extra nodes" in build_struct_comp_nodes is probably now dead, at least across the current testsuite. This patch adds gcc_unreachable on that path: this passes testing, which suggests that the extra node handling can pro

Re: [PATCH 05/11] OpenMP/OpenACC: Hoist struct sibling list handling in gimplification

2021-10-01 Thread Julian Brown
Oops, editing: On Fri, 1 Oct 2021 10:09:03 -0700 Julian Brown wrote: > Secondly, it means that in the first pass gathering up sibling lists > from parsed OpenMP/OpenACC clauses, we don't need to worry about > gimplifying: that means we can see struct bases & components we need > to sort sibling

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread Jeff Law via Gcc-patches
On 9/29/2021 6:50 PM, Luís Ferreira wrote: This patch adds a missing format parameter that prevents d-demangle-expected test collection from running successfully. Signed-off-by: Luís Ferreira THanks.  Pushed to the trunk. Can you please start including ChangeLog entries so that I don't have

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Jason Merrill wrote: > On 10/1/21 10:26, Patrick Palka wrote: > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > > > On 10/1/21 09:46, Patrick Palka wrote: > > > > Here during partial ordering of the two partial specializations we end > > > > up in unify with parm=arg=NONTYPE_

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread Luís Ferreira
Noted. On Fri, 2021-10-01 at 11:28 -0600, Jeff Law wrote: >   >   > On 9/29/2021 6:50 PM, Luís Ferreira wrote: >   > > This patch adds a missing format parameter that prevents d- > > demangle-expected > > test collection from running successfully. > > > > Signed-off-by: Luís Ferreira >  THanks. 

[committed] hppa: Default to dwarf version 4 on hppa64-hpux

2021-10-01 Thread John David Anglin
DWARF5 is not supported by gdb on hpux, so we need to to limit version to 4. Tested on hppa64-hp-hpux11.11. Committed to trunk and gcc-11. Dave --- Default to dwarf version 4 on hppa64-hpux 2021-10-01 John David Anglin gcc/ChangeLog: PR debug/102373 * config/pa/pa.c (pa_op

Re: PING #2 [PATCH] warn for more impossible null pointer tests [PR102103]

2021-10-01 Thread Martin Sebor via Gcc-patches
On 9/30/21 1:35 PM, Joseph Myers wrote: On Thu, 30 Sep 2021, Martin Sebor via Gcc-patches wrote: Jason, since you approved the C++ changes, would you mind looking over the C bits and if they look good to you giving me the green light to commit the patch? https://gcc.gnu.org/pipermail/gcc-patch

Re: [PING^2][PATCH] libgcc, emutls: Allow building weak definitions of the emutls functions.

2021-10-01 Thread Iain Sandoe
Hi, So let’s ignore the questions for now - OK for the non-Darwin parts of the patch ? > On 24 Sep 2021, at 17:57, Iain Sandoe wrote: > > as noted below the non-Darwin parts of this are trivial (and a no-OP). > I’d like to apply this to start work towards solving Darwin’s libgcc issues, >> On

Re: [Patch] Fortran: Avoid var initialization in interfaces [PR54753]

2021-10-01 Thread Harald Anlauf via Gcc-patches
[Resending as I did not see it show up in the MLs] Hi Tobias, Am 29.09.21 um 10:53 schrieb Tobias Burnus: Found when looking at F2018:C839 / PR54753. For INTENT(OUT) the dummy variable (might) also be default initialized or deallocated. However, with assumed rank, that causes issues, which C83

[committed] libstdc++: Reduce header dependencies for C++20 std::erase [PR92546]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This reduces the preprocessed size of , and by not including for std::remove and std::remove_if. Also unwrap iterators using __niter_base, to avoid redundant debug mode checks. PR libstdc++/92546 * include/bits/erase_if.h (__erase_nodes_if): Use __niter_base to unwrap d

[committed] libstdc++: Implement std::clamp with std::min and std::max [PR 96733]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The compiler doesn't know about the precondition of std::clamp that (hi < lo) is false, and so can't optimize as well as we'd like. By using std::min and std::max we help the compiler. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/96733 * include/bits/stl_a

[committed] libstdc++: Do not allocate a zero-size vector [PR 100153]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The vector::shrink_to_fit() implementation will allocate new storage even if the vector is empty. That then leads to the end-of-storage pointer being non-null and equal to the _M_start._M_p pointer, which means that _M_end_addr() has undefined behaviour. The fix is to stop doing a useless zero-siz

[committed] libstdc++: Use conditional noexcept in std::reverse_iterator [PR 94418]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a noexcept-specifier to each constructor and assignment operator of std::reverse_iterator so that they are noexcept when the corresponding operation on the underlying iterator is noexcept. The std::reverse_iterator class template already requires that the operations on the underlying typ

[committed] libstdc++: Add noexcept to common_iterator proxy operators

2021-10-01 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator::__arrow_proxy) (common_iterator::__postfix_proxy): Add noexcept. Tested powerpc64le-linux. Committed to trunk. commit ce709ad3dc0ed5d7ea48a116311d4441225446f0 Author: Jonathan

[committed] libstdc++: Make move ctor noexcept for fully-dynamic string

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The move constructor for the "fully-dynamic" COW string is not noexcept, because it allocates a new empty string rep for the moved-from string. However, there is no need to do that, because the moved-from string does not have to be left empty. Instead, implement move construction for the fully-dyna

[committed] libstdc++: Simplify __normal_iterator converting constructor

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This uses C++11 features to simplify the definition of the __normal_iterator constructor that allows converting from iterator to const_iterator. The previous definition relied on _Container::pointer which is present in std::vector and std::basic_string, but is not actually part of the container req

[committed] libstdc++: Allow visiting inherited variants [PR 90943]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
Implement the changes from P2162R2 (as a DR for C++17). Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/90943 * include/std/variant (__cpp_lib_variant): Update value. (__detail::__variant::__as): New helpers implementing the as-variant exposit

[committed] libstdc++: Optimize std::visit for the common case [PR 78113]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
GCC does not do a good job of optimizing the table of function pointers used for variant visitation. This avoids using the table for the common case of visiting a single variant with a small number of alternative types. Instead we use: switch(v.index()) { case 0: return visitor(get<0>(v));

[committed] libstdc++: Add utility for creating std::error_code from OS errors

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a helper function to encapsulate obtaining an error code for errors from OS calls. For Windows we want to use GetLastError() and the system error category, but otherwise just use errno and the generic error category. This should not be used to replace existing uses of ec.assign(errno, ge

  1   2   >