[COMMITTED] Add an frange(type) constructor analogous to the irange version.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * value-range.h (frange::frange): Add constructor taking type. --- gcc/value-range.h | 8 1 file changed, 8 insertions(+) diff --git a/gcc/value-range.h b/gcc/value-range.h index 07a2067898c..9d630e40f78 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -2

[COMMITTED] Disable tree to bool conversion in frange::update_nan.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
We have a set_nan(type) method which can be confused with update_nan(bool) because of the silent conversion of pointers to bool. Currently, if you call update_nan(tree), you'll set the possibility of NAN with a sign of true if tree is non-null. This is prone to error and this patch disallows this

[COMMITTED] Add default relation_kind to floating point range-op entries.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
The methods from which these derive all have a default relation_kind. This patch just adds the default, to make it easier to write unit tests later. gcc/ChangeLog: * range-op-float.cc: Add relation_kind = VREL_VARYING to all methods. --- gcc/range-op-float.cc | 80 +++

[COMMITTED] Add stubs for floating point range-op tests.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * range-op-float.cc (frange_float): New. (range_op_float_tests): New. * range-op.cc (range_op_tests): Call range_op_float_tests. --- gcc/range-op-float.cc | 26 ++ gcc/range-op.cc | 3 +++ 2 files changed, 29 insertions(+) dif

[COMMITTED] Add method to query the sign of a NAN.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
In writing some range-op entries I noticed we don't have a way to query the sign of the NAN in a range, unless the range only contains NAN, in which case you can just use frange::signbit_p. This patch adds a method that returns TRUE if there exists the possiblity of a NAN and we know its sign. gc

[PATCH V4] rs6000: cannot_force_const_mem for HIGH code rtx[PR106460]

2022-10-11 Thread Jiufu Guo via Gcc-patches
Hi, As the issue in PR106460, a rtx 'high:DI (symbol_ref:DI ("var_48")' is tried to store into constant pool and ICE occur. But actually, this rtx represents partial incomplete address and can not be put into a .rodata section. This patch updates rs6000_cannot_force_const_mem to return true for

Ping^2: [PATCH V6] rs6000: Optimize cmp on rotated 16bits constant

2022-10-11 Thread Jiufu Guo via Gcc-patches
Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600475.html BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches writes: > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600475.html > > BR, > Jeff(Jiufu) > > > Jiufu Guo writes: > >> Hi, >> >> When checking eq/ne with a

Re: [PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Iain Sandoe
> On 12 Oct 2022, at 00:19, Jason Merrill wrote: > > On 10/11/22 18:17, Iain Sandoe wrote: >> Hi Jason >>> On 11 Oct 2022, at 23:06, Jason Merrill wrote: >>> >>> On 10/11/22 17:58, Iain Sandoe wrote: Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it is set p

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Caroline Tice via Gcc-patches
On Tue, Oct 11, 2022 at 7:52 PM Lulu Cheng wrote: > > 在 2022/10/12 上午4:57, Caroline Tice 写道: > > I think that if VTV_PAGE_SIZE is not set to the actual size being used by > the system, it could result in some unexpected failures. I believe the > right thing to do in this case, since the size ma

Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.

2022-10-11 Thread Jeff Law via Gcc-patches
On 10/11/22 21:39, Kito Cheng via Gcc-patches wrote: I would suggest we do not include those header files unless we really need that. Agreed.  Policy is to include what's needed.  There's actually some scripts that will identify extraneous header includes, but I don't recall if we ever ran

Re: Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.

2022-10-11 Thread juzhe.zh...@rivai.ai
OK. I am gonna commit this with the following patches. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2022-10-12 11:39 To: juzhe.zhong CC: gcc-patches Subject: Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile. I would suggest we do not include those header files unles

Re: [PATCH] RISC-V: Refine riscv-vector-builtins.o include files and makefile.

2022-10-11 Thread Kito Cheng via Gcc-patches
I would suggest we do not include those header files unless we really need that. On Tue, Oct 11, 2022 at 2:32 PM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/riscv-vector-builtins.cc: Change include files same as > ARM SVE. > * config/riscv/t-riscv: Refine

RE: [PATCH] Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS

2022-10-11 Thread Liu, Hongtao via Gcc-patches
> -Original Message- > From: Cui, Lili > Sent: Wednesday, October 12, 2022 11:00 AM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com; Lu, Hongjiu > > Subject: [PATCH] Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS > > Hi Hontao, > > This patch is to remove AVX

[PATCH] LoongArch: Fixed a bug in the loongarch architecture of libitm package.

2022-10-11 Thread Lulu Cheng
Add a soft floating point condition to the register recovery part of the code. libitm/ChangeLog: * config/loongarch/sjlj.S: Add a soft floating point condition to the register recovery part of the code. --- libitm/config/loongarch/sjlj.S | 3 +++ 1 file changed, 3 insertions(+)

Re: [PATCH] Pass PKG_CONFIG_PATH down from top-level Makefile

2022-10-11 Thread Simon Marchi via Gcc-patches
Hi gcc-patches, I had applied the patch below to binutils-gdb, but it recently got wiped out by a gcc -> binutils-gdb configure.ac sync. Would it be possible to apply it to the gcc repo so this doesn't happen again? Thanks, Simon On 2022-03-15 17:26, Simon Marchi via Gdb-patches wrote: > From:

[PATCH] Remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS

2022-10-11 Thread Cui,Lili via Gcc-patches
Hi Hontao, This patch is to remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS. The new intel ISE removes AVX512_VP2INTERSECT from SAPPHIRERAPIDS, AVX512_VP2INTERSECT is only supportted in Tigerlake. Hi Uros, This patch is to remove AVX512_VP2INTERSECT from PTA_SAPPHIRERAPIDS. The new intel ISE

Re: [PATCH v2] Libvtv-test: Fix bug that scansarif.exp cannot be found in libvtv regression test.

2022-10-11 Thread Lulu Cheng
Pushed to r13-3241 在 2022/9/27 下午10:01, David Malcolm 写道: On Tue, 2022-09-27 at 14:02 +0800, Lulu Cheng wrote: SARIF support was added in r13-967 but libvtv wasn't updated. Sorry about breaking this. The patch looks reasonable to me, FWIW, assuming that it fixes the issue, of course!

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Lulu Cheng
在 2022/10/12 上午4:57, Caroline Tice 写道: I think that if VTV_PAGE_SIZE is not set to the actual size being used by the system,  it could result in some unexpected failures.  I believe the right thing to do in this case, since the size may vary, is to get the actual size being used by the system

Re: [PATCH] Teach vectorizer to deal with bitfield accesses (was: [RFC] Teach vectorizer to deal with bitfield reads)

2022-10-11 Thread Hongtao Liu via Gcc-patches
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107226 On Wed, Oct 12, 2022 at 9:55 AM Hongtao Liu wrote: > > This commit failed tests > > FAIL: gcc.target/i386/pr101668.c scan-assembler vpmovsxdq > FAIL: gcc.target/i386/pr101668.c scan-assembler vpmovsxdq > FAIL: gcc.target/i386/pr101668.c scan-ass

Re: [PATCH] Teach vectorizer to deal with bitfield accesses (was: [RFC] Teach vectorizer to deal with bitfield reads)

2022-10-11 Thread Hongtao Liu via Gcc-patches
This commit failed tests FAIL: gcc.target/i386/pr101668.c scan-assembler vpmovsxdq FAIL: gcc.target/i386/pr101668.c scan-assembler vpmovsxdq FAIL: gcc.target/i386/pr101668.c scan-assembler vpmovsxdq FAIL: gcc.target/i386/pr92645.c scan-tree-dump-times optimized "vec_unpack_" 4 FAIL: gcc.target/i38

Re: [PATCH v2] c++: parser - Support for target address spaces in C++

2022-10-11 Thread Jason Merrill via Gcc-patches
On 10/11/22 18:03, Paul Iannetta wrote: Thank you very much for the comments. On Mon, Oct 10, 2022 at 03:20:13PM -0400, Jason Merrill wrote: On 10/9/22 12:12, Paul Iannetta wrote: That's a nice feature! LLVM is using AS to mangle the address-name qualified types but that would have required an

[PATCH] RISC-V: Add new line at end of file.

2022-10-11 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-c.cc: Add new line. * config/riscv/riscv_vector.h (vwrite_csr): Add new line. --- gcc/config/riscv/riscv-c.cc | 2 +- gcc/config/riscv/riscv_vector.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

RE: [PATCH] [x86] Add define_insn_and_split to support general version of "kxnor".

2022-10-11 Thread Liu, Hongtao via Gcc-patches
> -Original Message- > From: Jakub Jelinek > Sent: Tuesday, October 11, 2022 9:59 PM > To: Liu, Hongtao > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] [x86] Add define_insn_and_split to support general > version of "kxnor". > > On Tue, Oct 11, 2022 at 04:03:16PM +0800, liuhongt

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Palmer Dabbelt
On Tue, 11 Oct 2022 16:31:25 PDT (-0700), Vineet Gupta wrote: On 10/11/22 13:46, Christoph Müllner wrote: On Tue, Oct 11, 2022 at 9:31 PM Palmer Dabbelt wrote: On Tue, 11 Oct 2022 12:06:27 PDT (-0700), Vineet Gupta wrote: > Hi Christoph, Kito, > > On 5/5/21 12:36, Christoph M

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Vineet Gupta
On 10/11/22 13:46, Christoph Müllner wrote: On Tue, Oct 11, 2022 at 9:31 PM Palmer Dabbelt wrote: On Tue, 11 Oct 2022 12:06:27 PDT (-0700), Vineet Gupta wrote: > Hi Christoph, Kito, > > On 5/5/21 12:36, Christoph Muellner via Gcc-patches wrote: >> This series provides a c

Re: [PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Jason Merrill via Gcc-patches
On 10/11/22 18:17, Iain Sandoe wrote: Hi Jason On 11 Oct 2022, at 23:06, Jason Merrill wrote: On 10/11/22 17:58, Iain Sandoe wrote: Tested on x86_64-darwin19, OK for master? thanks Iain -- >8 -- Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it is set properly on targe

Re: [RFC] Add support for vectors in comparisons (like the C++ frontend does)

2022-10-11 Thread Paul Iannetta via Gcc-patches
On Mon, Oct 10, 2022 at 11:07:06PM +, Joseph Myers wrote: > On Mon, 10 Oct 2022, Paul Iannetta via Gcc-patches wrote: > > > I have a patch to bring this feature to the C front-end as well, and > > would like to hear your opinion on it, especially since it may affect > > the feature-set of the

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Jeff Law via Gcc-patches
On 10/11/22 13:31, Palmer Dabbelt wrote: On Tue, 11 Oct 2022 12:06:27 PDT (-0700), Vineet Gupta wrote: Hi Christoph, Kito, On 5/5/21 12:36, Christoph Muellner via Gcc-patches wrote: This series provides a cleanup of the current atomics implementation of RISC-V: * PR100265: Use proper fences

[PATCH] Fix emit_group_store regression on big-endian

2022-10-11 Thread Eric Botcazou via Gcc-patches
Hi, the recent optimization implemented for complex modes in: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595865.html contains an oversight for big-endian platforms in the "interesting corner case" mentioned in the message: it uses a lowpart SUBREG when the integer modes have different

[Ada] Enable support for atomic primitives on SPARC/Linux

2022-10-11 Thread Eric Botcazou via Gcc-patches
The SPARC/Linux port is very similar to the SPARC/Solaris port nowadays so it makes sense to copy the setting of the support for atomic primitives. This fixes the single regression in the gnat.dg testsuite: FAIL: gnat.dg/prot7.adb (test for excess errors) Tested on SPARC64/Linux, applied on the

Re: [PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Iain Sandoe
Hi Jason > On 11 Oct 2022, at 23:06, Jason Merrill wrote: > > On 10/11/22 17:58, Iain Sandoe wrote: >> Tested on x86_64-darwin19, OK for master? >> thanks >> Iain >> -- >8 -- >> Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it >> is set properly on target exprs. The code

Re: [PATCH v2 2/3] doc: -falign-functions is ignored under -Os

2022-10-11 Thread Eric Gallager via Gcc-patches
On Tue, Oct 11, 2022 at 5:03 PM Palmer Dabbelt wrote: > > This is implicitly mentioned in the docs, but there were some questions > in a recent patch. This makes it more exlicit that -falign-functions is > meant to be ignored under -Os. > > gcc/doc/ChangeLog > > * invoke.texi (-falign-fun

Re: [PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Jason Merrill via Gcc-patches
On 10/11/22 17:58, Iain Sandoe wrote: Tested on x86_64-darwin19, OK for master? thanks Iain -- >8 -- Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it is set properly on target exprs. The code here has a mixture of APIs used to build inits. This patch changes that to us

Re: [PATCH v2] c++: parser - Support for target address spaces in C++

2022-10-11 Thread Paul Iannetta via Gcc-patches
Thank you very much for the comments. On Mon, Oct 10, 2022 at 03:20:13PM -0400, Jason Merrill wrote: > On 10/9/22 12:12, Paul Iannetta wrote: > > That's a nice feature! LLVM is using AS to mangle the > > address-name qualified types but that would have required an update of > > libiberty's demangl

[PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin19, OK for master? thanks Iain -- >8 -- Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it is set properly on target exprs. The code here has a mixture of APIs used to build inits. This patch changes that to use cp_build_init_expr() where possible, s

[PATCH v2 2/3] doc: -falign-functions is ignored under -Os

2022-10-11 Thread Palmer Dabbelt
This is implicitly mentioned in the docs, but there were some questions in a recent patch. This makes it more exlicit that -falign-functions is meant to be ignored under -Os. gcc/doc/ChangeLog * invoke.texi (-falign-functions): Mention -Os --- gcc/doc/invoke.texi | 3 ++- 1 file changed

Re: [PATCH] doc: -falign-functions doesn't override the __attribute__((align(N)))

2022-10-11 Thread Palmer Dabbelt
On Sun, 09 Oct 2022 23:07:21 PDT (-0700), richard.guent...@gmail.com wrote: On Fri, Oct 7, 2022 at 3:50 PM Palmer Dabbelt wrote: I found this when reading the documentation for Kito's recent patch. From the discussion it sounds like this is the desired behavior, so let's document it. Maybe a

[PATCH v2 3/3] doc: -falign-functions is ignored for cold/size-optimized functions

2022-10-11 Thread Palmer Dabbelt
gcc/doc/ChangeLog * invoke.texi (-falign-functions): Mention cold/size-optimized functions. --- gcc/doc/invoke.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a24798d5029..6af18ae9bfd 100644 --- a/gcc/doc/i

[PATCH v2 0/3] doc: -falign-functions improvements

2022-10-11 Thread Palmer Dabbelt
There were some recent discussions about the desired behavior of -falign-functions, which is behaving as desired. This improves the documentation to make that explicit. Change since v1 <20221007134901.5078-1-pal...@rivosinc.com>: * New patch 2 and 3

[PATCH v2 1/3] doc: -falign-functions doesn't override the __attribute__((align(N)))

2022-10-11 Thread Palmer Dabbelt
I found this when reading the documentation for Kito's recent patch. >From the discussion it sounds like this is the desired behavior, so let's document it. gcc/doc/ChangeLog * invoke.texi (-falign-functions): Mention __align__ --- gcc/doc/invoke.texi | 4 +++- 1 file changed, 3 insertio

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Caroline Tice via Gcc-patches
I think that if VTV_PAGE_SIZE is not set to the actual size being used by the system, it could result in some unexpected failures. I believe the right thing to do in this case, since the size may vary, is to get the actual size being used by the system and use that in the definition of VTV_PAGE_S

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Christoph Müllner via Gcc-patches
On Tue, Oct 11, 2022 at 9:31 PM Palmer Dabbelt wrote: > On Tue, 11 Oct 2022 12:06:27 PDT (-0700), Vineet Gupta wrote: > > Hi Christoph, Kito, > > > > On 5/5/21 12:36, Christoph Muellner via Gcc-patches wrote: > >> This series provides a cleanup of the current atomics implementation > >> of RISC-V

Re: [PATCH] c++: ICE with VEC_INIT_EXPR and defarg [PR106925]

2022-10-11 Thread Jason Merrill via Gcc-patches
On 10/11/22 16:00, Marek Polacek wrote: Since r12-8066, in cxx_eval_vec_init we perform expand_vec_init_expr while processing the default argument in this test. Hmm, why are we calling cxx_eval_vec_init during parsing of the default argument? In particular, any expansion that depends on the e

[PATCH] Fortran: check types of operands of arithmetic binary operations [PR107217]

2022-10-11 Thread Harald Anlauf via Gcc-patches
Dear all, we need to check that the operands of arithmetic binary operations are consistent and of numeric type. The PR reported an issue for multiplication ("*"), but we better extend this to the other binary operations. I chose the following solution: - consistent types for +,-,*,/, keeping an

Re: [PATCH] Fortran: check types of source expressions before conversion [PR107215]

2022-10-11 Thread Mikael Morin
Le 11/10/2022 à 20:47, Harald Anlauf via Fortran a écrit : Dear all, this PR is an obvious followup to PR107000, where invalid types appeared in array constructors and lead to an ICE either in a conversion or reduction of a unary or binary expression. The present PR shows that several other con

Re: [PATCH v5] c-family: ICE with [[gnu::nocf_check]] [PR106937]

2022-10-11 Thread Marek Polacek via Gcc-patches
On Tue, Oct 11, 2022 at 09:40:45AM +0200, Andreas Schwab via Gcc-patches wrote: > On Okt 10 2022, Marek Polacek via Gcc-patches wrote: > > > diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c > > b/gcc/testsuite/c-c++-common/pointer-to-fn1.c > > new file mode 100644 > > index 000..9

[PATCH] c++: ICE with VEC_INIT_EXPR and defarg [PR106925]

2022-10-11 Thread Marek Polacek via Gcc-patches
Since r12-8066, in cxx_eval_vec_init we perform expand_vec_init_expr while processing the default argument in this test. At this point start_preparsed_function hasn't yet set current_function_decl. expand_vec_init_expr then leads to maybe_splice_retval_cleanup which checks DECL_CONSTRUCTOR_P (curr

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 19:58, Jonathan Wakely wrote: > > > > On Tue, 11 Oct 2022, 19:38 David Edelsohn via Libstdc++, > wrote: >> >> This patch seems to have broken bootstrap on AIX. It seems to assume >> methods that aren't guaranteed to be defined. > > > > It doesn't use anything that wasn't a

Re: [PATCH] libstdc++: Implement ranges::repeat_view from P2474R2

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 03:51, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? (The paper > also makes changes to views::take and views::drop, which will be > implemented separately.) OK, thanks.

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Palmer Dabbelt
On Tue, 11 Oct 2022 12:06:27 PDT (-0700), Vineet Gupta wrote: Hi Christoph, Kito, On 5/5/21 12:36, Christoph Muellner via Gcc-patches wrote: This series provides a cleanup of the current atomics implementation of RISC-V: * PR100265: Use proper fences for atomic load/store * PR100266: Provide p

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-11 Thread Vineet Gupta
Hi Christoph, Kito, On 5/5/21 12:36, Christoph Muellner via Gcc-patches wrote: This series provides a cleanup of the current atomics implementation of RISC-V: * PR100265: Use proper fences for atomic load/store * PR100266: Provide programmatic implementation of CAS As both are very related, I

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022, 19:38 David Edelsohn via Libstdc++, < libstd...@gcc.gnu.org> wrote: > This patch seems to have broken bootstrap on AIX. It seems to assume > methods that aren't guaranteed to be defined. > It doesn't use anything that wasn't already used by that file. I have no idea how it

Re: [PATCH v2] btf: Add support to BTF_KIND_ENUM64 type

2022-10-11 Thread Indu Bhagat via Gcc-patches
Hi Guillermo, On 10/3/22 7:39 AM, Guillermo E. Martinez via Gcc-patches wrote: diff --git a/gcc/ctfc.cc b/gcc/ctfc.cc index 9773358a475..253c36b6a0a 100644 --- a/gcc/ctfc.cc +++ b/gcc/ctfc.cc @@ -604,6 +604,7 @@ ctf_add_enum (ctf_container_ref ctfc, uint32_t flag, const char * name,     gcc_as

[PATCH] Fortran: check types of source expressions before conversion [PR107215]

2022-10-11 Thread Harald Anlauf via Gcc-patches
Dear all, this PR is an obvious followup to PR107000, where invalid types appeared in array constructors and lead to an ICE either in a conversion or reduction of a unary or binary expression. The present PR shows that several other conversions need to be protected by a check of the type of the s

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread David Edelsohn via Gcc-patches
This patch seems to have broken bootstrap on AIX. It seems to assume methods that aren't guaranteed to be defined. Thanks, David libtool: compile: /tmp/GCC/./gcc/xgcc -B/tmp/GCC/./gcc/ -B/nasfarm/edelsohn/ins tall/GCC/powerpc-ibm-aix7.2.5.0/bin/ -B/nasfarm/edelsohn/install/GCC/powerpc-ibm -aix7

Re: [PATCH] middle-end IFN_ASSUME support [PR106654]

2022-10-11 Thread Andrew MacLeod via Gcc-patches
On 10/10/22 04:54, Jakub Jelinek via Gcc-patches wrote: Hi! My earlier patches gimplify the simplest non-side-effects assumptions into if (cond) ; else __builtin_unreachable (); and throw the rest on the floor. The following patch attempts to do something with the rest too. For -O0, it actuall

Re: [PATCH] c++ modules: ICE with templated friend and std namespace [PR100134]

2022-10-11 Thread Nathan Sidwell via Gcc-patches
On 10/11/22 11:35, Patrick Palka wrote: IIUC the function depset::hash::add_binding_entity has an assert verifying that if a namespace contains an exported entity, then the namespace must have been opened in the module purview: if (data->hash->add_namespace_entities (decl, data->partitions))

Re: [PATCH] Use cxx11 abi in versioned namespace

2022-10-11 Thread François Dumont via Gcc-patches
Hi     Now that pretty printer is fixed (once patch validated) I'd like to propose this patch again.     Note that I'am adding a check on pretty printer with a std::any on a std::wstring. I did so because of the FIXME in printers.py which is dealing with 'std::string' explicitely. Looks like

Re: [PATCH] c++ modules: lazy loading from within template [PR99377]

2022-10-11 Thread Nathan Sidwell via Gcc-patches
On 10/11/22 10:58, Patrick Palka wrote: On Mon, 10 Oct 2022, Nathan Sidwell wrote: On 10/4/22 13:36, Patrick Palka wrote: Here when lazily loading the binding for f at parse time from the template g, processing_template_decl is set and thus the call to note_vague_linkage_fn from module_state::

[PATCH] testsuite: Only run -fcf-protection test on i?86/x86_64 [PR107213]

2022-10-11 Thread Marek Polacek via Gcc-patches
This test fails on non-i?86/x86_64 targets because on those targets we get error: '-fcf-protection=full' is not supported for this target so this patch limits where the test is run. Tested on x86_64-pc-linux-gnu, ok for trunk? gcc/testsuite/ChangeLog: * c-c++-common/pointer-to-fn1.c:

[PATCH] c++ modules: ICE with templated friend and std namespace [PR100134]

2022-10-11 Thread Patrick Palka via Gcc-patches
IIUC the function depset::hash::add_binding_entity has an assert verifying that if a namespace contains an exported entity, then the namespace must have been opened in the module purview: if (data->hash->add_namespace_entities (decl, data->partitions)) { /* It contains an exported thin

Re: [PATCH v3] libstdc++: fix pointer type exception catch [PR105387]

2022-10-11 Thread Jakob Hasse via Gcc-patches
Hello, is there any update regarding the patch PR105387 for bug 105387? We've been waiting for some time now, but the bugzilla bug is still open: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105387. If there is any issue with the patch (besides the ones we discussed before), please let us know.

Re: [PATCH] c++ modules: lazy loading from within template [PR99377]

2022-10-11 Thread Patrick Palka via Gcc-patches
On Mon, 10 Oct 2022, Nathan Sidwell wrote: > On 10/4/22 13:36, Patrick Palka wrote: > > Here when lazily loading the binding for f at parse time from the > > template g, processing_template_decl is set and thus the call to > > note_vague_linkage_fn from module_state::read_cluster has no effect, >

Re: [PATCH] Avoid calling tracer.trailer() twice.

2022-10-11 Thread Andrew MacLeod via Gcc-patches
perfect. On 10/11/22 10:08, Aldy Hernandez wrote: Sure. OK? Aldy On Tue, Oct 11, 2022 at 3:11 PM Andrew MacLeod wrote: It probably should just be changed to a print if it doesn't return.. something like if (idx && res) { tracer.print (idx, "logical_combine produced"); r.dump

Re: [PATCH 2/5] [gfortran] Translate allocate directive (OpenMP 5.0).

2022-10-11 Thread Tobias Burnus
On 11.10.22 16:15, Jakub Jelinek wrote: I think the most common case is: integer, allocatable :: var(:) !$omp allocators allocator(my_alloc) ! must be in same scope as decl of 'var' ... ! optionally: deallocate(var) end ! of scope: block/subroutine/... - automatic deallocation So you talk her

Re: [PATCH 2/5] [gfortran] Translate allocate directive (OpenMP 5.0).

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 11, 2022 at 04:15:25PM +0200, Jakub Jelinek wrote: > Well, it can use a weak symbol, if not linked against libgomp, the bit > that it is OpenMP shouldn't be set and so realloc/free will be used > and do > if (arrdescr.gomp_alloced_bit) > GOMP_free (arrdescr.data, 0); > else >

Re: [PATCH 2/5] [gfortran] Translate allocate directive (OpenMP 5.0).

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 11, 2022 at 03:22:02PM +0200, Tobias Burnus wrote: > Hi Jakub, > > On 11.10.22 14:24, Jakub Jelinek wrote: > > There is another issue besides what I wrote in my last review, > and I'm afraid I don't know what to do about it, hoping Tobias > has some ideas. > The problem is that withou

Re: [PATCH] Avoid calling tracer.trailer() twice.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
Sure. OK? Aldy On Tue, Oct 11, 2022 at 3:11 PM Andrew MacLeod wrote: > > It probably should just be changed to a print if it doesn't return.. > something like > > if (idx && res) >{ > tracer.print (idx, "logical_combine produced"); > r.dump (dump_file); > fputc ('\n', dump_fil

Re: [PATCH 1/2] gcov: test switch/break line counts

2022-10-11 Thread Michael Matz via Gcc-patches
Hello, On Tue, 11 Oct 2022, Jørgen Kvalsvik wrote: > I apologise for the confusion. The diff there is not a part of the > change itself (note the indentation) but rather a way to reproduce, Ah! Thanks, that explains it, sorry for adding confusion on top :-) Ciao, Michael.

Re: [PATCH] [x86] Add define_insn_and_split to support general version of "kxnor".

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 11, 2022 at 04:03:16PM +0800, liuhongt via Gcc-patches wrote: > gcc/ChangeLog: > > * config/i386/i386.md (*notxor_1): New post_reload > define_insn_and_split. > (*notxorqi_1): Ditto. > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -10826,6 +10826

Re: [PATCH 1/2] gcov: test switch/break line counts

2022-10-11 Thread Jørgen Kvalsvik via Gcc-patches
On 11/10/2022 15:55, Michael Matz wrote: > Hello, > > On Tue, 11 Oct 2022, Jørgen Kvalsvik via Gcc-patches wrote: > >> The coverage support will under some conditions decide to split edges to >> accurately report coverage. By running the test suite with/without this >> edge splitting a small diff

Re: [COMMITTED] Implement op1_range operators for unordered comparisons.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
I forgot to mention. These were lifted from the integer counterparts. Most of the code is the same, as the build_{cond} code in the frange version will add the appropriate NAN (unless -ffinite-math-only), and all we have to do is clear it on the false edge. Aldy On Tue, Oct 11, 2022 at 3:51 PM A

Re: [PATCH 1/2] gcov: test switch/break line counts

2022-10-11 Thread Michael Matz via Gcc-patches
Hello, On Tue, 11 Oct 2022, Jørgen Kvalsvik via Gcc-patches wrote: > The coverage support will under some conditions decide to split edges to > accurately report coverage. By running the test suite with/without this > edge splitting a small diff shows up, addressed by this patch, which > should c

[COMMITTED] Implement op1_range operators for unordered comparisons.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * range-op-float.cc (foperator_unordered_le::op1_range): New. (foperator_unordered_le::op2_range): New. (foperator_unordered_gt::op1_range): New. (foperator_unordered_gt::op2_range): New. (foperator_unordered_ge::op1_range): New. (fope

[COMMITTED] Implement ABS_EXPR operator for frange.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
Implementing ABS_EXPR allows us to fold certain __builtin_inf calls since they are expanded into calls to involving ABS_EXPR. This is an adaptation of the integer version. gcc/ChangeLog: * range-op-float.cc (class foperator_abs): New. (floating_op_table::floating_op_table): Add A

[COMMITTED] Share common ordered comparison code with UN*_EXPR.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
Most unordered comparisons can use the result from the ordered version, if the operands are known not to be NAN or if the result is true. gcc/ChangeLog: * range-op-float.cc (class foperator_unordered_lt): New. (class foperator_relop_unknown): Remove (class foperator_unorde

[COMMITTED] Move TRUE case first in range-op.cc.

2022-10-11 Thread Aldy Hernandez via Gcc-patches
It's incredibly annoying that some of the BRS_TRUE cases come after BRS_FALSE, if only because we're not consistent. Having random ordering increases the changes of thinkos when adapting the irange code to floats. gcc/ChangeLog: * range-op.cc (operator_equal::op1_range): Move BRS_TRUE ca

[PATCH] middle-end, v2: IFN_ASSUME support [PR106654]

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 10, 2022 at 11:19:24PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Mon, Oct 10, 2022 at 05:09:29PM -0400, Jason Merrill wrote: > > On 10/10/22 04:54, Jakub Jelinek via Gcc-patches wrote: > > > My earlier patches gimplify the simplest non-side-effects assumptions > > > into if (cond

Re: [PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing

2022-10-11 Thread Alexandre Oliva via Gcc-patches
On Oct 11, 2022, Richard Biener wrote: > On Tue, Oct 11, 2022 at 1:57 PM Alexandre Oliva wrote: >> >> On Oct 10, 2022, Richard Biener wrote: >> >> > As noted in the Cauldron Discussion I think you should do all >> > instrumentation post-IPA only to simplify your life not needing to >> > handl

[PATCH] c++: Implement excess precision support for C++ [PR107097, PR323]

2022-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements excess precision support for C++. Like for C, it uses EXCESS_PRECISION_EXPR tree to say that its operand is evaluated in excess precision and what the semantic type of the expression is. In most places I've followed what the C FE does in similar spots, so e.g. fo

Re: Adding a new thread model to GCC

2022-10-11 Thread LIU Hao via Gcc-patches
在 2022-10-10 23:56, LIU Hao 写道: 在 2022-10-04 20:44, LIU Hao 写道: Attached are revised patches. These are exported from trunk. Revised further. The patch for libgfortran has been committed to trunk today, so I include only the other two.   * In the second patch, a space character has been i

Re: [PATCH 2/5] [gfortran] Translate allocate directive (OpenMP 5.0).

2022-10-11 Thread Tobias Burnus
Hi Jakub, On 11.10.22 14:24, Jakub Jelinek wrote: There is another issue besides what I wrote in my last review, and I'm afraid I don't know what to do about it, hoping Tobias has some ideas. The problem is that without the allocate-stmt associated allocate directive, Fortran allocatables are ea

Re: [PATCH] Avoid calling tracer.trailer() twice.

2022-10-11 Thread Andrew MacLeod via Gcc-patches
It probably should just be changed to a print if it doesn't return.. something like if (idx && res) { tracer.print (idx, "logical_combine produced"); r.dump (dump_file); fputc ('\n', dump_file); } Andrew On 10/10/22 14:58, Aldy Hernandez wrote: [Andrew, you OK with this? I c

[PATCH 2/2] gcov: test line count for label in then/else block

2022-10-11 Thread Jørgen Kvalsvik via Gcc-patches
Add a test to catch regression in line counts for labels on top of then/else blocks. Only the 'goto ' should contribute to the line counter for the label, not the if. gcc/testsuite/ChangeLog: * gcc.misc-tests/gcov-4.c: --- gcc/testsuite/gcc.misc-tests/gcov-4.c | 26 ++

[PATCH 1/2] gcov: test switch/break line counts

2022-10-11 Thread Jørgen Kvalsvik via Gcc-patches
The coverage support will under some conditions decide to split edges to accurately report coverage. By running the test suite with/without this edge splitting a small diff shows up, addressed by this patch, which should catch future regressions. Removing the edge splitting: $ diff --git a/gc

Re: [PATCH 2/5] [gfortran] Translate allocate directive (OpenMP 5.0).

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 13, 2022 at 02:53:17PM +, Hafiz Abid Qadeer wrote: > gcc/fortran/ChangeLog: > > * trans-openmp.c (gfc_trans_omp_clauses): Handle OMP_LIST_ALLOCATOR. > (gfc_trans_omp_allocate): New function. > (gfc_trans_omp_directive): Handle EXEC_OMP_ALLOCATE. > > gcc/ChangeLog

Re: [PATCH 1/5] [gfortran] Add parsing support for allocate directive (OpenMP 5.0).

2022-10-11 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 13, 2022 at 02:53:16PM +, Hafiz Abid Qadeer wrote: > Currently we only make use of this directive when it is associated > with an allocate statement. Sorry for the delay. I'll start with a comment that allocate directive in 5.0/5.1 for Fortran is a complete mess that has been fixe

Re: [PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing

2022-10-11 Thread Richard Biener via Gcc-patches
On Tue, Oct 11, 2022 at 1:57 PM Alexandre Oliva wrote: > > On Oct 10, 2022, Richard Biener wrote: > > > As noted in the Cauldron Discussion I think you should do all > > instrumentation post-IPA only to simplify your life not needing to > > handle inlining of instrumentation > > I looked a bit in

Re: [committed 0/6] amdgcn: Add V32, V16, V8, V4, and V2 vectors

2022-10-11 Thread Richard Biener via Gcc-patches
On Tue, Oct 11, 2022 at 1:53 PM Andrew Stubbs wrote: > > On 11/10/2022 12:29, Richard Biener wrote: > > On Tue, Oct 11, 2022 at 1:03 PM Andrew Stubbs wrote: > >> > >> This patch series adds additional vector sizes for the amdgcn backend. > >> > >> The hardware supports any arbitrary vector length

Re: [PATCH v2 00/10] Introduce strub: machine-independent stack scrubbing

2022-10-11 Thread Alexandre Oliva via Gcc-patches
On Oct 10, 2022, Richard Biener wrote: > As noted in the Cauldron Discussion I think you should do all > instrumentation post-IPA only to simplify your life not needing to > handle inlining of instrumentation I looked a bit into that after the Cauldron, and recalled why I wanted to instrument be

Re: [committed 0/6] amdgcn: Add V32, V16, V8, V4, and V2 vectors

2022-10-11 Thread Andrew Stubbs
On 11/10/2022 12:29, Richard Biener wrote: On Tue, Oct 11, 2022 at 1:03 PM Andrew Stubbs wrote: This patch series adds additional vector sizes for the amdgcn backend. The hardware supports any arbitrary vector length up to 64-lanes via masking, but GCC cannot (yet) make full use of them due t

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-11 Thread Ben Boeckel via Gcc-patches
On Mon, Oct 10, 2022 at 17:04:09 -0400, Jason Merrill wrote: > On 10/4/22 11:12, Ben Boeckel wrote: > > This patch implements support for [P1689R5][] to communicate to a build > > system the C++20 module dependencies to build systems so that they may > > build `.gcm` files in the proper order. > >

libiberty: Demangling 'M' prefixes

2022-10-11 Thread Nathan Sidwell via Gcc-patches
The grammar for a lambda context can include 'M', and we were adding the component that generated to the substitution table twice. Just ignore the 'M' completely -- we'll already have done the checks we need when we saw its predecessor. A prefix cannot be the last component of a nested name, s

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Richard Biener via Gcc-patches
On Tue, Oct 11, 2022 at 1:06 PM Jonathan Wakely wrote: > > On Tue, 11 Oct 2022 at 07:41, Richard Biener > wrote: > > > > On Mon, Oct 10, 2022 at 5:10 PM Jonathan Wakely wrote: > > > > > > On Mon, 10 Oct 2022 at 12:17, Jonathan Wakely wrote: > > > > > > > > On Mon, 10 Oct 2022 at 07:18, Richard

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-11 Thread Ben Boeckel via Gcc-patches
On Tue, Oct 04, 2022 at 21:12:03 +0200, Harald Anlauf wrote: > Am 04.10.22 um 17:12 schrieb Ben Boeckel: > > This patch implements support for [P1689R5][] to communicate to a build > > system the C++20 module dependencies to build systems so that they may > > build `.gcm` files in the proper order.

Re: [committed 0/6] amdgcn: Add V32, V16, V8, V4, and V2 vectors

2022-10-11 Thread Richard Biener via Gcc-patches
On Tue, Oct 11, 2022 at 1:03 PM Andrew Stubbs wrote: > > This patch series adds additional vector sizes for the amdgcn backend. > > The hardware supports any arbitrary vector length up to 64-lanes via > masking, but GCC cannot (yet) make full use of them due to middle-end > limitations. Adding sm

Re: [PATCH 2/2] Split edge when edge locus and dest don't match

2022-10-11 Thread Richard Biener via Gcc-patches
On Tue, Oct 11, 2022 at 12:57 PM Jørgen Kvalsvik wrote: > > On 07/10/2022 13:45, Jørgen Kvalsvik wrote: > > On 07/10/2022 08:53, Richard Biener wrote: > >> On Thu, Oct 6, 2022 at 4:28 PM Jørgen Kvalsvik > >> wrote: > >>> > >>> On 06/10/2022 10:12, Richard Biener wrote: > On Wed, Oct 5, 2022

[PATCH] tree-optimization/107212 - SLP reduction of reduction paths

2022-10-11 Thread Richard Biener via Gcc-patches
The following fixes an issue with how we handle epilogue generation for SLP reductions of reduction paths where the actual live lanes are not "canonical". We need to make sure to identify all live lanes as reductions and thus have to iterate over all participating SLP lanes when walking the reduct

Re: [Patch][v5] libgomp/nvptx: Prepare for reverse-offload callback handling

2022-10-11 Thread Alexander Monakov
On Tue, 11 Oct 2022, Jakub Jelinek wrote: > So, does this mean one has to have gcc configured --with-arch=sm_70 > or later to make reverse offloading work (and then on the other > side no support for older PTX arches at all)? > If yes, I was kind of hoping we could arrange for it to be more > user

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 07:41, Richard Biener wrote: > > On Mon, Oct 10, 2022 at 5:10 PM Jonathan Wakely wrote: > > > > On Mon, 10 Oct 2022 at 12:17, Jonathan Wakely wrote: > > > > > > On Mon, 10 Oct 2022 at 07:18, Richard Biener > > > wrote: > > > > > > > > On Fri, Oct 7, 2022 at 5:55 PM Jonat

  1   2   >