[PATCH] doc: Document struct-layout-1.exp for ABI checks

2024-09-07 Thread Dimitar Dimitrov
This test helped discover PR116621, so it is worth being documented. gcc/ChangeLog: * doc/sourcebuild.texi: Document struct-layout-1.exp. Signed-off-by: Dimitar Dimitrov --- gcc/doc/sourcebuild.texi | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH] RISC-V: Fix ICE for rvv in lto

2024-09-07 Thread Jin Ma
> > #include > > > > vint32m1_t foo(vint32m1_t vs1, vint32m1_t vs2, size_t vl) > > { > > return __riscv_vadd_vv_i32m1(vs1, vs2, vl); > > } > > To double confirm, you mean "riscv64-linux-gnu-gcc-14 -march=rv64gcv > -mabi=lp64d -flto -O0 tmp.c -c -S -o -" with above is able to reproduce this

Re: [r15-3529 Regression] FAIL: gcc.dg/pr116588.c (test for excess errors) on Linux/x86_64

2024-09-07 Thread Andrew Pinski
On Sat, Sep 7, 2024 at 4:11 PM haochen.jiang wrote: > > On Linux/x86_64, > > 506417dbc8b1cbc1133a5322572cf94b671aadf6 is the first bad commit > commit 506417dbc8b1cbc1133a5322572cf94b671aadf6 > Author: Andrew MacLeod > Date: Fri Sep 6 11:42:14 2024 -0400 > > Before running fast VRP, make su

[PUSHED] Fix pr116588.c for -m32

2024-09-07 Thread Andrew Pinski
This is a simple fix which adds the target supports requirement of int128 to the testcase too. Pushed as obvious after testing to make sure the testcase is UNSUPPORTED now with -m32 but working with -m64 on x86_64-linux-gnu. gcc/testsuite/ChangeLog: * gcc.dg/pr116588.c: Require int128.

[r15-3529 Regression] FAIL: gcc.dg/pr116588.c (test for excess errors) on Linux/x86_64

2024-09-07 Thread haochen.jiang
On Linux/x86_64, 506417dbc8b1cbc1133a5322572cf94b671aadf6 is the first bad commit commit 506417dbc8b1cbc1133a5322572cf94b671aadf6 Author: Andrew MacLeod Date: Fri Sep 6 11:42:14 2024 -0400 Before running fast VRP, make sure all edges have EXECUTABLE set. caused FAIL: gcc.dg/pr116588.c (t

[pushed] c++: exception spec and stdlib specialization

2024-09-07 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We were silently accepting the pr65923.C specialization of std::swap with the wrong exception specification; it should be declared noexcept. Let's limit ignoring mismatch with system headers to extern "C" functions so we get a diagnostic fo

[PATCH v2] Add new warning Wmissing-designated-initializers [PR39589]

2024-09-07 Thread Peter Frost
v2 Patch: * adds proper changelog text * fixes typo in c.opt Currently the behaviour of Wmissing-field-initializers is inconsistent between C and C++. The C warning assumes that missing designated initializers are deliberate, and does not warn. The C++ warning does warn for missin

[PUSHED] split-path: Fix dump wording about duplicating too many statements

2024-09-07 Thread Andrew Pinski
It was pointed out in https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662183.html, that the wording with this print has too many words. Fixed thusly. Pushed as obvious after a build and test for x86_64-linux-gnu. gcc/ChangeLog: * gimple-ssa-split-paths.cc (is_feasible_trace): F

Re: [patch,reload] PR116326: Add #define IN_RELOAD1_CC

2024-09-07 Thread H.J. Lu
On Sat, Sep 7, 2024, 11:07 AM Georg-Johann Lay wrote: > Am 07.09.24 um 19:51 schrieb H.J. Lu: > > On Sat, Sep 7, 2024 at 10:49 AM Georg-Johann Lay wrote: > >> Am 07.09.24 um 18:35 schrieb Jeff Law: > >>> On 9/6/24 3:40 AM, Georg-Johann Lay wrote: > The reason for PR116326 is that LRA and re

Re: [patch,reload] PR116326: Add #define IN_RELOAD1_CC

2024-09-07 Thread Georg-Johann Lay
Am 07.09.24 um 19:51 schrieb H.J. Lu: On Sat, Sep 7, 2024 at 10:49 AM Georg-Johann Lay wrote: Am 07.09.24 um 18:35 schrieb Jeff Law: On 9/6/24 3:40 AM, Georg-Johann Lay wrote: The reason for PR116326 is that LRA and reload require different ELIMINABLE_REGS for a multi-register frame pointer.

[PATCH] PR tree-optimization/116588 - Before running fast VRP, make sure all edges have, EXECUTABLE set.

2024-09-07 Thread Andrew MacLeod
It appears when we run the fast VRP algorithm, I was neglecting to set all the edges to executable before starting, so a little garbage was sneaking in once in a while... Fixed by calling the same routine regular VRP calls to do this. Bootstraps on x86_64-pc-linux-gnu with no regressions.   Pu

Re: [PATCH] Add new warning Wmissing-designated-initializers [PR39589]

2024-09-07 Thread Andrew Pinski
On Mon, Aug 26, 2024 at 1:59 PM Peter Frost wrote: > > Currently the behaviour of Wmissing-field-initializers is inconsistent > between C and C++. The C warning assumes that missing designated > initializers are deliberate, and does not warn. The C++ warning does warn > for missing designated init

Re: [patch,reload] PR116326: Add #define IN_RELOAD1_CC

2024-09-07 Thread H.J. Lu
On Sat, Sep 7, 2024 at 10:49 AM Georg-Johann Lay wrote: > > Am 07.09.24 um 18:35 schrieb Jeff Law: > > On 9/6/24 3:40 AM, Georg-Johann Lay wrote: > >> The reason for PR116326 is that LRA and reload require different > >> ELIMINABLE_REGS for a multi-register frame pointer. As ELIMINABLE_REGS > >>

Re: [patch,reload] PR116326: Add #define IN_RELOAD1_CC

2024-09-07 Thread Georg-Johann Lay
Am 07.09.24 um 18:35 schrieb Jeff Law: On 9/6/24 3:40 AM, Georg-Johann Lay wrote: The reason for PR116326 is that LRA and reload require different ELIMINABLE_REGS for a multi-register frame pointer.  As ELIMINABLE_REGS is used to initialize static const objects, it is not possible to make ELIMIN

Re: [PATCH] RISC-V: Bugfix for Duplicate entries for -mtune in --target-help[Bug 116347]

2024-09-07 Thread Palmer Dabbelt
On Sat, 07 Sep 2024 10:32:07 PDT (-0700), jeffreya...@gmail.com wrote: On 8/25/24 8:03 PM, Jiawei wrote: 在 2024/8/25 23:38, Jeff Law 写道: On 8/19/24 2:14 AM, shiyul...@iscas.ac.cn wrote: From: yulong This patch try to fix a bug[116347]. I change the name of the micro- arch, because I thi

Re: [PATCH] fixincludes: skip stdio_stdarg_h on darwin

2024-09-07 Thread FX Coudert
Hi Iain, >> This does fix the bootstrap problem on those, thanks >> In this case, I’d like to test it across the OS versions I still test >> regularly - but the machines are all going to be tied up testing the 11.5 RC >> - so it might be a week or so. I do want to get this in as soon as poss -

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-09-07 Thread FX Coudert
ping**many on this patch, originally from January. In latest round, Richard suggested that David should have the last say, I’ve never had any response. > Le 27 juin 2024 à 19:08, FX Coudert a écrit : > > Among the review comments from the last round, Jakub suggested: > >> Perhaps libgccjit.h

Re: [PATCH] RISC-V: Bugfix for Duplicate entries for -mtune in --target-help[Bug 116347]

2024-09-07 Thread Jeff Law
On 8/25/24 8:03 PM, Jiawei wrote: 在 2024/8/25 23:38, Jeff Law 写道: On 8/19/24 2:14 AM, shiyul...@iscas.ac.cn wrote: From: yulong This patch try to fix a bug[116347]. I change the name of the micro- arch, because I think micro-arch and core have the same name that caused the error. gc

Re: [PATCH] RISC-V: Fix ICE for rvv in lto

2024-09-07 Thread Jeff Law
On 9/6/24 11:30 AM, Jin Ma wrote: When we use flto, the function list of rvv will be generated twice, once in the cc1 phase and once in the lto phase. However, due to the different generation methods, the two lists are different. For example, when there is no zvfh or zvfhmin in arch, it is ge

Re: [PATCH v2] RISC-V: Fixed incorrect semantic description in DF to DI pattern in the Zfa extension on rv32.

2024-09-07 Thread Jeff Law
On 9/6/24 5:32 AM, Jin Ma wrote: In the process of DF to SI, we generally use "unsigned_fix" rather than "truncate" for conversion. Although this has no effect in general, unexpected ICE often occurs when precise semantic analysis is required. gcc/ChangeLog: * config/riscv/riscv.md:

Re: [PATCH] Git ignores .vscode

2024-09-07 Thread Jeff Law
On 9/5/24 9:09 PM, YunQiang Su wrote: ChangeLog * .gitignore: Add .vscode. OK jeff

Re: [PATCH] RISC-V: Add missing insn types for XiangShan Nanhu scheduler model

2024-09-07 Thread Jeff Law
On 9/5/24 11:07 PM, Zhao Dingyi wrote: This patch aims to add the missing instruction types to the XiangShan- Nanhu scheduler model. The current XiangShan -Nanhu model lacks the trap, atomic trap, fcvt_i2f, and fcvt_f2i instructions. The trap, atomic, and i2f instructions belong to xs_jmp_r

Re: [patch,reload] PR116326: Add #define IN_RELOAD1_CC

2024-09-07 Thread Jeff Law
On 9/6/24 3:40 AM, Georg-Johann Lay wrote: The reason for PR116326 is that LRA and reload require different ELIMINABLE_REGS for a multi-register frame pointer.  As ELIMINABLE_REGS is used to initialize static const objects, it is not possible to make ELIMINABLE_REGS to depend on options or pat

Re: [PATCH v4] RISC-V: Fix illegal operands "th.vsetvli zero,0,e32,m8" for XTheadVector

2024-09-07 Thread Jeff Law
On 9/6/24 11:40 AM, Jin Ma wrote: Since the THeadVector vsetvli does not support vl as an immediate, we need to convert 0 to zero when outputting asm. PR target/116592 gcc/ChangeLog: * config/riscv/thead.cc (th_asm_output_opcode): Change '0' to "zero" gcc/testsuite/ChangeLo

Re: New version of unsiged patch

2024-09-07 Thread Thomas Koenig
Am 06.09.24 um 20:58 schrieb Steve Kargl: Your testcases are all free source form. In fixed form, gfortran would need to deal with 'u = 1 2 3 4 u _8' I don't have the patch in my tree at the moment, it isn't clear to me if the matcher for an unsigned constant is prepared to deal with space betwe

Re: New version of unsiged patch

2024-09-07 Thread Thomas Koenig
Am 06.09.24 um 20:15 schrieb Steve Kargl: +Generally, unsigned integers are only permitted as data in intrinsics. Does the word 'intrinsics' apply to 'intrinsic operators' or 'intrinsic subprograms' or both? This might benefit from a big of wordiness. You're right, that wasn't clear at all.

Re: [PATCH] Add new warning Wmissing-designated-initializers [PR39589]

2024-09-07 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661510.html

[PATCH] c++, coroutines: Fix handling of bool await_suspend() [PR115905].

2024-09-07 Thread Iain Sandoe
Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? --- 8< --- As noted in the PR the action of the existing implementation was to treat a false value from await_suspend () as equivalent to "do not suspend". Actually it needs to be the equivalent of "resume" - and we need to restart the d

RE: [PATCH] RISC-V: Fix ICE for rvv in lto

2024-09-07 Thread Li, Pan2
> #include > > vint32m1_t foo(vint32m1_t vs1, vint32m1_t vs2, size_t vl) > { > return __riscv_vadd_vv_i32m1(vs1, vs2, vl); > } To double confirm, you mean "riscv64-linux-gnu-gcc-14 -march=rv64gcv -mabi=lp64d -flto -O0 tmp.c -c -S -o -" with above is able to reproduce this ICE? Pan -Or

Re: [PATCH] RISC-V: Fix ICE for rvv in lto

2024-09-07 Thread Jin Ma
> > +/* Test that we do not have ice when compile */ > > + > > +/* { dg-do run } */ > > +/* { dg-options "-march=rv64gcv -mabi=lp64d -mrvv-vector-bits=zvl -flto > > -O2 -fno-checking" } */ > > + > > +#include > > + > > +int > > +main () > > +{ > > + size_t vl = 8; > > + vint32m1_t vs1 = {}; > >

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-09-07 Thread Jakub Jelinek
On Sat, Sep 07, 2024 at 07:50:29AM +0200, Martin Uecker wrote: > > 2. Apple's implementation supports expressions in the '__counted_by' > > attribute, thus the 'count' may be an R-value that can't have its > > address taken. > > > > [1] > > https://discourse.llvm.org/t/rfc-introducing-new-clang

Re: [PATCH] libiberty: Fix up > 64K section handling in simple_object_elf_copy_lto_debug_section [PR116614]

2024-09-07 Thread Richard Biener
> Am 06.09.2024 um 20:50 schrieb Jakub Jelinek : > > Hi! > > cat abc.C > #define A(n) struct T##n {} t##n; > #define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) A(n##5) A(n##6) A(n##7) > A(n##8) A(n##9) > #define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) B(n##5) B(n##6) B(n##7) > B(n##8