Re: [PATCH 1/2] Makefile.tpl: drop leftover intermodule cruft

2024-08-14 Thread Sam James
Sam James writes: > intermodule supported was dropped in r0-103106-gde6ba7aee152a0 with some > remaining bits for Fortran removed in r14-1696-gecc96eb5d2a0e5. > > Remove some small leftovers. > > * Makefile.in: Regenerate. > * Makefile.tpl (STAGE1_CONFIGURE_FL

Re: [PATCH] match: Fix A || B not optimized to true when !B implies A [PR114326]

2024-08-15 Thread Sam James
Konstantinos Eleftheriou writes: > From: kelefth > > In expressions like (a != b || ((a ^ b) & CST0) == CST1) and > (a != b || (a ^ b) == CST), (a ^ b) is folded to false. > In the equivalent expressions (((a ^ b) & CST0) == CST1 || a != b) and > ((a ^ b) == CST, (a ^ b) || a != b) this is not h

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-08-15 Thread Sam James
Sam James writes: > Eric Gallager writes: > >> On Wed, Aug 14, 2024 at 8:50 AM Sam James wrote: >>> >>> libtool defaults to filtering flags passed at link-time. >>> >>> This brings the filtering in GCC's 'f

Re: [PATCH v2] [testsuite] add linkonly to dg-additional-sources [PR115295]

2024-08-15 Thread Sam James
Pinging this one on behalf of Alexandre. It fixes a bunch of D test failures for us (I'm slowly working my way through packaging issues). Iain mentioned it's blocking him upgrading the D stdlib too. signature.asc Description: PGP signature

Re: [PATCH] Build/Cross: Look for target headers from include if sys-include doesn't exist

2024-08-20 Thread Sam James
YunQiang Su writes: > YunQiang Su 于2024年7月5日周五 16:14写道: >> >> Ping again. > > Ping. I can test it next week but I can't approve it. Remind me then?

Re: [PATCH] rs6000: allow split vsx_stxvd2x4_le_const after RA[pr116030]

2024-08-21 Thread Sam James
Jiufu Guo writes: > Hi, > > Previous, vsx_stxvd2x4_le_const_ is introduced for 'split1' pass, > so it is guarded by "can_create_pseudo_p ()". > While, it would be possible to match the pattern of this insn during/after > RA, so this insn could be updated to make it work for split pass after RA. >

Re: [PATCH] libstdc++: Optimize std::gcd

2024-06-07 Thread Sam James
Stephen Face writes: > This patch is to optimize the runtime execution of gcd. Mathematically, > it computes with the same algorithm as before, but subtractions and > branches are rearranged to encourage generation of code that can use > flags from the subtractions for conditional moves. Addition

Re: [PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI match

2024-06-10 Thread Sam James
pan2...@intel.com writes: > From: Pan Li > > When enabled the PHI handing for COND_EXPR, we need to insert the gcall > to replace the PHI node. Unfortunately, I made a mistake that insert > the gcall to before the last stmt of the bb. See below gimple, the PHI > is located at no.1 but we ins

Re: [PATCH] RISC-V: Add configure check for Zaamo/Zalrsc assembler support

2024-06-12 Thread Sam James
Palmer Dabbelt writes: > On Wed, 12 Jun 2024 16:20:26 PDT (-0700), Patrick O'Neill wrote: >> Binutils 2.42 and before don't support Zaamo/Zalrsc. Add a configure >> check to prevent emitting Zaamo/Zalrsc in the arch string when the >> assember does not support it. > > Should we just rewrite these

Re: [PATCH] RISC-V: Add configure check for Zaamo/Zalrsc assembler support

2024-06-12 Thread Sam James
Palmer Dabbelt writes: > On Wed, 12 Jun 2024 16:56:09 PDT (-0700), Patrick O'Neill wrote: >> >> On 6/12/24 16:49, Sam James wrote: >>> Palmer Dabbelt writes: >>> >>>> On Wed, 12 Jun 2024 16:20:26 PDT (-0700), Patrick O'Neill wrote: >>

Re: [PATCH] build: Fix missing variable quotes

2024-06-13 Thread Sam James
Collin Funk writes: > When dlopen and pthread_create are in libc the variable is > set to "none required", therefore running configure will show > the following errors: > > ./configure: line 8997: test: too many arguments > ./configure: line 8999: test: too many arguments > ./configure: line 9003

Re: [PATCH] build: Fix missing variable quotes

2024-06-18 Thread Sam James
YunQiang Su writes: > OK for trunk? It looks good to me, but I can't approve. (I'd dare say it's obvious, even.) Richard, any chance you could give it a quick ack?

Re: [PATCH 4/7 v2] lto: Implement ltrans cache

2024-06-21 Thread Sam James
Andi Kleen writes: > FWIW I suspect not handling lockfile errors could be a show stopper > even for an initial implementation. It's not that uncommon that people > press Ctrl-C. flock on systems that have it would be a safer > alternative. > >> There are many things to do and I think it is bette

Re: [PATCH] gcc: stop adding -fno-common for checking builds

2024-07-21 Thread Sam James
Richard Biener writes: >> Am 20.07.2024 um 02:31 schrieb Andrew Pinski : >> >> On Fri, Jul 19, 2024 at 5:23 PM Sam James wrote: >>> >>> Originally added in r0-44646-g204250d2fcd084 and r0-44627-gfd350d241fecf6 >>> whic >>> mov

Re: [PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-07-21 Thread Sam James
Richard Sandiford writes: > Xi Ruoyao writes: >> On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: >>> Some distributions like Gentoo make -Wformat and -Wformat-security >>> enabled by default. Pass -Wno-format to the test to avoid a spurious >>> fai

[PATCH] doc: Document -O1 as the preferred level for large machine-generated code

2024-07-23 Thread Sam James
At -O1, the intention is that we compile things in a "reasonable" amount of time (ditto memory use). In particular, we try to especially avoid optimizations which scale poorly on pathological cases, as is the case for large machine-generated code. Recommend -O1 for large machine-generated code, as

Re: [PATCH] doc: Document -O1 as the preferred level for large machine-generated code

2024-07-23 Thread Sam James
Sam James writes: (oops, forgot to CC docs maintainers. Done now.) > At -O1, the intention is that we compile things in a "reasonable" amount > of time (ditto memory use). In particular, we try to especially avoid > optimizations which scale poorly on pathological cases, a

Re: [PATCH] doc: Document -O1 as the preferred level for large machine-generated code

2024-07-25 Thread Sam James
Eric Gallager writes: > On Tue, Jul 23, 2024 at 10:07 AM Sam James wrote: >> >> At -O1, the intention is that we compile things in a "reasonable" amount >> of time (ditto memory use). In particular, we try to especially avoid >> optimizations which scale po

Re: [PATCH v1 1/2] PR116080: Fix tail call dejagnu checks

2024-07-25 Thread Sam James
Andi Kleen writes: > From: Andi Kleen > > - Run the target_effective tail_call checks without optimization to > match the actual test cases. > - Add an extra check for external tail calls to handle targets like > powerpc that cannot tail call between different object files. > This one will also

Re: [RESEND PATCH v5 1/3] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2024-07-26 Thread Sam James
Manolis Tsamis writes: > This is an extension of what was done in PR106590. FWIW, I think that if a bug is worth mentioning in the commit message, it's worth tagging so the hooks pick it up (as you get a nice reverse-mapping then if anyone is looking at it and wondering if a follow-up occurred).

[PATCH] MAINTAINERS: Add myself to write after approval

2024-07-26 Thread Sam James
Harsha Jagasia hjagasia Fariborz Jahanian - Martin Jambor jamborm +Sam James sjames Surya Kumari Jangalajskumari Jakub Jelinek jakub

Re: [PATCH] testsuite: Add dg-do run to even more tests, fix typo

2024-07-26 Thread Sam James
Sam James writes: > All of these are for wrong-code bugs. Confirmed to be used before but > with no execution. > > Tested on x86_64-pc-linux-gnu and checked test logs before/after. > Pushed as obvious after discussion on IRC. Thanks.

[PATCH 1/2] testsuite: fix dg-do ordering wrt dg-require-*

2024-07-27 Thread Sam James
Per gccint, dg-do must precede dg-require-effective-target or dg-require-support. Fix a handful of deviant cases. gcc/testsuite/ChangeLog: * gcc.dg/pr25521.c: Fix dg-do directive order. * gcc.dg/vect/vect-simd-clone-19.c: Likewise. * gcc.target/arm/stack-protector-7.c: Lik

[PATCH 2/2] testsuite: fix dg-add-options vs. dg-options ordering

2024-07-27 Thread Sam James
Per gccint, dg-add-options must be placed after all dg-options directives. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/cmpmem-2.c: Fix dg-add-options order. --- Simple dejagnu directive fixes. OK? gcc/testsuite/gcc.target/riscv/rvv/base/cmpmem-2.c | 2 +- 1 file changed, 1 inse

[COMMITTED] [PATCH] testsuite: make PR115277 test an execute one

2024-07-29 Thread Sam James
PR middle-end/115277 * gcc.c-torture/compile/pr115277.c: Rename to... * gcc.c-torture/execute/pr115277.c: ...this. --- ACKed on IRC by honza. Pushed. gcc/testsuite/gcc.c-torture/{compile => execute}/pr115277.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename gc

[COMMITTED PATCH] testsuite: fix PR111613 test

2024-07-29 Thread Sam James
PR ipa/111613 * gcc.c-torture/pr111613.c: Rename to.. * gcc.c-torture/execute/pr111613.c: ...this. --- Pushed as obvious. It wasn't being used at all in the old location. gcc/testsuite/gcc.c-torture/{ => execute}/pr111613.c | 0 1 file changed, 0 insertions(+), 0 deletions

[COMMITTED PATCH] testsuite: fix dg-do run whitespace

2024-07-30 Thread Sam James
This caused the tests to not be run. I may do further passes for non-run next. Tested on x86_64-pc-linux-gnu and checked test logs before/after. PR c/53548 PR target/101529 PR tree-optimization/102359 * c-c++-common/fam-in-union-alone-in-struct-1.c: Fix whitespace

[COMMITTED PATCH 2/3] testsuite: fix whitespace in dg-do preprocess directive

2024-07-30 Thread Sam James
PR preprocessor/90581 * c-c++-common/cpp/fmax-include-depth.c: Fix whitespace in dg directive. --- Committed as obvious. gcc/testsuite/c-c++-common/cpp/fmax-include-depth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/c-c++-common/cpp/fmax-incl

[COMMITTED PATCH 3/3] testsuite: fix whitespace in dg-do assemble directive

2024-07-30 Thread Sam James
* gcc.target/aarch64/simd/vmmla.c: Fix whitespace in dg directive. --- Committed as obvious. gcc/testsuite/gcc.target/aarch64/simd/vmmla.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vmmla.c b/gcc/testsuite/gcc.target/aarch64/

[COMMITTED PATCH 1/3] testsuite: fix whitespace in dg-do compile directives

2024-07-30 Thread Sam James
Nothing seems to change here in reality at least on x86_64-pc-linux-gnu, but important to fix nonetheless in case people copy it. PR rtl-optimization/48633 PR tree-optimization/83072 PR tree-optimization/83073 PR tree-optimization/96542 PR tree-optimization/

[PATCH] testsuite: fix whitespace in dg-require-effective-target directives

2024-07-30 Thread Sam James
PR middle-end/54400 PR target/98161 * gcc.dg/vect/bb-slp-layout-18.c: Fix whitespace in dg directive. * gcc.dg/vect/bb-slp-pr54400.c: Likewise. * gcc.target/i386/pr98161.c: Likewise. --- Committed as obvious. gcc/testsuite/gcc.dg/vect/bb-slp-layout-18.c | 2

Re: [PATCH] Add a bootstrap-native build config

2024-07-30 Thread Sam James
Andi Kleen writes: > From: Andi Kleen > > ... that uses -march=native -mtune=native to build a compiler optimized > for the host. > I like the idea and I'll probably use this. (I can't approve it though.) > config/ChangeLog: > > * bootstrap-native.mk: New file. > > gcc/ChangeLog: > >

[PATCH] testsuite: fix 'dg-compile' typos

2024-07-30 Thread Sam James
'dg-compile' is not a thing, replace it with 'dg-do compile'. PR target/68015 PR c++/83979 * c-c++-common/goacc/loop-shape.c: Fix 'dg-compile' typo. * g++.dg/pr83979.C: Likewise. * g++.target/aarch64/sve/acle/general-c++/attributes_2.C: Likewise. * g

Re: [PATCH] testsuite: Adjust fam-in-union-alone-in-struct-2.c to support BE [PR116148]

2024-07-31 Thread Sam James
"Kewen.Lin" writes: > Hi, > > As Andrew pointed out in PR116148, fam-in-union-alone-in-struct-2.c > was designed for little-endian, the recent commit r15-2403 made it > be tested with running on BE and PR116148 got exposed. > > This patch is to adjust the expected data for members in with_fam_2_v

Re: [PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Sam James
Andrew Pinski writes: > When this pattern was converted from being only dealing with 0/-1, we missed > that if `e == f` is true > then the optimization is wrong and needs an extra check for that. > > This changes the patterns to be: > /* (a ? x : y) != (b ? x : y) --> (a^b & (x != y)) ? TRUE :

[COMMITTED PATCH 1/5] testsuite: libgomp: fix dg-do run typo

2024-07-31 Thread Sam James
'dg-run' is not a valid dejagnu directive, 'dg-do run' is needed here for the test to be executed. That said, it actually seems to be executed for me anyway, presumably a default in the directory, but let's fix it to be consistent with other uses in the tree and in that test directory even. libgo

[COMMITTED PATCH 2/5] testsuite: fix 'dg-do-compile' typos

2024-07-31 Thread Sam James
We want 'dg-do compile', not 'dg-do-compile'. Fix that. PR target/69194 PR c++/92024 PR c++/110057 * c-c++-common/Wshadow-1.c: Fix 'dg-do compile' typo. * g++.dg/tree-ssa/devirt-array-destructor-1.C: Likewise. * g++.dg/tree-ssa/devirt-array-destructo

[COMMITTED PATCH 3/5] testsuite: fix 'dg-do-preprocess' typo

2024-07-31 Thread Sam James
We want 'dg-do preprocess', not 'dg-do-preprocess'. Fix that. PR target/106828 * g++.target/loongarch/pr106828.C: Fix 'dg-do compile' typo. --- Committed as obvious. gcc/testsuite/g++.target/loongarch/pr106828.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[COMMITTED PATCH 4/5] testsuite: fix dg-require-effective-target order vs dg-additional-sources

2024-07-31 Thread Sam James
Per gccint, 'dg-require-effective-target' must come before any 'dg-additional-sources' directives. Fix a handful of deviant cases. gcc/testsuite/ChangeLog: * gcc.target/aarch64/aapcs64/func-ret-3.c: Fix dg-require-effective-target directive order. * gcc.target/aarch64/aapcs64/func

[COMMITTED PATCH 5/5] testsuite: fix dg-require-* order vs dg-additional-sources

2024-07-31 Thread Sam James
Per gccint, 'dg-require-*' must come before any 'dg-additional-sources' directives. Fix a handful of deviant cases. * gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c: Fix dg-require-profiling directive order. * gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c: Likewise. -

[PATCH] libstdc++: drop bogus 'dg_do run' directive

2024-07-31 Thread Sam James
We already have a valid 'dg-do run' (- vs _) directive, so drop the bogus one. libstdc++-v3/ChangeLog: * testsuite/28_regex/traits/char/translate.cc: Drop bogus 'dg_do run'. --- OK? No regressions in the logs but it's a bit weird that it's got a proper directive with a target specifier so

Re: [PATCH] libstdc++: drop bogus 'dg_do run' directive

2024-07-31 Thread Sam James
Jonathan Wakely writes: > On Wed, 31 Jul 2024 at 16:45, Sam James wrote: >> >> We already have a valid 'dg-do run' (- vs _) directive, so drop the bogus >> one. >> >> libstdc++-v3/ChangeLog: >> * testsuite/28_regex/traits/char/translate

Re: [PATCH] IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]

2024-08-02 Thread Sam James
Andrew Pinski writes: > Late_combine exposed this latent bug in split_live_ranges_for_shrink_wrap. > What it did was copy-prop regno 151 from regno 119 from: > ``` > (insn 2 264 3 2 (set (reg/f:DI 119 [ thisD.3697 ]) > (reg:DI 151)) "/app/example.cpp":19:13 70 {*movdi_aarch64} > (exp

Re: [PATCH] wide-int: Fix up mul_internal overflow checking [PR116224]

2024-08-06 Thread Sam James
Jakub Jelinek writes: > Hi! > > The following testcase is miscompiled, because wi::mul for (_BitInt(65))-15 > times (_BitInt(65))-15 computes the right value (_BitInt(65))225, but > sets *overflow to wi::OVF_UNKNOWN as that it overflowed when it didn't. > > Even signed operands are unpacked as un

Re: [RESEND PATCH v5 1/3] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2024-08-06 Thread Sam James
less I hear otherwise. I'd ping Jeff for a quick re-review of v5 to make sure he's happy with the changes to address https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656908.html. I can't comment on ifcvt changes to say if they're OK or not otherwise, sorry. > > T

Re: [PATCH] vect: Fix vect_reduction_def check for odd/even widen mult [PR116142]

2024-08-06 Thread Sam James
Xi Ruoyao writes: > The check was implemented incorrectly, so vec_widen_smult_{even,odd}_M > was never used. This is not good for targets with native even/odd > widening multiplication but not lo/hi multiplication. > > The fix is actually developed by Richard Biener. Please use Co-authored-by f

Re: [PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-08-07 Thread Sam James
Richard Sandiford writes: > Xi Ruoyao writes: >> On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: >>> Some distributions like Gentoo make -Wformat and -Wformat-security >>> enabled by default. Pass -Wno-format to the test to avoid a spurious >>> fai

Re: [wwwdocs] gcc-14: Mention that some warnings are now errors

2024-04-13 Thread Sam James
Eric Gallager writes: > On Sat, Apr 13, 2024 at 5:51 AM Sebastian Huber > wrote: >> >> --- >> htdocs/gcc-14/changes.html | 11 +++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html >> index 8ac08e9a..a183fad8 100644 >> --- a/h

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-08-31 Thread Sam James
Sam James writes: > libtool defaults to filtering flags passed at link-time. > > This brings the filtering in GCC's 'fork' of libtool into sync with > upstream libtool commit 22a7e547e9857fc94fe5bc7c921d9a4b49c09f8e. > > In particular, this now allows some harm

Re: PING: [PATCH] ipa: Don't disable function parameter analysis for fat LTO streaming

2024-09-03 Thread Sam James
"H.J. Lu" writes: > On Tue, Aug 27, 2024 at 1:11 PM H.J. Lu wrote: >> >> Update analyze_parms not to disable function parameter analysis for >> -ffat-lto-objects. Tested on x86-64, there are no differences in zstd >> with "-O2 -flto=auto" -g "vs -O2 -flto=auto -g -ffat-lto-objects". >> >>

[releases/gcc-14 PATCH COMMITTED] testsuite: fix PR111613 test

2024-10-13 Thread Sam James
PR ipa/111613 * gcc.c-torture/pr111613.c: Rename to.. * gcc.c-torture/execute/pr111613.c: ...this. (cherry picked from commit 5e5d7a88932b132437069f716160f8b20862890b) --- I actually thought I'd backported this already. Pushed as obvious, as the test issue was only introduc

[releases/gcc-13 PATCH 0/2] Two backports (Valgrind noise, wrong-code)

2024-10-13 Thread Sam James
Two backports for Valgrind noise (PR109920, PR116808) and wrong-code (PR109934, PR117100). OK? Bootstrapped and regtested with no regressions. Aldy Hernandez (2): Use delete[] in int_range destructor [PR109920] Remove buggy special case in irange::invert [PR109934]. gcc/testsuite/gcc.dg/tre

[releases/gcc-13 PATCH 2/2] Remove buggy special case in irange::invert [PR109934].

2024-10-13 Thread Sam James
From: Aldy Hernandez This patch removes a buggy special case in irange::invert which seems to have been broken for a while, and probably never triggered because the legacy code was handled elsewhere, and the non-legacy code was using an int_range_max of int_range<255> which made it extremely like

[releases/gcc-13 PATCH 1/2] Use delete[] in int_range destructor [PR109920]

2024-10-13 Thread Sam James
From: Aldy Hernandez gcc/ChangeLog: PR tree-optimization/109920 * value-range.h (RESIZABLE>::~int_range): Use delete[]. (cherry picked from commit 493a63af6cbab094c36a76435c12b1886328dab8) --- gcc/value-range.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] libstdc++: testsuite: adjust name_fortify test for pre-defined _FORTIFY_SOURCE

2024-10-13 Thread Sam James
Otherwise we get failures with toolchains that have _FORTIFY_SOURCE defined already to a different value like 3. libstdc++-v3/ChangeLog: * testsuite/17_intro/names_fortify.cc: Undefine _FORTIFY_SOURCE. --- I'll commit later if no objections. libstdc++-v3/testsuite/17_intro/names_fortify

Re: [PATCH] libstdc++: testsuite: adjust name_fortify test for pre-defined _FORTIFY_SOURCE

2024-10-13 Thread Sam James
Jonathan Wakely writes: > On Sun, 13 Oct 2024 at 23:23, Sam James wrote: >> >> Otherwise we get failures with toolchains that have _FORTIFY_SOURCE >> defined already to a different value like 3. > > I was going to say we could do: > > #ifndef _FORTIFY_SOURCE >

Re: Fortran test typebound_operator_7.f03 broken by non-Fortran commit. Confirm anyone?

2024-10-14 Thread Sam James
Sam James writes: > Andre Vehreschild writes: > >> Hi all, >> >> please note, that I don't know this bisecting very well, so this may very >> well >> be a wrong blame. During latest regression testing of the Fortran suite I got

Re: Fortran test typebound_operator_7.f03 broken by non-Fortran commit. Confirm anyone?

2024-10-14 Thread Sam James
Andre Vehreschild writes: > Hi all, > > please note, that I don't know this bisecting very well, so this may very well > be a wrong blame. During latest regression testing of the Fortran suite I got > typebound_operator_7.f03 failing with: > > typebound_operator_7.f03:94:25: > >94 | u = (u*

[PATCH] config: add -Werror=lto-type-mismatch,odr to bootstrap-lto*

2024-10-09 Thread Sam James
Add -Werror=lto-type-mismatch,odr to bootstrap-lto* configurations to help stop LTO breakage/correctness issues sneaking in. We discussed -Werror=strict-aliasing but it runs early and doesn't give better diagnostics with LTO so left it out. config/ChangeLog: PR rust/108087 PR ada/

Re: [PING] [PATCH] i386: Implement Thread Local Storage on Windows

2024-10-07 Thread Sam James
Julian Waters writes: > Resending again as I forgot to send it to the list > >> Sorry, I somehow missed it. :-( Then a configure check should be added in >> the >> compiler to tell whether the detected linker has the fix or not. > >> There are already some specific checks for the PE linker at

[COMMITTED 1/2] testsuite: add missing braces around dejagnu directives

2024-10-04 Thread Sam James
gcc/testsuite/ChangeLog: * c-c++-common/analyzer/flex-without-call-summaries.c: Add missing brace. * c-c++-common/analyzer/malloc-callbacks.c: Ditto. * gcc.dg/Wstringop-overflow-79.c: Ditto. * gcc.dg/Wstringop-overflow-80.c: Ditto. --- .../analyzer/flex-without-ca

[COMMITTED 2/2] testsuite: fix two newly-running -Wstringop-overflow test directives

2024-10-04 Thread Sam James
This didn't show up until the previous commit which fixed the directive syntax. The indexing was off for the notes. gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-79.c: Fix index for notes. * gcc.dg/Wstringop-overflow-80.c: Ditto. --- gcc/testsuite/gcc.dg/Wstringop-overflow

Re: [PATCH] sparc: drop -mlra

2024-10-16 Thread Sam James
Eric Botcazou writes: >> Let's finish the transition by dropping -mlra entirely. >> >> Tested on sparc64-unknown-linux-gnu with no regressions. >> >> gcc/ChangeLog: >> PR target/113952 >> >> * config/sparc/sparc.cc (sparc_lra_p): Delete. >> (TARGET_LRA_P): Ditto. >> (sparc_

[PATCH] sparc: drop -mlra

2024-10-15 Thread Sam James
The sparc port gained LRA support in r7-5076-gf99bd883fb0d05 and has defaulted to LRA since r7-5642-g70a6dbe7e37e69. Let's finish the transition by dropping -mlra entirely. Tested on sparc64-unknown-linux-gnu with no regressions. gcc/ChangeLog: PR target/113952 * config/sparc/sp

[PATCH] vax: fixup vax.opt.urls

2024-10-16 Thread Sam James
Needed after r15-4373-gb388f65abc71c9. gcc/ChangeLog: * config/vax/vax.opt.urls: Adjust index for -mlra. --- Pushed. gcc/config/vax/vax.opt.urls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/vax/vax.opt.urls b/gcc/config/vax/vax.opt.urls index 10bee25d83

Re: [PATCH] config: add -Werror=lto-type-mismatch,odr to bootstrap-lto*

2024-10-15 Thread Sam James
Sam James writes: > Add -Werror=lto-type-mismatch,odr to bootstrap-lto* configurations to > help stop LTO breakage/correctness issues sneaking in. > > We discussed -Werror=strict-aliasing but it runs early and doesn't > give better diagnostics with LTO so left it out.

[PATCH] testsuite: add testcase for fixed PR115933

2024-10-20 Thread Sam James
gcc/testsuite/ChangeLog: PR rtl-optimization/115933 * gcc.dg/pr115933.c: New test. --- The PR is fixed but the bisect wasn't conclusive (only to a range) and the testcase is sufficiently different from the commits in that range to be worth adding IMO. OK? gcc/testsuite/gcc.dg/pr1

Re: [PATCH] c++: Fix crash during NRV optimization with invalid input [PR117099]

2024-10-16 Thread Sam James
Simon Martin writes: > We ICE upon the following invalid code because we end up calling > finalize_nrv_r with a RETURN_EXPR with no operand. > > === cut here === > struct X { > ~X(); > }; > X test(bool b) { > { > X x; > return x; > } > if (!(b)) return; > } > === cut here === >

Re: [PATCH] c++: Fix crash during NRV optimization with invalid input [PR117099]

2024-10-18 Thread Sam James
Simon Martin writes: > Hi Sam, Hi Simon, > > On 16 Oct 2024, at 22:06, Sam James wrote: > >> Simon Martin writes: >> >>> We ICE upon the following invalid code because we end up calling >>> finalize_nrv_r with a RETURN_EXPR with no operand. >&g

Re: [PATCH]middle-end: Fix GSI for gcond root [PR117140]

2024-10-18 Thread Sam James
Tamar Christina writes: > Hi All, > > When finding the gsi to use for code of the root statements we should use the > one of the original statement rather than the gcond which may be inside a > pattern. > > Without this the emitted instructions may be discarded later. > > Bootstrapped Regtested o

Re: [PATCH] libcpp: Implement clang -Wheader-guard warning [PR96842]

2024-10-01 Thread Sam James
Marek Polacek writes: > On Wed, Sep 11, 2024 at 11:26:42PM +0200, Jakub Jelinek wrote: > [...] >> --- gcc/testsuite/c-c++-common/cpp/Wheader-guard-1-1.h.jj2024-09-11 >> 19:26:39.912834079 +0200 >> +++ gcc/testsuite/c-c++-common/cpp/Wheader-guard-1-1.h 2024-09-11 >> 19:02:02.414054285

Re: [PATCH] libstdc++: Test 17_intro/names.cc with -D_FORTIFY_SOURCE=2 [PR116210]

2024-10-04 Thread Sam James
Jakub Jelinek writes: > On Fri, Oct 04, 2024 at 12:52:11PM +0100, Jonathan Wakely wrote: >> This doesn't really belong in our testsuite, because the sole purpose of >> the new test is to find bugs in the Glibc wrappers (like the one linked >> below). But maybe it's a kindness to do it in our test

Re: [PATCH 1/2] gcc: make Valgrind errors fatal during bootstrap

2024-10-04 Thread Sam James
Jeff Law writes: > On 10/2/24 8:39 PM, Sam James wrote: >> Valgrind doesn't error out by default which means bootstrap issues like >> in PR116945 can easily be missed: pass --exit-errorcode=1 to handle this. >> While here, also set --trace-children=yes to cover c

Re: [PATCH 2/2] c++: -Wdeprecated enables later standard deprecations

2024-10-03 Thread Sam James
Jason Merrill writes: > On 10/3/24 7:09 PM, Eric Gallager wrote: >> On Thu, Oct 3, 2024 at 12:41 PM Jason Merrill wrote: >>> >>> By default -Wdeprecated warns about deprecations in the active standard. >>> When specified explicitly, let's also warn about deprecations in later >>> standards. >> T

Re: [PATCH] gcc-wwwdocs: Mention check-c++-all target for C++ front end patch testing

2024-10-03 Thread Sam James
Simon Martin writes: > This is a follow-up to the discussion about testing changes to the C++ > front end in > https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664258.html > > It also clarifies that the make invocation examples should be made from > the *build* tree. > > Validated fine via

[COMMITTED] gcc: fix typo in gimplify

2024-10-03 Thread Sam James
gcc/ChangeLog: * gimplify.cc (gimple_add_init_for_auto_var): Fix 'variable' typo. --- Committed as obvious. gcc/gimplify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index ceb53e5d5bb7..dd7efa71b742 100644 --- a/gcc/gimplify.cc

[COMMITTED] testsuite: gnat.dg: fix dg-do directive syntax

2024-10-03 Thread Sam James
Fix incorrect use of '[' rather than '{' in 'dg-...' directives. gcc/testsuite/ChangeLog: * gnat.dg/pack13.adb: Fix 'dg-...' directive syntax. * gnat.dg/size_attribute.adb: Ditto. * gnat.dg/subp_elim_errors.adb: Ditto. --- Committed as obvious. gcc/testsuite/gnat.dg/pack

Re: [releases/gcc-13 PATCH 0/2] Two backports (Valgrind noise, wrong-code)

2024-10-14 Thread Sam James
Sam James writes: > Two backports for Valgrind noise (PR109920, PR116808) and wrong-code > (PR109934, PR117100). > > OK? Bootstrapped and regtested with no regressions. > > Aldy Hernandez (2): > Use delete[] in int_range destructor [PR109920] > Remove buggy specia

Re: [PATCH #3/7] introduce ifcombine_replace_cond

2024-11-01 Thread Sam James
Alexandre Oliva writes: > Refactor ifcombine_ifandif, moving the common code from the various > paths that apply the combined condition to a new function. BTW, forgive the possibly silly question, but I don't see any testcases for the series. Would it be possible to add any? > > > for gcc/Chan

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: > Control this with a new option -fdiagnostics-details. > > $ cat t.c > extern void warn(void); > static inline void assign(int val, int *regs, int *index) > { > if (*index >= 4) > warn(); > *regs = val; > } > struct nums {int vals[4];}; > > void sparx5_set (int *ptr, st

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
David Malcolm writes: > On Wed, 2024-10-30 at 17:33 +0000, Sam James wrote: >> Qing Zhao writes: >> >> > > On Oct 30, 2024, at 10:48, David Malcolm >> > > wrote: >> > > >> > > On Wed, 2024-10-30 at 14:34 +, Sam James wrote

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: >> On Oct 30, 2024, at 10:48, David Malcolm wrote: >> >> On Wed, 2024-10-30 at 14:34 +, Sam James wrote: >>> Qing Zhao writes: >>> >>>> Control this with a new option -fdiagnostics-details. >>>> >>>

Re: [PATCH v3 0/2][RFC]Provide more contexts for -Warray-bounds warning messages

2024-10-30 Thread Sam James
Qing Zhao writes: > Hi, > > This is the 3rd version of the patch for fixing PR109071. > > Thanks a lot for San James's help to test the previous 2nd version of > the patch on a lot of packages in the wild and provide detailed analysis > and filed new bugs. (PR117179, PR117180, etc). Thank you Q

Re: [PATCH v3 2/2][RFC] Add debugging for move history.

2024-10-30 Thread Sam James
Qing Zhao writes: > gcc/ChangeLog: > > * diagnostic-move-history.cc (dump_move_history): New routine. > (dump_move_history_for): Likewise. > (debug_mv_h): Likewise. > * diagnostic-move-history.h (dump_move_history): New prototype. > (dump_move_history_for): Likewise.

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: > Control this with a new option -fdiagnostics-details. > > [...] The patch doesn't apply for me on very latest trunk -- I think David's recent diag refactoring means it needs a slight rebase. Could you send that?

[PATCH] testsuite: fix c23-constexpr-2a.c test to use dg-do run

2024-10-31 Thread Sam James
The comment at the top of the test indicates it should be an execution test, but it was only using 'dg-do link'. Correct that. The only change in test results is as expected: ``` +PASS: gcc.dg/c23-constexpr-2a.c execution test ``` gcc/testsuite/ChangeLog: PR testsuite/117183 * gc

[PATCH] testsuite: add testcase for fixed PR106073

2024-10-30 Thread Sam James
This was fixed by r12-8835-ge8d5f3a1b5a583 which surely made it latent but richi points out it was likely an instance of PR90348. -fstack-reuse continues to be a menace, so let's add the testcase. gcc/testsuite/ChangeLog: PR middle-end/90348 PR tree-optimization/106073 * g

Re: Implement removal of malloc/free pairs with NULL check

2024-11-01 Thread Sam James
Alexander Monakov writes: > On Fri, 1 Nov 2024, Jan Hubicka wrote: > >> > I have a vague memory that one of the tests in SPEC has a loop that >> > tries to malloc, doubling the size each time, until it fails. Would >> > the patch change the behavior of such a loop? >> >> If the resulting alloca

Re: [PATCH] testsuite: add testcase for fixed PR107467

2024-10-28 Thread Sam James
Mike Stump writes: > On Oct 25, 2024, at 12:47 PM, Sam James wrote: >> >> PR107467 ended up being fixed by the fix for PR115110, but let's >> add the testcase on top. >> >> gcc/testsuite/ChangeLog: >> PR tree-optimization/107467 >>

[PATCH] gcc: fix 'statements' comment typo

2024-10-28 Thread Sam James
gcc/ChangeLog: * opts-common.cc (prune_options): Fix typo. --- Pushed as obvious. gcc/opts-common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/opts-common.cc b/gcc/opts-common.cc index 22774457bf0f..ac2e77b16590 100644 --- a/gcc/opts-common.cc +++ b/gcc/opts

Re: [PATCH] config: add -Werror=lto-type-mismatch,odr to bootstrap-lto*

2024-10-28 Thread Sam James
Sam James writes: > Sam James writes: > >> Add -Werror=lto-type-mismatch,odr to bootstrap-lto* configurations to >> help stop LTO breakage/correctness issues sneaking in. >> >> We discussed -Werror=strict-aliasing but it runs early and doesn't >> give b

[PATCH] doc: mention STAGE1_CFLAGS

2024-11-10 Thread Sam James
STAGE1_CFLAGS can be used to accelerate the just-built stage1 compiler which especially improves its performance on some of the large generated files during bootstrap. It defaults to nothing (i.e. -O0). The downside is that if the native compiler is buggy, there's a greater risk of a failed bootst

[PATCH htdocs] bugs: mention ASAN too

2024-11-10 Thread Sam James
Request that reporters try `-fsanitize=address,undefined` rather than just `-fsanitize=undefined` when reporting bugs. We get invalid bug reports which ASAN would've caught sometimes, even if it's less often than where UBSAN would help. --- OK? htdocs/bugs/index.html | 2 +- 1 file changed, 1 ins

Re: [PATCH] c++: Add __builtin_operator_{new,delete} support

2024-11-11 Thread Sam James
Jakub Jelinek writes: > On Fri, Nov 08, 2024 at 06:40:16PM +0100, Jakub Jelinek wrote: >> clang++ adds __builtin_operator_{new,delete} builtins which as documented >> work similarly to ::operator {new,delete}, except that it is an error >> if the called ::operator {new,delete} is not a replaceabl

Re: [PATCH] c++: Add __builtin_operator_{new,delete} support

2024-11-11 Thread Sam James
Jakub Jelinek writes: > On Mon, Nov 11, 2024 at 06:47:43PM +0000, Sam James wrote: >> > Bootstrapped/regtested successfully on x86_64-linux and i686-linux. >> >> Maybe tag PR110137 given it's very related (and of interest to people >> CC'd on the bu

[PATCH] testsuite: fixup tbaa test again

2024-10-25 Thread Sam James
Test was broken until r15-4684-g2d1d6be00257c5 which made it actually run and r15-4685-g091e45b4e97d1e which applied fixes other than the trivial rename. But more is needed: this gets the test working properly in terms of scanning the dump and handling the interaction w/ LTO with not producing an

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Sam James
Jakub Jelinek writes: > On Fri, Oct 25, 2024 at 01:25:25PM +0200, Arsen Arsenović wrote: >> Maybe we should go the other way around? Compressing eight spaces into >> a tab leads to strange artifacts in diffs (where lines appear >> misindented because some were aligned by tabs and some by spaces)

[committed] testsuite: fix syntax in Wstringop-overflow-59.c

2024-10-30 Thread Sam James
Fix quoting issues, escaping, and dg directive types. There were two issues here: 1) The incorrect quoting in an earlier dg-message was covering up that the syntax in the next part was wrong; 2) Fix dg-warning -> dg-message to correctly pick up the notes. Once 1) was fixed, this was exposed. With

Re: [PATCH 0/3] Move some single-file LTO tests to torture

2024-10-31 Thread Sam James
Sam James writes: > Andrew pointed this out when committing those testsuite fixes earlier. We > may as well make these proper torture tests rather than having them > unnecessarily in the special lto/ dir which is meant for multiple files > really. > > Sam James (3): > t

[COMMITTED 3/3] testsuite: g++.dg: torture: fix PR111520 filename

2024-10-31 Thread Sam James
gcc/testsuite/ChangeLog: PR tree-optimization/111520 * g++.dg/torture/harden-comp-pr111520.cc: Move to... * g++.dg/torture/harden-comp-pr111520.C: ...here. --- Pushed as obvious. .../torture/{harden-comp-pr111520.cc => harden-comp-pr111520.C} | 0 1 file changed, 0 inse

<    1   2   3   4   5   >