[PATCH] lower-bitint: Fix up maximum addition/subtraction/multiplication result computations

2023-11-30 Thread Jakub Jelinek
Hi! When debugging PR112750, I've noticed some issues in the computation of precisions and the following patch attempts to fix those. The pass uses range_to_prec function, which possibly using ranger returns minimum precision of some operand in the style that libgcc _BitInt entrypoints expect,

Re: [PATCH] lower-bitint: Fix ICE on bitint-39.c

2023-11-30 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > torture/bitint-39.c ICEs with -O1; the problem is that the > finish_arith_overflow code in one spot replaces use_stmt with an > assignment or cast, but if unlucky and m_gsi iterator is the same statement, > when the code later > tree

Re: [PATCH] lower-bitint: Fix _BitInt .{ADD,SUB}_OVERFLOW lowering [PR112750]

2023-11-30 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > The .{ADD,SUB}_OVERFLOW lowering is implemented by performing normal > addition/subtraction (perhaps extended to even more bits than normally by > continuing with extended values of operands after running of normal bits) > and in addition to

[PATCH v2] RISC-V: Bugfix for legitimize move when get vec mode in zve32f

2023-11-30 Thread pan2 . li
From: Pan Li If we want to extract 64bit value but ELEN < 64, we use RVV vector mode with EEW = 32 to extract the highpart and lowpart. However, this approach doesn't honor DFmode when movdf pattern when ZVE32f and of course results in ICE when zve32f. This patch would like to reuse the

[PATCH v2 2/3] libphobos: Update build scripts for LoongArch64.

2023-11-30 Thread Yang Yujie
libphobos/ChangeLog: * m4/druntime/cpu.m4: Support loongarch* targets. * libdruntime/Makefile.am: Same. * libdruntime/Makefile.in: Regenerate. * configure: Regenerate. --- libphobos/configure | 21 ++- libphobos/libdruntime/Makefile.am | 3 +

[PATCH v2 0/3] LoongArch D support

2023-11-30 Thread Yang Yujie
This patchset is based on Zixing Liu's initial support patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631260.html Update v1 -> v2: Rebased onto the dmd/druntime upstream state. Regtested on loongarch64-linux-gnu with the following result: === libphobos Summary

[PATCH v2 3/3] libphobos: LoongArch hardware support.

2023-11-30 Thread Yang Yujie
libphobos/ChangeLog: * src/std/math/hardware.d: Implement FP control. * libdruntime/config/loongarch/switchcontext.S: New file. --- .../config/loongarch/switchcontext.S | 133 ++ libphobos/src/std/math/hardware.d | 53 +++ 2 files

[PATCH v2 1/3] LoongArch: Adjust D version strings.

2023-11-30 Thread Yang Yujie
gcc/ChangeLog: * config/loongarch/loongarch-d.cc: Undefine LoongArch32. Define LoongArch_SF, LoongArch_F32, LoongArch_F64 gcc/d/ChangeLog: * dmd/cond.d: Same. * implement-d.texi: Same. --- gcc/config/loongarch/loongarch-d.cc | 27 ++-

[PATCH] lower-bitint: Fix ICE on bitint-39.c

2023-11-30 Thread Jakub Jelinek
Hi! torture/bitint-39.c ICEs with -O1; the problem is that the finish_arith_overflow code in one spot replaces use_stmt with an assignment or cast, but if unlucky and m_gsi iterator is the same statement, when the code later tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_EOL);

RE: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-11-30 Thread Jiang, Haochen
> -Original Message- > From: Richard Biener > Sent: Friday, December 1, 2023 3:04 PM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > ubiz...@gmail.com > Subject: Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated > > On Fri, Dec 1, 2023 at 3:22 AM Haochen Jiang >

[PATCH] lower-bitint: Fix _BitInt .{ADD,SUB}_OVERFLOW lowering [PR112750]

2023-11-30 Thread Jakub Jelinek
Hi! The .{ADD,SUB}_OVERFLOW lowering is implemented by performing normal addition/subtraction (perhaps extended to even more bits than normally by continuing with extended values of operands after running of normal bits) and in addition to that trying to compute if certain sets of bits are either

Re: [PATCH] s390x: Fix PR112753

2023-11-30 Thread Andreas Krebbel
On 11/30/23 16:45, Juergen Christ wrote: > Commit 466b100e5fee808d77598e0f294654deec281150 introduced a bug in > s390_md_asm_adjust if vector extensions are not available. Fix the control > flow of this function to not adjust long double values. > > gcc/ChangeLog: > > *

Re: [PATCH v2] doc: Update the status of build directory not fully separated

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 2:42 PM Xi Ruoyao wrote: > > Recently there are some people building GCC with srcdir == objdir and > the attempts just failed [1]. So stop to say "it should work". OTOH > objdir as a subdirectory of srcdir works: we've built GCC in LFS [2] > and BLFS [3] this way for

Re: Ping: [PATCH] Allow target attributes in non-gnu namespaces

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 3:12 PM Richard Sandiford wrote: > > Ping OK. Thanks, Richard. > Richard Sandiford writes: > > This is a ping+rebase of the patch below. I've also optimised the > > handling of ignored attributes so that we don't register empty tables. > > There was also a typo in the

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Richard Biener
On Fri, 1 Dec 2023, Hans-Peter Nilsson wrote: > > From: Hans-Peter Nilsson > > Date: Thu, 30 Nov 2023 18:09:10 +0100 > > Richard B.: > > > > In the end we might need to move/duplicate the test to some > > > > gcc.target/* dir and restrict it to a specific tuning. > > > > I intend to post

Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-11-30 Thread Richard Biener
On Fri, Dec 1, 2023 at 3:22 AM Haochen Jiang wrote: > > Since Knight Landing and Knight Mill microarchitectures are EOL, we > would like to remove its support in GCC 15. In GCC 14, we will first > emit a warning for the usage. I think it's better to keep supporting -mtune/arch=knl without

[PATCH] RISC-V: Support highpart register overlap for widen vx/vf instructions

2023-11-30 Thread Juzhe-Zhong
This patch leverages the same approach as vwcvt. Before this patch: .L5: add a3,s0,s1 add a4,s6,s1 add a5,s7,s1 vsetvli zero,s0,e32,m4,ta,ma vle32.v v16,0(s1) vle32.v v12,0(a3) mv s1,s2 vle32.v v8,0(a4)

Re: [PATCH] gcov: Fix __LIBGCC_HAVE_LIBATOMIC definition

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 5:21 PM Sebastian Huber wrote: > > In libgcov we use defined (__LIBGCC_HAVE_LIBATOMIC), so we must define it only > if needed (vs. #if __LIBGCC_HAVE_LIBATOMIC). For consistency wouldn't it be better to change the user side in libgcc? > gcc/c-family/ChangeLog: > >

Re: [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]

2023-11-30 Thread Andreas Krebbel
On 11/30/23 17:34, Jakub Jelinek wrote: > On Wed, Nov 29, 2023 at 07:27:20PM +0100, Jakub Jelinek wrote: >> Given that the s390 backend defines pretty much the same target hook >> as rs6000, I believe it suffers (at least when using -mvx?) the same >> problem as rs6000, though admittedly this is

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-30 Thread waffl3x
I ran into another issue while devising tests for redeclarations of xobj member functions as static member functions and vice versa. I am pretty sure by the literal wording of the standard, this is well formed. template concept Constrain = true; struct S { void f(this auto, Constrain auto) {};

Ping: [PATCH v2] Only allow (int)trunc(x) to (int)x simplification with -ffp-int-builtin-inexact [PR107723]

2023-11-30 Thread Xi Ruoyao
Ping. On Fri, 2023-11-24 at 17:09 +0800, Xi Ruoyao wrote: > With -fno-fp-int-builtin-inexact, trunc is not allowed to raise > FE_INEXACT and it should produce an integral result (if the input is not > NaN or Inf).  Thus FE_INEXACT should not be raised. > > But (int)x may raise FE_INEXACT when x

[PATCH] c++: lambda capture and explicit object parm

2023-11-30 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- More adjustments to allow for explicit object parameters in lambdas. This has no practical effect until that patch goes in, but applying this separately seems reasonable. gcc/cp/ChangeLog: * semantics.cc

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 30 Nov 2023 18:09:10 +0100 > I intend to post two alternative patches to get this > resolved: > 2: gcc.dg/tree-ssa/scev-[3-5].c skipped for arm*, xfailed >only on h8300-*-* and ia32. (Except as mentioned, the XPASS issue does not apply to h8300; it's

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 30 Nov 2023 18:09:10 +0100 Richard B.: > > > In the end we might need to move/duplicate the test to some > > > gcc.target/* dir and restrict it to a specific tuning. > > I intend to post two alternative patches to get this > resolved: > 1: Move the

Re: [PATCH] RISC-V: Fix VSETVL PASS regression

2023-11-30 Thread juzhe.zh...@rivai.ai
All regressions (zve64d/zvl128b/zvl256b/zvl512b/zvl1024b) passed. juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-12-01 08:51 To: gcc-patches CC: kito.cheng; kito.cheng; jeffreyalaw; rdapp.gcc; Juzhe-Zhong Subject: [PATCH] RISC-V: Fix VSETVL PASS regression This patch fix 2 regression (one

[patch-1, rs6000] enable fctiw on old archs [PR112707]

2023-11-30 Thread HAO CHEN GUI
Hi, SImode in float register is supported on P7 above. It causes "fctiw" can be generated on old 32-bit processors as the output operand of fctiw insn is a SImode in float/double register. This patch fixes the problem by adding an expand and an insn pattern for fctiw. The output of new pattern

[patch-2, rs6000] guard fctid on PPC64 and powerpc 476 [PR112707]

2023-11-30 Thread HAO CHEN GUI
Hi, The "fctid" is supported on 64-bit Power processors and powerpc 476. It need a guard to check it. The patch fixes the issue. Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no regressions. Is this OK for trunk? Thanks Gui Haochen ChangeLog rs6000: guard fctid on PPC64

[PATCH] Take register pressure into account for vec_construct/scalar_to_vec when the components are not loaded from memory.

2023-11-30 Thread liuhongt
> Hmm, I would suggest you put reg_needed into the class and accumulate > over all vec_construct, with your patch you pessimize a single v32qi > over two separate v16qi for example. Also currently the whole block is > gated with INTEGRAL_TYPE_P but register pressure would be also > a concern for

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Thu, 30 Nov 2023 18:09:10 +0100 > I intend to post two alternative patches to get this > resolved: > 1: Move the tests to gcc.target/i386/scev-[3-5].c > 2: gcc.dg/tree-ssa/scev-[3-5].c skipped for arm*, xfailed >only on h8300-*-* and ia32. Correction:

[PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-11-30 Thread Haochen Jiang
Since Knight Landing and Knight Mill microarchitectures are EOL, we would like to remove its support in GCC 15. In GCC 14, we will first emit a warning for the usage. gcc/ChangeLog: * config/i386/driver-i386.cc (host_detect_local_cpu): Do not append "-mno-" for Xeon Phi ISAs.

[RFC] i386: Remove Xeon Phi ISA support

2023-11-30 Thread Haochen Jiang
Hi all, Since Knight Landing and Knight Mill microarchitectures were EOL in 2019 and previously ICC and ICX has removed the support and emitted errors, we would also like to remove the support in GCC to reduce maintainence effort. The deprecated Xeon Phi ISAs are AVX512PF, AVX512ER, AVX5124VNNIW,

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Xi Ruoyao
On Thu, 2023-11-30 at 08:44 -0700, Jeff Law wrote: > > > On 11/29/23 02:33, Xi Ruoyao wrote: > > On Mon, 2023-11-27 at 23:06 -0700, Jeff Law wrote: > > > This has (of course) been tested on rv64.  It's also been bootstrapped > > > and regression tested on x86.  Bootstrap and regression tested (C

Re: [RFA] New pass for sign/zero extension elimination

2023-11-30 Thread Hans-Peter Nilsson
> Date: Sun, 19 Nov 2023 17:47:56 -0700 > From: Jeff Law > Locally we have had this enabled at -O1 and above to encourage testing, > but I'm thinking that for the trunk enabling at -O2 and above is the > right thing to do. Yes. > Thoughts, comments, recommendations? Sounds great! It'd be

Re: [PATCH] RISC-V: Vectorized str(n)cmp and strlen.

2023-11-30 Thread juzhe.zh...@rivai.ai
Ah. I see: --- a/gcc/config/riscv/riscv.md +++ b/gcc/config/riscv/riscv.md @@ -2336,9 +2336,7 @@ (define_expand "cpymem" (use (match_operand:SI 3 "const_int_operand"))])] "" { - if (riscv_vector::expand_block_move (operands[0], operands[1], operands[2])) -DONE; - else if

Re: [PATCH] RISC-V: Vectorized str(n)cmp and strlen.

2023-11-30 Thread juzhe.zh...@rivai.ai
Hi, Robin. Thanks for working on this. I know this is a tedious work. A couple comments here: - if (TARGET_ZBB || TARGET_XTHEADBB) + if (TARGET_VECTOR && stringop_strategy & STRINGOP_STRATEGY_VECTOR) +{ + bool ok = riscv_vector::expand_strcmp (result, src1, src2, bytes_rtx, +

[PATCH] RISC-V: Fix VSETVL PASS regression

2023-11-30 Thread Juzhe-Zhong
This patch fix 2 regression (one is bug regression, the other is performance regression). Those 2 regressions are both we are comparing ratio for same AVL in wrong place. 1. BUG regression: avl_single-84.c: f0: li a5,999424 add a1,a1,a5 li a4,299008

Re: [PATCH] RISC-V: Vectorized str(n)cmp and strlen.

2023-11-30 Thread Jeff Law
On 11/30/23 15:22, Robin Dapp wrote: Hi, this adds vectorized implementations of strcmp and strncmp as well as strlen. strlen falls back to the previously implemented rawmemchr. Also, it fixes a rawmemchr bug causing a SPEC2017 execution failure: We would only ever increment the source

Re: [PATCH] htdocs/git.html: correct spelling and use git in example

2023-11-30 Thread Joseph Myers
On Thu, 30 Nov 2023, Jonny Grant wrote: > ChangeLog: > > htdocs/git.html: change example to use git:// and correct > spelling repostiory -> repository . git:// (unencrypted / unauthenticated) is pretty widely considered obsolescent, I'm not sure adding a use of it

Re: [PATCH v5] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-11-30 Thread Jason Merrill
On 11/23/23 11:46, Marek Polacek wrote: v5 greatly simplifies the code. Indeed, it's much cleaner now. I still need a new ff_ flag to signal that we can return immediately after seeing an i-e expr. That's still not clear to me: + /* In turn, maybe promote the function we find

[PATCH] btf: fix PR debug/112656

2023-11-30 Thread Indu Bhagat
PR debug/112656 - btf: function prototypes generated with name With this patch, all BTF_KIND_FUNC_PROTO will appear anonymous in the generated BTF section. As noted in the discussion in the bugzilla, the number of BTF_KIND_FUNC_PROTO types output varies across targets (BPF with -mco-re vs

[PATCH] RISC-V: Vectorized str(n)cmp and strlen.

2023-11-30 Thread Robin Dapp
Hi, this adds vectorized implementations of strcmp and strncmp as well as strlen. strlen falls back to the previously implemented rawmemchr. Also, it fixes a rawmemchr bug causing a SPEC2017 execution failure: We would only ever increment the source address by 1 regardless of the input type.

Re: [PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-30 Thread Lewis Hyatt
On Thu, Nov 30, 2023 at 4:19 PM Marek Polacek wrote: > > On Wed, Nov 01, 2023 at 05:54:57PM -0400, Lewis Hyatt wrote: > > Hello- > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 > > > > This is a one-line patch to fix the GCC 14 regression noted in the > > PR. Bootstrap + regtest all

[PATCH] btf: fix PR debug/112768

2023-11-30 Thread Indu Bhagat
PR debug/112768 - btf: fix asm comment output for BTF_KIND_FUNC* kinds The patch adds a small function to abstract out the detail and return the name of the type. The patch also fixes the issue of BTF_KIND_FUNC appearing in the comments with a 'null' string. For btf-function-6.c testcase, after

Re: [PATCH] libgccjit: Add vector permutation and vector access operations

2023-11-30 Thread Antoni Boucher
All of these are fixed in this new patch. Thanks for the review. On Mon, 2023-11-20 at 18:05 -0500, David Malcolm wrote: > On Fri, 2023-11-17 at 17:36 -0500, Antoni Boucher wrote: > > Hi. > > This patch adds a vector permutation and vector access operations > > (bug > > 112602). > > > > This was

Re: [PATCH] libgccjit: Fix GGC segfault when using -flto

2023-11-30 Thread Antoni Boucher
Here's the updated patch. The failure was due to the test being in the test array while it should not have been there since it changes the context. Thanks for the review. On Sun, 2023-11-12 at 18:03 -0500, David Malcolm wrote: > On Fri, 2023-11-10 at 18:14 -0500, David Malcolm wrote: > > On Fri,

Re: [PATCH] libgccjit: Add ability to get CPU features

2023-11-30 Thread Antoni Boucher
See more answers below. On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote: > > Hi. > > See answers below. > > > > On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote: > > > > On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote: > > > > > > Hi. > > > > > > This patch adds support for

Re: [PATCH v2] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 11:42:36AM -0500, Jason Merrill wrote: > On 11/29/23 17:01, Marek Polacek wrote: > > On Wed, Nov 29, 2023 at 03:28:44PM -0500, Jason Merrill wrote: > > > On 11/29/23 12:43, Marek Polacek wrote: > > > > On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: > > > > >

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 10:30:44PM +0100, Jakub Jelinek wrote: > On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote: > > * Jakub Jelinek: > > > > > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > > >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > >

Re: [PATCH v3 00/11] : More warnings as errors by default

2023-11-30 Thread Florian Weimer
* Sam James: >>> But give Marek additional time to chime in, particularly given the >>> holidays this week in the US. Say through this time next week? >> >> [...] >> >> I'm also gathering some numbers regarding autoconf impact and potential >> silent miscompilation. > > I'd actually forgot about

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/30/23 14:22, Jeff Law wrote: So if you're going to add opcodes in here, don't they also need to be in safe_for_propagation_p as well?  Otherwise they won't get used, right? I'm thinking about the HIGHPART cases for example.  As well as the saturating shifts which we indicated we were

[PATCH v3] aarch64: New RTL optimization pass avoid-store-forwarding.

2023-11-30 Thread Manos Anagnostakis
This is an RTL pass that detects store forwarding from stores to larger loads (load pairs). This optimization is SPEC2017-driven and was found to be beneficial for some benchmarks, through testing on ampere1/ampere1a machines. For example, it can transform cases like str d5, [sp, #320] fmul

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > >> > * Marek Polacek: > >> > > >> > > On Mon, Nov 20, 2023 at 10:56:36AM

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Florian Weimer
* Jakub Jelinek: > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: >> > * Marek Polacek: >> > >> > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: >> > >> --- a/gcc/doc/invoke.texi >> > >> +++

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:58 AM Ian Lance Taylor wrote: > > On Thu, Nov 30, 2023 at 11:56 AM Iain Sandoe wrote: > > > > > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > > > > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > > >> > > >> Thanks a lot Alexandre for the review! > > >

Re: [PATCH] libgo, libstdc++: Regenerate GCC_CHECK_ASSEMBLER_HWCAP users

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:46 AM Ian Lance Taylor wrote: > > On Thu, Nov 30, 2023 at 1:30 AM Rainer Orth > wrote: > > > > the gcc-autoregen bot correctly complained that the libgo and libstdc++ > > configure scripts hadn't been regenerated. I'd have commited the > > following as obvious (just

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > > * Marek Polacek: > > > > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > > >> --- a/gcc/doc/invoke.texi > > >> +++ b/gcc/doc/invoke.texi > > >>

Re: [PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-30 Thread Marek Polacek
On Wed, Nov 01, 2023 at 05:54:57PM -0400, Lewis Hyatt wrote: > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 > > This is a one-line patch to fix the GCC 14 regression noted in the > PR. Bootstrap + regtest all languages on x86-64 looks good. Is it OK please? > Thanks! > >

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > * Marek Polacek: > > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > >> --- a/gcc/doc/invoke.texi > >> +++ b/gcc/doc/invoke.texi > >> @@ -6183,6 +6183,7 @@ that have their own flag: > >> @gccoptlist{ > >>

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Florian Weimer
* Marek Polacek: > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -6183,6 +6183,7 @@ that have their own flag: >> @gccoptlist{ >> -Wimplicit-function-declaration @r{(C)} >> -Wimplicit-int @r{(C)} >>

Re: [PATCH v3 11/11] c: Add new -Wdeclaration-missing-parameter-type permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:42AM +0100, Florian Weimer wrote: > This used to be a warning, enabled by default, without its own option. I think this patch is OK now. > A subsequent change could improve diagnostics and provide spelling > hints for declarations like “void function (int32t);”.

[PATCH] Fortran: copy-out for possibly missing OPTIONAL CLASS arguments [PR112772]

2023-11-30 Thread Harald Anlauf
Dear all, the attached rather obvious patch fixes the first testcase of pr112772: we unconditionally generated copy-out code for optional class arguments, while the copy-in properly checked the presence of arguments. Regtested on x86_64-pc-linux-gnu. OK for mainline? (The second testcase is a

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -6183,6 +6183,7 @@ that have their own flag: > @gccoptlist{ > -Wimplicit-function-declaration @r{(C)} > -Wimplicit-int @r{(C)} > +-Wincompatible-pointer-types @r{(C)} >

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > The change to build_conditional_expr drops the downgrade > from a pedwarn to warning for builtins for C99 and later > language dialects. It remains a warning in C89 mode (not > a permerror), as the -std=gnu89 -fno-permissive test

Re: [PATCH 4/4] libbacktrace: get debug information for loaded dlls

2023-11-30 Thread Eli Zaretskii
> Date: Thu, 30 Nov 2023 11:53:54 -0800 > Cc: gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > From: Ian Lance Taylor via Gcc > > Also starting with a module count of 1000 seems like a lot. Do > typical Windows programs load that many modules? Unlikely. I'd start with 100.

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:56 AM Iain Sandoe wrote: > > > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > >> > >> Thanks a lot Alexandre for the review! > > > > This patch changed the files lingo/configure.ac and libgo/configure. > >

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Iain Sandoe
Hi Ian > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: >> >> Thanks a lot Alexandre for the review! > > This patch changed the files lingo/configure.ac and libgo/configure. > Those files live in an upstream repository and should be

Re: [PATCH 4/4] libbacktrace: get debug information for loaded dlls

2023-11-30 Thread Ian Lance Taylor
On Fri, Jan 20, 2023 at 2:55 AM Björn Schäpers wrote: > > From: Björn Schäpers > > Fixes https://github.com/ianlancetaylor/libbacktrace/issues/53, except > that libraries loaded after the backtrace_initialize are not handled. > But as far as I can see that's the same for elf. Thanks, but I

Re: [PATCH v3 08/11] c: Do not ignore some forms of -Wimplicit-int in system headers

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:26AM +0100, Florian Weimer wrote: > Most -Wimplicit-int warnings were unconditionally disabled for system > headers. Only missing types for parameters in old-style function > definitions resulted in warnings. This is inconsistent with the > treatment of other

Re: [PATCH v3 07/11] c: Turn -Wimplicit-int into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:20AM +0100, Florian Weimer wrote: > Most of these new permerrors are currently not diagnosed in system > headers. > > gcc/ > > PR c/91093 > PR c/96284 > * doc/invoke.texi (Warning Options): Document changes. > > gcc/c/ > > * c-decl.cc

Re: [PATCH] libgo, libstdc++: Regenerate GCC_CHECK_ASSEMBLER_HWCAP users

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 1:30 AM Rainer Orth wrote: > > the gcc-autoregen bot correctly complained that the libgo and libstdc++ > configure scripts hadn't been regenerated. I'd have commited the > following as obvious (just whitespace change), but since libgo is > imported from upstream, I'm

Re: [PATCH v3 05/11] c: Turn int-conversion warnings into permerrors

2023-11-30 Thread Florian Weimer
* Marek Polacek: >> permerror_init for -Wint-conversion warnings. > > A few extra whitespaces. >> * gcc.dg/assign-warn-4.c: New file. Extracted from >> assign-warn1.c. Expect int-cnversion errors. > > "int-conversion" (sorry about pointing out typos...) > >> *

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > > Thanks a lot Alexandre for the review! This patch changed the files lingo/configure.ac and libgo/configure. Those files live in an upstream repository and should be changed there and then merged into the GCC repo, as described in

[PATCH] htdocs/git.html: correct spelling and use git in example

2023-11-30 Thread Jonny Grant
ChangeLog: htdocs/git.html: change example to use git:// and correct spelling repostiory -> repository . >From fad03a107f5f8734e9eeafb618cdb30fa100cbbb Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Thu, 30 Nov 2023 17:55:49 + Subject: [PATCH]

Re: [PATCH 3/4] libbacktrace: work with aslr on windows

2023-11-30 Thread Ian Lance Taylor
On Mon, Nov 20, 2023 at 11:58 AM Björn Schäpers wrote: > > An updated version, using neither A or W, but just the macro. Thanks. Committed as follows. Ian 1017495bc91d40570f58c37e88ca013164782129 diff --git a/libbacktrace/pecoff.c b/libbacktrace/pecoff.c index 56af4828e27..f976a963bf3 100644

[PATCH] libstdc++: Simplify ranges::to closure objects

2023-11-30 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Use the existing _Partial range adaptor closure object in the definition of ranges::to instead of essentially open coding it. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::_ToClosure): Replace with ...

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/30/23 11:31, Joern Rennecke wrote: Pretending the vector modes don't happen is not making the code safe. We have to handle them somehow, so we might as well do that in a way that is consistent and gives more potential for optimization. We're not pretending they don't happen. Quite

Re: [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:16AM +0100, Florian Weimer wrote: > In the future, it may make sense to avoid cascading errors from > the implicit declaration, especially its assumed int return type. > This change here only changes the kind of the diagnostic, not > its wording or consequences.

Re: [PATCH v3 05/11] c: Turn int-conversion warnings into permerrors

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:09AM +0100, Florian Weimer wrote: > gcc/ > > * doc/invoke.texi (Warning Options): Document changes. Let's be more specific here. > gcc/c/ > > PR c/96284 > PR c/106416 > * c-typeck.cc (build_conditional_expr): Use permerror_opt for >

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Joern Rennecke
On Thu, 30 Nov 2023 at 17:53, Jeff Law wrote: > > * ext-dce.c: Fixes for carry handling. > > > > * ext-dce.c (safe_for_live_propagation): Handle MINUS. > >(ext_dce_process_uses): Break out carry handling into .. > >(carry_backpropagate): This new function. > >

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 12:39:22PM -0500, Marek Polacek wrote: > On Thu, Nov 30, 2023 at 06:37:21PM +0100, Florian Weimer wrote: > > * Marek Polacek: > > > > >> +void > > >> +implicit_function_declaration (void) > > >> +{ > > >> + f1 (); /* { dg-warning "'f1'

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-30 Thread Wilco Dijkstra
Hi Richard, Thanks for the review, now committed. > The new aarch64_split_compare_and_swap code looks a bit twisty. > The approach in lse.S seems more obvious.  But I'm guessing you > didn't want to spend any time restructuring the pre-LSE > -mno-outline-atomics code, and I agree the patch in

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/29/23 19:39, Joern Rennecke wrote: On Wed, 29 Nov 2023 at 20:05, Joern Rennecke wrote: I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT . Some ports do a lot of static shifting. +case SS_ASHIFT: +case US_ASHIFT: + if (!mask || XEXP (x, 1) ==

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 06:37:21PM +0100, Florian Weimer wrote: > * Marek Polacek: > > >> +void > >> +implicit_function_declaration (void) > >> +{ > >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\\]" } > >> */ > >> +} > >> + > >> +extern implicit_int_1; /* { dg-warning

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Florian Weimer
* Marek Polacek: >> +void >> +implicit_function_declaration (void) >> +{ >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\\]" } */ >> +} >> + >> +extern implicit_int_1; /* { dg-warning "'implicit_int_1' >> \\\[-Wimplicit-int\\\]" } */ > > Oy, these \ tend to get unwieldy.

Re: [RFA] New pass for sign/zero extension elimination

2023-11-30 Thread Jeff Law
On 11/28/23 06:36, Joern Rennecke wrote: On Mon, 27 Nov 2023 at 20:18, Jeff Law wrote: On 11/27/23 13:03, Richard Sandiford wrote: Joern Rennecke writes: On 11/20/23 11:26, Richard Sandiford wrote: + /* ?!? What is the point of this adjustment to DST_MASK? */ + if (code

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:03AM +0100, Florian Weimer wrote: > The dg-error directives for gcc.dg/permerror-system.c can be generated > using (for the most part at least): > > perl -ne 'print if s,.*(/\* \{ dg-error .*) } \*/$,$1 "" { target *-*-* } $. > } */,' \ > <

Re: Ping: [PATCH] Fix PR112419

2023-11-30 Thread Hans-Peter Nilsson
> From: Martin Uecker > Cc: richard.guent...@gmail.com > Am Montag, dem 27.11.2023 um 08:36 -0700 schrieb Jeff Law: > > > > On 11/23/23 10:05, Hans-Peter Nilsson wrote: > > > > From: Hans-Peter Nilsson > > > > Date: Thu, 16 Nov 2023 05:24:06 +0100 > > > > > > > > > From: Martin Uecker > > >

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Hans-Peter Nilsson
> From: Alexandre Oliva > Date: Thu, 30 Nov 2023 01:41:55 -0300 > On Nov 29, 2023, Hans-Peter Nilsson wrote: > > >> XPASS: gcc.dg/tree-ssa/scev-3.c scan-tree-dump-times ivopts "" 1 > >> XPASS: gcc.dg/tree-ssa/scev-4.c scan-tree-dump-times ivopts "" 1 > >> XPASS: gcc.dg/tree-ssa/scev-5.c

Re: [PATCH v2] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-30 Thread Jason Merrill
On 11/29/23 17:01, Marek Polacek wrote: On Wed, Nov 29, 2023 at 03:28:44PM -0500, Jason Merrill wrote: On 11/29/23 12:43, Marek Polacek wrote: On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: On Wed, 29 Nov 2023, Marek Polacek wrote: Bootstrapped/regtested on

Re: [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]

2023-11-30 Thread Jakub Jelinek
On Wed, Nov 29, 2023 at 07:27:20PM +0100, Jakub Jelinek wrote: > Given that the s390 backend defines pretty much the same target hook > as rs6000, I believe it suffers (at least when using -mvx?) the same > problem as rs6000, though admittedly this is so far completely > untested. > > Ok for

[PATCH] gcov: Fix __LIBGCC_HAVE_LIBATOMIC definition

2023-11-30 Thread Sebastian Huber
In libgcov we use defined (__LIBGCC_HAVE_LIBATOMIC), so we must define it only if needed (vs. #if __LIBGCC_HAVE_LIBATOMIC). gcc/c-family/ChangeLog: PR target/112777 * c-cppbuiltin.cc (c_cpp_builtins): Define __LIBGCC_HAVE_LIBATOMIC only if targetm.have_libatomic is

Re: [PATCH v3 09/11] c: Turn -Wreturn-mismatch into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 23, 2023 at 07:22:58PM +0100, Florian Weimer wrote: > * Marek Polacek: > > > On Mon, Nov 20, 2023 at 10:56:30AM +0100, Florian Weimer wrote: > >> gcc/ > >> > >>* doc/invoke.texi (Warning Options): Document changes. > > > > That's pretty vague :). How about "Document that

HELP: one issue during the implementation for counted_by attribute

2023-11-30 Thread Qing Zhao
Hi, 1. For the following source code (portion): struct annotated { size_t foo; char b; char array[] __attribute__((counted_by (foo))); }; static void noinline bar () { struct annotated *p2 = alloc_buf (10); p2->array[8] = 0; return; } 2. I modified C FE to generate the following

Re: [PATCH] libstdc++: Implement LGW 4016 for std::ranges::to

2023-11-30 Thread Jonathan Wakely
Before pushing I'll fix the summary to say "LWG" instead of "LGW" (the airport code for London Gatwick!) On Thu, 30 Nov 2023 at 15:51, Jonathan Wakely wrote: > > This hasn't been finally approved by LWG yet, but everybody seems to be > in favour of it. I think I'll push this soon. > > Tested

[PATCH] libstdc++: Add workaround to std::ranges::subrange [PR111948]

2023-11-30 Thread Jonathan Wakely
I think I'll push this to work around the compiler bug. We can revert it later if the front end gets fixed. Tested x86_64-linux. Needed on trunk and gcc-13. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/111948 * include/bits/ranges_util.h (subrange): Add constructor to

[PATCH] libstdc++: Implement LGW 4016 for std::ranges::to

2023-11-30 Thread Jonathan Wakely
This hasn't been finally approved by LWG yet, but everybody seems to be in favour of it. I think I'll push this soon. Tested x86_64-linux. -- >8 -- This implements the proposed resolution of LWG 4016, so that std::ranges::to does not use std::back_inserter and std::inserter. Instead it inserts

Re: [committed v2] libstdc++: Define std::ranges::to for C++23 (P1206R7) [PR111055]

2023-11-30 Thread Jonathan Wakely
On Wed, 29 Nov 2023 at 16:28, Patrick Palka wrote: > > On Thu, 23 Nov 2023, Jonathan Wakely wrote: > > > Here's the finished version of the std::ranges::to patch, which I've > > pushed to trunk. > > > > Tested x86_64-linux. > > > > -- >8 -- > > > > This adds the std::ranges::to functions for

[committed] libstdc++: Fix std::ranges::to errors

2023-11-30 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Fix some errors that Patrick noticed, and remove a #if 0 group that I didn't mean to leave in the file. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__toable): Fix incorrect use of _Range instead of _Cont.

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/29/23 19:39, Joern Rennecke wrote: On Wed, 29 Nov 2023 at 20:05, Joern Rennecke wrote: I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT . Some ports do a lot of static shifting. +case SS_ASHIFT: +case US_ASHIFT: + if (!mask || XEXP (x, 1) ==

Re: [PATCH v3 3/3] c++: note other candidates when diagnosing deletedness

2023-11-30 Thread Patrick Palka
On Fri, 27 Oct 2023, Patrick Palka wrote: > On Fri, 27 Oct 2023, Jason Merrill wrote: > > > On 10/27/23 15:55, Patrick Palka wrote: > > > With the previous two patches in place, we can now extend our > > > deletedness diagnostic to note the other considered candidates, e.g.: > > > > > >

  1   2   >