Re: [PATCH] Fortran: reject module variable as character length in PARAMETER [PR104349]

2023-04-03 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, OK for mainline. It is sufficiently small that, if there is any fallout in the next weeks, it can easily be reverted without great impact. Thanks for the patch. Paul On Mon, 3 Apr 2023 at 20:46, Harald Anlauf via Fortran wrote: > Dear all, > > the attached patch fixes an ICE-on-in

[PATCH] testsuite: Adjust powerpc test case pr83677.c for BE [PR108815]

2023-04-03 Thread Kewen.Lin via Gcc-patches
Hi, The test case gcc.target/powerpc/pr83677.c was written for LE environment, this patch is to make it work on BE as well. Tested on BE and LE well, I'm going to push this soon if no objections. BR, Kewen - PR testsuite/108815 gcc/testsuite/ChangeLog: * gcc.target/powerpc/

Re: [PATCH] rs6000: Fix vector_set_var_p9 by considering BE [PR108807]

2023-04-03 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2023/4/3 19:44, Segher Boessenkool wrote: > Hi! > > On Fri, Feb 17, 2023 at 05:55:04PM +0800, Kewen.Lin wrote: >> As PR108807 exposes, the current handling in function >> rs6000_expand_vector_set_var_p9 doesn't take care of big >> endianness. Currently the f

[PATCH] Check hard_regno_mode_ok before setting lowest memory move cost for the mode with different reg classes.

2023-04-03 Thread liuhongt via Gcc-patches
There's a potential performance issue when backend returns some unreasonable value for the mode which can be never be allocate with reg class. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk(or GCC14 stage1)? gcc/ChangeLog: PR rtl-optimization/109351 * ira.

[pushed] c++: friend template matching [PR107484]

2023-04-03 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Here friend matching tries to find a matching non-template friend and fails, so we mark the friend as a template specialization to be determined later. Then cplus_decl_attributes tries again to find a matching function and gets confused by D

Re: [GCC14 PATCH] LoongArch: Optimize additions with immediates

2023-04-03 Thread Lulu Cheng
/* snip */ diff --git a/gcc/testsuite/gcc.target/loongarch/add-const.c b/gcc/testsuite/gcc.target/loongarch/add-const.c new file mode 100644 index 000..3a9f72fe83d --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/add-const.c @@ -0,0 +1,47 @@ +/* { dg-do compile } */ +/* { dg-opt

Re: [PATCH v2] RISC-V: Add Z*inx imcompatible check in gcc.

2023-04-03 Thread Hans-Peter Nilsson
On Tue, 28 Mar 2023, Jiawei wrote: > + // Zfinx is conflict with float extensions. > + if (TARGET_ZFINX && TARGET_HARD_FLOAT) > +error ("z*inx is conflict with float extensions"); > + While I'm not a native English speaker, "is conflict with" doesn't sound grammatically correct. Perhaps "

Re: [PATCH] tree-optimization/109304 - properly handle instrumented aliases

2023-04-03 Thread Jan Hubicka via Gcc-patches
> On Tue, 28 Mar 2023, Richard Biener wrote: > > > When adjusting calls to reflect instrumentation we failed to handle > > calls to aliases since they appear to have no body. Instead resort > > to symtab node availability. The patch also avoids touching > > internal function calls in a more obvi

Re: [PATCH 3/3] Fortran: Fix mpz and mpfr memory leaks

2023-04-03 Thread Bernhard Reutner-Fischer via Gcc-patches
On 3 April 2023 21:50:49 CEST, Harald Anlauf wrote: >Hi Bernhard, > >there is neither context nor a related PR with a testcase showing >that this patch fixes issues seen there. Yes, i forgot to mention the PR: PR fortran/68800 I did not construct individual test cases but it should be obvious t

Re: [PATCH] c++: satisfaction and ARGUMENT_PACK_SELECT [PR105644]

2023-04-03 Thread Jason Merrill via Gcc-patches
On 4/3/23 10:49, Patrick Palka wrote: This testcase demonstrates we can legitimately enter satisfaction with an ARGUMENT_PACK_SELECT argument, which is problematic because we can't store such arguments in the satisfaction cache (or any other hash table). Since this appears to be possible only du

Re: [PATCH] c++: ICE on loopy var tmpl auto deduction [PR109300]

2023-04-03 Thread Jason Merrill via Gcc-patches
On 4/3/23 12:28, Patrick Palka wrote: On Wed, 29 Mar 2023, Jason Merrill wrote: On 3/28/23 13:37, Patrick Palka wrote: Now that we resolve non-dependent variable template-ids ahead of time, cp_finish_decl needs to handle a new invalid situation: we can end up trying to instantiate a variable t

[PATCH] range-op-float: Fix reverse ops of comparisons [PR109386]

2023-04-03 Thread Jakub Jelinek via Gcc-patches
Hi! I've missed one of my recent range-op-float.cc changes (likely the r13-6967 one) caused FAIL: libphobos.phobos/std/math/algebraic.d execution test FAIL: libphobos.phobos_shared/std/math/algebraic.d execution test regressions, distilled into a C testcase below. In the testcase, we have !(u >=

Re: [PATCH 3/3] Fortran: Fix mpz and mpfr memory leaks

2023-04-03 Thread Harald Anlauf via Gcc-patches
Hi Bernhard, there is neither context nor a related PR with a testcase showing that this patch fixes issues seen there. On 4/2/23 17:05, Bernhard Reutner-Fischer via Gcc-patches wrote: From: Bernhard Reutner-Fischer Cc: fort...@gcc.gnu.org gcc/fortran/ChangeLog: * array.cc (gfc_ref_

[PATCH] Fortran: reject module variable as character length in PARAMETER [PR104349]

2023-04-03 Thread Harald Anlauf via Gcc-patches
Dear all, the attached patch fixes an ICE-on-invalid for a PARAMETER expression where the character length was a MODULE variable. The ICE seemed strange, as we were catching related erroneous code for declarations in programs or subroutines. Removing a seemingly bogus check of restricted express

[PATCH] Less warnings for parameters declared as arrays [PR98541, PR98536]

2023-04-03 Thread Martin Uecker via Gcc-patches
With the relatively new warnings (11..) affecting VLA bounds, I now get a lot of false positives with -Wall. In general, I find the new warnings very useful, but they seem a bit too aggressive and some minor tweaks are needed, otherwise they are too noisy. This patch suggests two changes: 1. F

Re: [aarch64] Code-gen for vector initialization involving constants

2023-04-03 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 13 Feb 2023 at 11:58, Prathamesh Kulkarni wrote: > > On Fri, 3 Feb 2023 at 12:46, Prathamesh Kulkarni > wrote: > > > > Hi Richard, > > While digging thru aarch64_expand_vector_init, I noticed it gives > > priority to loading a constant first: > > /* Initialise a vector which is part-vari

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2023-04-03 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 13 Mar 2023 at 13:03, Richard Biener wrote: > > On Fri, 10 Mar 2023, Richard Sandiford wrote: > > > Sorry for the slow reply. > > > > Prathamesh Kulkarni writes: > > > Unfortunately it regresses code-gen for the following case: > > > > > > svint32_t f(int32x4_t x) > > > { > > > return s

Re: [PATCH] c++: ICE on loopy var tmpl auto deduction [PR109300]

2023-04-03 Thread Patrick Palka via Gcc-patches
On Wed, 29 Mar 2023, Jason Merrill wrote: > On 3/28/23 13:37, Patrick Palka wrote: > > Now that we resolve non-dependent variable template-ids ahead of time, > > cp_finish_decl needs to handle a new invalid situation: we can end up > > trying to instantiate a variable template with deduced return

[og12] '-foffload-memory=pinned' using offloading device interfaces (was: -foffload-memory=pinned)

2023-04-03 Thread Thomas Schwinge
Hi! On 2023-02-13T15:20:07+, Andrew Stubbs wrote: > On 13/02/2023 14:38, Thomas Schwinge wrote: >> On 2022-03-08T11:30:55+, Hafiz Abid Qadeer >> wrote: >>> From: Andrew Stubbs >>> >>> Add a new option. It will be used in follow-up patches. >> >>> --- a/gcc/doc/invoke.texi >>> +++ b/gc

[PATCH] c++: satisfaction and ARGUMENT_PACK_SELECT [PR105644]

2023-04-03 Thread Patrick Palka via Gcc-patches
This testcase demonstrates we can legitimately enter satisfaction with an ARGUMENT_PACK_SELECT argument, which is problematic because we can't store such arguments in the satisfaction cache (or any other hash table). Since this appears to be possible only during constrained auto deduction for a re

[og12] OpenACC: Pass pre-allocated 'ptrblock' to 'goacc_noncontig_array_create_ptrblock' [PR76739] (was: [PATCH, OpenACC, v3] Non-contiguous array support for OpenACC data clauses)

2023-04-03 Thread Thomas Schwinge
Hi! On 2019-11-26T22:49:21+0800, Chung-Lin Tang wrote: > this is a reorg of the last non-contiguous arrays patch. (Sorry, this is still not the master branch integration email...) Just a small clean-up, to simplify other changes that I'm working on: On 2019-11-26T22:49:21+0800, Chung-Lin Tang

Re: [PATCH] sanitizer: missing signed integer overflow errors [PR109107]

2023-04-03 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 14, 2023 at 06:50:26PM -0400, Marek Polacek via Gcc-patches wrote: > Here we're failing to detect a signed overflow with -O because match.pd, > since r8-1516, transforms > > c = (a + 1) - (int) (short int) b; > > into > > c = (int) ((unsigned int) a + 4294946117); > > wrongly el

Re: [PATCH (pushed)] param: document ranger-recompute-depth

2023-04-03 Thread Andrew MacLeod via Gcc-patches
Bah.. forgot that.. thanks :-) Andrew On 4/3/23 04:04, Martin Liška wrote: gcc/ChangeLog: * doc/invoke.texi: Document new param. ---  gcc/doc/invoke.texi | 4  1 file changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index def2df4584b..c9482886c5a 100644

Re: [PATCH] aarch64: update ampere1 vectorization cost

2023-04-03 Thread Philipp Tomsich
Kyrill, We reran on GCC12 and GCC11, reproducing the same improvements (e.g., on fotonik3d) that prompted the changes. I'll apply the backports later this week, unless you have any further concerns… Thanks, Philipp. On Mon, 27 Mar 2023 at 11:24, Kyrylo Tkachov wrote: > > > > > -Original Me

Re: [PATCH] rs6000: Fix vector_set_var_p9 by considering BE [PR108807]

2023-04-03 Thread Segher Boessenkool
Hi! On Fri, Feb 17, 2023 at 05:55:04PM +0800, Kewen.Lin wrote: > As PR108807 exposes, the current handling in function > rs6000_expand_vector_set_var_p9 doesn't take care of big > endianness. Currently the function is to rotate the > target vector by moving element to-be-set to element 0, > set e

Re: [PATCH, rs6000] rs6000: correct vector sign extend built-ins on Big Endian [PR108812]

2023-04-03 Thread Segher Boessenkool
On Mon, Mar 27, 2023 at 03:14:26PM +0800, Kewen.Lin wrote: > on 2023/3/27 14:16, HAO CHEN GUI wrote: > > This patch removes byte reverse operation before vector integer sign > > extension on Big Endian. These built-ins require to sign extend the > > rightmost > > element. So both BE and LE shoul

Re: [PATCH v3] rs6000: Fix vector parity support [PR108699]

2023-04-03 Thread Segher Boessenkool
On Mon, Mar 20, 2023 at 02:31:31PM +0800, Kewen.Lin wrote: > The failures on the original failed case builtin-bitops-1.c > and the associated test case pr108699.c here show that the > current support of parity vector mode is wrong on Power. > The hardware insns vprtyb[wdq] which operate on the leas

[PATCH] ipa: propagate attributes for target attribute clones

2023-04-03 Thread Martin Liška
Hi. The patch propagates noreturn attribute for MV functions. However, I noticed we've got the following ICE when we do the same for TREE_READONLY attr: $ cat tc.c double bar() __attribute__((target_clones("avx,avx2,avx512f,default"))); double bar() { return 1.2f; } int foo() { return (int)bar(

[PATCH][stage1] gcov: respect -fprofile-prefix-map when it comes to output of .gcda file

2023-04-03 Thread Martin Liška
Respect the profile prefix map and save .gcda files to a path that is also translated with -fprofile-prefix-map option (if provided). It's a stage 1 material, if you are interested in the fix, please install it, I won't be able to take care of it at that time. Patch can bootstrap on x86_64-linux

[PATCH 1/2] Support Intel AMX-COMPLEX

2023-04-03 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect AMX-COMPLEX. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AMX_COMPLEX_SET, OPTION_MASK_ISA2_AMX_COMPLEX_UNSET): New. (ix86_handle_option): Handle -mamx-complex.

[PATCH 2/2] i386: Add AMX-COMPLEX to Granite Rapids

2023-04-03 Thread Haochen Jiang via Gcc-patches
gcc/Changelog: * config/gcc/i386.h (PTA_GRANITERAPIDS): Add PTA_AMX_COMPLEX. --- gcc/config/i386/i386.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index dd9391c492b..1da6dce8e0b 100644 --- a/gcc/config/i386/i386.h ++

[PATCH 0/2] Support Intel AMX-COMPLEX

2023-04-03 Thread Haochen Jiang via Gcc-patches
Hi all, These patch aims to add Intel AMX-COMPLEX instructions. Also we added AMX-COMPLEX to -march=graniterapids. The information is based on newly released Intel Architecture Instruction Set Extensions and Future Features. The document comes following: https://www.intel.com/content/www/us/en/d

[PATCH] driver: drop flag_var_tracking_assignments flag

2023-04-03 Thread Martin Liška
The revision r13-259-g76db543db88727 moved a condition from one file to another, but now we do not drop x_flag_var_tracking_assignments as it was done before the mentioned revision. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin

[PATCH (pushed)] param: document ranger-recompute-depth

2023-04-03 Thread Martin Liška
gcc/ChangeLog: * doc/invoke.texi: Document new param. --- gcc/doc/invoke.texi | 4 1 file changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index def2df4584b..c9482886c5a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -16170,6 +16170,10