Re: [PATCH] testsuite: Fix pr108574-3.c failed in arch where sign defaults to unsigned.

2023-01-30 Thread Richard Biener via Gcc-patches
On Tue, 31 Jan 2023, Xianmiao Qu wrote: > In the architecture where sign defaults to unsigned, the 'f' will be zero > extended to int type in the expression 'd = ~(f & ~2880764155)', then the > 'd' will become -1 wich cause the case to fail. > So it's ok for the architectures where sign defaults t

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-30 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Mon, 23 Jan 2023 at 22:26, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > On Wed, 18 Jan 2023 at 19:59, Richard Sandiford >> > wrote: >> >> >> >> Prathamesh Kulkarni writes: >> >> > On Tue, 17 Jan 2023 at 18:29, Richard Sandiford >> >> > wro

Re: [PATCH 2/3] arm: Remove unnecessary zero-extending of MVE predicates before use [PR 107674]

2023-01-30 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > "Andre Vieira (lists)" writes: >> Hi, >> >> This patch teaches GCC that zero-extending a MVE predicate from 16-bits >> to 32-bits and then only using 16-bits is a no-op. >> It does so in two steps: >> - it lets gcc know that it can access any MVE predi

[PATCH] testsuite: Fix pr108574-3.c failed in arch where sign defaults to unsigned.

2023-01-30 Thread Xianmiao Qu via Gcc-patches
In the architecture where sign defaults to unsigned, the 'f' will be zero extended to int type in the expression 'd = ~(f & ~2880764155)', then the 'd' will become -1 wich cause the case to fail. So it's ok for the architectures where sign defaults to signed like x86, but failed for the architectur

[committed] RISC-V: Simplify testcase condition for RVV tests [NFC]

2023-01-30 Thread Kito Cheng
We got some trouble on some platform, it show get twice for the asm, but it only show once, seems like our pattern might be too complicated, so simplify that make every platform happey with those testcase. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/vlmax_phi-10.c: Refine the s

[PATCH] c++: wrong error with constexpr array and value-init [PR108158]

2023-01-30 Thread Marek Polacek via Gcc-patches
In this test case, we find ourselves evaluating 't' which is ((const struct carray *) this)->data_[VIEW_CONVERT_EXPR(index)] in cxx_eval_array_reference. ctx->object is non-null, a RESULT_DECL, so we replace it with 't': new_ctx.object = t; // result_decl replaced and then we go to cxx_eval_co

[PATCH v3] c++: fix ICE with -Wduplicated-cond [PR107593]

2023-01-30 Thread Marek Polacek via Gcc-patches
On Mon, Jan 30, 2023 at 01:12:00PM -0500, Jason Merrill wrote: > On 1/30/23 11:00, Marek Polacek wrote: > > On Fri, Jan 27, 2023 at 06:17:00PM -0500, Patrick Palka wrote: > > > On Fri, 27 Jan 2023, Marek Polacek wrote: > > > > > > > On Fri, Jan 27, 2023 at 05:15:00PM -0500, Patrick Palka wrote: >

[pushed] wwwdocs: cxx-dr-status: Switch www.open-std.org to https

2023-01-30 Thread Gerald Pfeifer
One more... Pushed. Gerald --- htdocs/projects/cxx-dr-status.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projects/cxx-dr-status.html b/htdocs/projects/cxx-dr-status.html index 748226c2..d87466a3 100644 --- a/htdocs/projects/cxx-dr-status.html +++ b/htdocs/pro

[pushed] doc: Change fsf.org to www.fsf.org in URLs (GFDL)

2023-01-30 Thread Gerald Pfeifer
We have been getting a 301 (permanent redirect) http response from the server for a long while. Pushed. Gerald gcc/ChangeLog: * doc/include/fdl.texi: Change fsf.org to www.fsf.org. --- gcc/doc/include/fdl.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/d

Re: [PATCH 2/3] arm: Remove unnecessary zero-extending of MVE predicates before use [PR 107674]

2023-01-30 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > Hi, > > This patch teaches GCC that zero-extending a MVE predicate from 16-bits > to 32-bits and then only using 16-bits is a no-op. > It does so in two steps: > - it lets gcc know that it can access any MVE predicate mode using any > other MVE predicate mode wit

Re: Patch ping

2023-01-30 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605965.html > - ABI - aarch64: Add bfloat16_t support for aarch64 (enabling it in GCC 14 > will be harder) Sorry for the delay on this. There's still an ongoing debate about whether to keep the current AArch64

[pushed] libstdc++: Update links in the Memory section of the manual

2023-01-30 Thread Gerald Pfeifer
Consistency simplifies life. Pushed. Gerald libstdc++-v3/ChangeLog: * doc/xml/manual/shared_ptr.xml: Move links from both http://open-std.org and http://www.open-std.org to https://www.open-std.org. * doc/html/manual/memory.html: Regenerate. --- libstdc++-v3/do

Re: [PATCH, wwwdocs] readings: Update AIX linker links

2023-01-30 Thread David Edelsohn via Gcc-patches
On Mon, Jan 30, 2023 at 4:52 PM Gerald Pfeifer wrote: > Hi David, > > the noticed the links to the AIX 4.3 and AIX 5L docs were broken and could > not find a good replacement, though I did find one for AIX 7.2. > > How about the patch below? > Hi, Gerald That change is fine with me. Thanks, Da

Re: [committed] wwwdocs: cxx-status: Move www.open-std.org to https

2023-01-30 Thread Gerald Pfeifer
On Sun, 31 Jul 2022, Jonathan Wakely wrote: >> Marek, Jason, Jonathan - I noticed that (in other places) we have both >> links to www.open-std.org and open-std.org, both of which seem to work. >> >> What is the preferred spelling of that site? With or without www? (The >> latter would be shorter an

[PATCH] Fortran: prevent redundant integer division truncation warnings [PR108592]

2023-01-30 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the subject says it all: in some cases we emit redundant integer division truncation warnings (2 or 4), where just one would have been sufficient. This is solved by using gfc_warning instead of gfc_warning_now. The testcase uses a suggestion by Andrew to verify that we get the d

[PATCH, wwwdocs] readings: Update AIX linker links

2023-01-30 Thread Gerald Pfeifer
Hi David, the noticed the links to the AIX 4.3 and AIX 5L docs were broken and could not find a good replacement, though I did find one for AIX 7.2. How about the patch below? Or should we omit such links? (Or do you have recommendations?) Thanks, Gerald diff --git a/htdocs/readings.html b/h

[pushed] wwwdocs: gcc-4.7: Adjust link to "Collecting User-Mode Dumps"

2023-01-30 Thread Gerald Pfeifer
After summer 2018 and summer 2019 the third time Microsoft shuffles around things... At least the put in place redirects. Pushed. Gerald --- htdocs/gcc-4.7/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-4.7/changes.html b/htdocs/gcc-4.7/changes.html

[PATCH] c++: ICE on unviable/ambiguous constrained dtors [PR96745]

2023-01-30 Thread Patrick Palka via Gcc-patches
Here we're crashing from check_bases_and_members due to CLASSTYPE_DESTRUCTOR being an OVERLOAD which, due to the pruning performed by add_method, should only happen if there is no viable destructor or the destructor is ambiguous. This patch fixes this by making check_bases_and_members naturally ha

Re: [PATCH 2/2] c++: speculative constexpr and is_constant_evaluated [PR108243]

2023-01-30 Thread Jason Merrill via Gcc-patches
On 1/27/23 17:02, Patrick Palka wrote: This PR illustrates that __builtin_is_constant_evaluated currently acts as an optimization barrier for our speculative constexpr evaluation, since we don't want to prematurely fold the builtin to false if the expression in question would be later manifestly

Re: [PATCH 1/2] c++: make manifestly_const_eval tri-state

2023-01-30 Thread Jason Merrill via Gcc-patches
On 1/27/23 17:02, Patrick Palka wrote: This patch turns the manifestly_const_eval flag used by the constexpr machinery into a tri-state enum so that we're able to express wanting to fold __builtin_is_constant_evaluated to false via late speculative constexpr evaluation. Of all the entry points t

[PATCH 3/3] tree-optimization/108385 - Add op2_range to pointer_plus.

2023-01-30 Thread Andrew MacLeod via Gcc-patches
Implement op2_range for pointer_plus to determine the offset (operand 2) is zero or non-zero based on equality/inequality between the LHS and op1. Fairly trivial fix for the PR, dependent on the first patch in the set as it uses an accurate relation_trio in GORI to determine if LHS == OP1. T

[PATCH] c++: excessive satisfaction in check_methods [PR108579]

2023-01-30 Thread Patrick Palka via Gcc-patches
In check_methods we're unnecessarily checking satisfaction for all constructors and assignment operators, even those that don't look like copy/move special members. In the testcase below this manifests as an unstable satisfaction error because the satisfaction result is first determined to be fals

Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization

2023-01-30 Thread Jose E. Marchesi via Gcc-patches
> On Thu, Dec 8, 2022 at 2:56 AM Jose E. Marchesi via Gcc-patches > wrote: >> >> The expand_expr_divmod function in expr.cc attempts to optimize cases >> where both arguments of a division/modulus are known to be positive >> when interpreted as signed. In these cases, both signed division and >

Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization

2023-01-30 Thread Andrew Pinski via Gcc-patches
On Thu, Dec 8, 2022 at 2:56 AM Jose E. Marchesi via Gcc-patches wrote: > > The expand_expr_divmod function in expr.cc attempts to optimize cases > where both arguments of a division/modulus are known to be positive > when interpreted as signed. In these cases, both signed division and > unsigned

Re: [COMMITTED] testsuite: Restore TORTURE_OPTIONS in gm2/warnings/returntype/fail/warnings-returntype-fail.exp

2023-01-30 Thread Gaius Mulley via Gcc-patches
Rainer Orth writes: > Between 20230126 and 20230127, 1100+ gm2 tests started to FAIL for the > non-default multilib, e.g. > > FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, > {additional_flags= -O0 -g -Werror=return-type } timeout=10 > UNRESOLVED: gm2/calling-c/datatypes/unb

Re: [PATCH v2] c++: fix ICE with -Wduplicated-cond [PR107593]

2023-01-30 Thread Jason Merrill via Gcc-patches
On 1/30/23 11:00, Marek Polacek wrote: On Fri, Jan 27, 2023 at 06:17:00PM -0500, Patrick Palka wrote: On Fri, 27 Jan 2023, Marek Polacek wrote: On Fri, Jan 27, 2023 at 05:15:00PM -0500, Patrick Palka wrote: On Thu, 26 Jan 2023, Marek Polacek via Gcc-patches wrote: Here we crash because a CA

Re: [PATCH] RISC-V: Add indexed loads/stores constraints testcases

2023-01-30 Thread Kito Cheng via Gcc-patches
committed, thanks! On Sun, Jan 29, 2023 at 11:37 PM wrote: > > From: Ju-Zhe Zhong > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/base/vlxei-vsxei-constraint-1.c: New test. > > --- > .../riscv/rvv/base/vlxei-vsxei-constraint-1.c | 121 ++ > 1 file changed, 121 i

Re: [PATCH] RISC-V: Add vsoxei32 && vsoxei64 C++ API intrinsic testcase

2023-01-30 Thread Kito Cheng via Gcc-patches
committed, thanks! On Mon, Jan 30, 2023 at 7:15 AM wrote: > > From: Ju-Zhe Zhong > > gcc/testsuite/ChangeLog: > > * g++.target/riscv/rvv/base/vsoxei32-1.C: New test. > * g++.target/riscv/rvv/base/vsoxei32-2.C: New test. > * g++.target/riscv/rvv/base/vsoxei32-3.C: New test

Re: [PATCH] RISC-V: Add indexed loads/stores C/C++ intrinsic support

2023-01-30 Thread Kito Cheng via Gcc-patches
committed, thanks! On Sun, Jan 29, 2023 at 11:33 PM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/riscv-protos.h (get_vector_mode): New function. > * config/riscv/riscv-v.cc (get_vector_mode): Ditto. > * config/riscv/riscv-vector-builtins-bases.cc (e

Re: [PATCH] RISC-V: Add VSETVL testcases for indexed loads/stores.

2023-01-30 Thread Kito Cheng via Gcc-patches
committed, thanks! On Sun, Jan 29, 2023 at 11:35 PM wrote: > > From: Ju-Zhe Zhong > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/vsetvl/avl_single-72.c: New test. > * gcc.target/riscv/rvv/vsetvl/avl_single-76.c: New test. > * gcc.target/riscv/rvv/vsetvl/avl_singl

Re: [PATCH 2/3] arm: Remove unnecessary zero-extending of MVE predicates before use [PR 107674]

2023-01-30 Thread Andre Vieira (lists) via Gcc-patches
Changed the testcase to be more robust (as per the discussion for the first patch). Still need the OK for the mid-end (simplify-rtx) part. Kind regards, Andre On 27/01/2023 09:59, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: Friday, January 27, 2023 9:

RE: [PATCH 1/3] arm: Fix sign of MVE predicate mve_pred16_t [PR 107674]

2023-01-30 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andre Vieira (lists) > Sent: Monday, January 30, 2023 4:39 PM > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw > Subject: Re: [PATCH 1/3] arm: Fix sign of MVE predicate mve_pred16_t [PR > 107674] > > Here's a new version with a more rob

Re: [PATCH 1/3] arm: Fix sign of MVE predicate mve_pred16_t [PR 107674]

2023-01-30 Thread Andre Vieira (lists) via Gcc-patches
Here's a new version with a more robust test. OK for trunk? On 27/01/2023 09:56, Kyrylo Tkachov wrote: -Original Message- From: Andre Vieira (lists) Sent: Friday, January 27, 2023 9:54 AM To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: Re: [PATCH 1/3] ar

[PATCH v2] c++: fix ICE with -Wduplicated-cond [PR107593]

2023-01-30 Thread Marek Polacek via Gcc-patches
On Fri, Jan 27, 2023 at 06:17:00PM -0500, Patrick Palka wrote: > On Fri, 27 Jan 2023, Marek Polacek wrote: > > > On Fri, Jan 27, 2023 at 05:15:00PM -0500, Patrick Palka wrote: > > > On Thu, 26 Jan 2023, Marek Polacek via Gcc-patches wrote: > > > > > > > Here we crash because a CAST_EXPR, represen

Re: [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd

2023-01-30 Thread Thomas Schwinge
Hi! On 2023-01-27T21:15:01-0500, Flávio Cruz wrote: > Not sure what happened, but here's the patch as an attachment. Thanks for > your patience. Thanks, that worked. Without any changes now pushed to master branch in commit 5f8950b403f6351f125d8281d2e7430a43e7d125 "Add support for x86_64-*-gnu-

Re: [COMMITTED] testsuite: Restore TORTURE_OPTIONS in gm2/warnings/returntype/fail/warnings-returntype-fail.exp

2023-01-30 Thread Rainer Orth
Hi Thomas, > And note that this is independent of (or: complements) Iain's > commit r13-5473-gfe4608efc15b881ac908a3f90d7322736495ae72 > "Modula-2: Claim Wreturn-type in lang.opt", > , > which remains necessary for:

Re: [COMMITTED] testsuite: Restore TORTURE_OPTIONS in gm2/warnings/returntype/fail/warnings-returntype-fail.exp

2023-01-30 Thread Thomas Schwinge
Hi! On 2023-01-30T14:24:43+0100, Rainer Orth wrote: > Between 20230126 and 20230127, 1100+ gm2 tests started to FAIL for the > non-default multilib, e.g. > > FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, > {additional_flags= -O0 -g -Werror=return-type } timeout=10 > UNRESOL

Re: [PATCH] aarch64: Update Ampere-1A (-mcpu=ampere1a) to include SM4

2023-01-30 Thread Philipp Tomsich
On Mon, 30 Jan 2023 at 15:18, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Gcc-patches > bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Philipp > > Tomsich > > Sent: Saturday, January 28, 2023 11:12 PM > > To: gcc-patches@gcc.gnu.org > > Cc: Manolis Tsamis ; Rich

Re: Fix wrong code issues with ipa-sra

2023-01-30 Thread Jan Hubicka via Gcc-patches
> Hello, > > Coverity flagged a real issue in this patch: > > On Mon, 16 Jan 2023, Jan Hubicka via Gcc-patches wrote: > > --- a/gcc/ipa-utils.cc > > +++ b/gcc/ipa-utils.cc > [...] > > +bitmap > > +find_always_executed_bbs (function *fun, bool assume_return_or_eh) > > +{ > > + auto_vec stack; > >

RE: [PATCH] aarch64: Update Ampere-1A (-mcpu=ampere1a) to include SM4

2023-01-30 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Philipp > Tomsich > Sent: Saturday, January 28, 2023 11:12 PM > To: gcc-patches@gcc.gnu.org > Cc: Manolis Tsamis ; Richard Sandiford > ; Tamar Christina > ; Philipp Tomsich > Subject: [PAT

RE: [PATCH]AArch64: Fix codegen regressions around tbz.

2023-01-30 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, January 27, 2023 12:26 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64: Fix codegen regressions around tbz. > > Tamar Christ

[COMMITTED] testsuite: Restore TORTURE_OPTIONS in gm2/warnings/returntype/fail/warnings-returntype-fail.exp

2023-01-30 Thread Rainer Orth
Between 20230126 and 20230127, 1100+ gm2 tests started to FAIL for the non-default multilib, e.g. FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, {additional_flags= -O0 -g -Werror=return-type } timeout=10 UNRESOLVED: gm2/calling-c/datatypes/unbounded/run/pass/m.mod execution,

Patch ping

2023-01-30 Thread Jakub Jelinek via Gcc-patches
I'd like to ping a few pending patches: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607534.html - PR107846 - P1 - c-family: Account for integral promotions of left shifts for -Wshift-overflow warning https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610285.html - PR108464 -

[PATCH] tree-optimization/108574 - wrong-code with PRE PHI node processing

2023-01-30 Thread Richard Biener via Gcc-patches
The PR108523 was too optimistic in replacing the same value with an equivalence from a possibly not taken edge. The following rectifies this and instead refrains from using the equivalence in the problematic cases. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-opti

[PATCH] ipa/108511 - relax assert for undefined local statics

2023-01-30 Thread Richard Biener via Gcc-patches
Since we no longer promote undefined local statics extern the assert in possibly_call_in_translation_unit_p triggers. The following relaxes it according to Honzas advice. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR ipa/108511 * cgraph.cc (possibly_call_in_tran