Re: [PATCH] libstdc++: retry removal of dir entries if dir removal fails

2022-06-28 Thread Alexandre Oliva via Gcc-patches
On Jun 27, 2022, Alexandre Oliva wrote: > (ii) arrange for recursive_directory_iterator to rewind a dir from > which entries have been _erase()d before returning to the parent dir Here's an implementation of the above. I kind of like it; it's far more elegant than the earlier patch, and if it

Re: [PATCH gcc 0/1] [PATCH] target: Fix asm generation for AVX builtins when using -masm=intel [PR106095]

2022-06-28 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 28, 2022 at 11:16 PM Antoni Boucher wrote: > > Thanks for the review. > Does this mean I can commit it, assuming the output of compare_tests is > good? Yes. > > By the way, I wanted to mention that it was my first time playing with > the assembly generation, so I was not sure about my

[committed] d: Add SIMD intrinsics module and compiler built-ins.

2022-06-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds a SIMD intrinsics module, and compiler intrinsics. Vectors in D are exposed by the use of the `__vector(T[N])' type, and whilst most unary and binary operations work as you'd expect, there are some operations that are not possible without doing the operation unrolled, or

Re: [PATCH] libgccjit: Fix bug where unary_op will return an integer type instead of the correct type

2022-06-28 Thread David Malcolm via Gcc-patches
On Wed, 2022-06-01 at 22:45 -0400, Antoni Boucher via Gcc-patches wrote: > Also, the test gcc/testsuite/jit.dg/test-asm.cc fails and would need > this line: > > #include I'm curious; how is it failing? > > Is this okay if I add it in this patch? > > On Wed, 2022-06-01 at 22:13 -0400, Antoni

Re: [PATCH] libgccjit: Fix bug where unary_op will return an integer type instead of the correct type

2022-06-28 Thread David Malcolm via Gcc-patches
On Wed, 2022-06-01 at 22:13 -0400, Antoni Boucher via Gcc-patches wrote: > Hi. > The attached patch fix bug 105812: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105812 Thanks; the patch looks good to me, assuming it's been tested in the usual way, with one nit: the "PR target/105812" in the

Re: [committed] openmp: Add support for HBW or large capacity or interleaved memory through the libmemkind.so library

2022-06-28 Thread Andrew Stubbs
On 09/06/2022 09:19, Jakub Jelinek via Gcc-patches wrote: + switch (memspace) +{ +case omp_high_bw_mem_space: +#ifdef LIBGOMP_USE_MEMKIND + struct gomp_memkind_data *memkind_data; + memkind_data = gomp_get_memkind (); + if (data.partition == omp_atv_interleaved +

[PATCH v2] jit: avoid calloc() poisoning on musl [PR106102]

2022-06-28 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich On musl uses calloc() (via ). jit/ includes it directly and exposes use of poisoned calloc(): /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/jit/jit-playback.cc make[3]: *** [Makefile:1143: jit/libgccjit.o] Error 1 make[3]: *** Waiting for

Re: [PATCH] libcpp: Update ucnid.h to Unicode 14

2022-06-28 Thread Joseph Myers
This patch is OK. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]

2022-06-28 Thread Harald Anlauf via Gcc-patches
Dear all, the simplification of EXTENDS_TYPE_OF() did not handle the situation that one of its arguments were a CLASS variable that was improperly declared. NULL pointer dereference. The fix is obvious. Steve found a similar solution, which is why I added him as co-author. Regtested on

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Qing Zhao via Gcc-patches
> On Jun 28, 2022, at 2:49 PM, Jakub Jelinek wrote: > > On Tue, Jun 28, 2022 at 06:29:01PM +, Qing Zhao wrote: >> >> >>> On Jun 28, 2022, at 2:22 PM, Jakub Jelinek wrote: >>> >>> On Tue, Jun 28, 2022 at 06:15:58PM +, Qing Zhao wrote: > Because the flag just tells whether some

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 06:29:01PM +, Qing Zhao wrote: > > > > On Jun 28, 2022, at 2:22 PM, Jakub Jelinek wrote: > > > > On Tue, Jun 28, 2022 at 06:15:58PM +, Qing Zhao wrote: > >>> Because the flag just tells whether some array shouldn't be treated as > >>> (poor man's) > >>>

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Qing Zhao via Gcc-patches
> On Jun 28, 2022, at 2:22 PM, Jakub Jelinek wrote: > > On Tue, Jun 28, 2022 at 06:15:58PM +, Qing Zhao wrote: >>> Because the flag just tells whether some array shouldn't be treated as >>> (poor man's) >>> flexible array member. We still need to find out if some FIELD_DECL is to >>> be

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 06:15:58PM +, Qing Zhao wrote: > > Because the flag just tells whether some array shouldn't be treated as > > (poor man's) > > flexible array member. We still need to find out if some FIELD_DECL is to > > be treated like a flexible array member, which is a minority of

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Qing Zhao via Gcc-patches
> On Jun 28, 2022, at 12:43 PM, Jakub Jelinek wrote: > > On Tue, Jun 28, 2022 at 03:59:22PM +, Qing Zhao via Gcc-patches wrote: >>> On Jun 28, 2022, at 11:08 AM, Jakub Jelinek wrote: >>> >>> On Tue, Jun 28, 2022 at 03:03:12PM +, Qing Zhao wrote: 2. Then replace all

Go patch committed: Use package path with embedded builtin

2022-06-28 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend changes the mangled name of a struct to use the package path with an embedded builtin type. The test case is https://go.dev/cl/414235. This fixes https://go.dev/issue/52856. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Make runtime.Version return a useful value

2022-06-28 Thread Ian Lance Taylor via Gcc-patches
This libgo patch makes runtime.Version return a meaningful string. This also means that "go version" will print something useful, e.g., go version go1.18 gccgo (GCC) 12.0.1 20220216 (experimental) linux/amd64 This fixes https://go.dev/issue/51850. Bootstrapped and ran Go testsuite on

[committed] d: Use create_tmp_var_raw and get_callee_fndecl

2022-06-28 Thread Iain Buclaw via Gcc-patches
Hi, A couple of small patterns that repeat are generating a temporary, and getting a function out of a CALL_EXPR (there are other changes that are in the works where I ended up adding more repeats of these patterns). There are convenience functions for these in the common parts of gcc, use them

[committed] d: Add @simd and @simd_clones attributes to compiler and library

2022-06-28 Thread Iain Buclaw via Gcc-patches
Hi, This patch adds a `@simd' attribute to the D front-end, which is equivalent to `__attribute__((simd))', and `@simd_clones' is a convenience alias to allow specifying whether the compiler should generated masked or non-masked simd clones. Bootstrapped and regression tested on

Re: [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto

2022-06-28 Thread Segher Boessenkool
On Tue, Jun 28, 2022 at 11:11:55AM +, Richard Biener wrote: > The following makes sure we preserve EH notes on call insns that > indicate the call doesn't perform a non-local goto when distributing > notes after combining insns. > - if (!insn_could_throw_p (from_insn)) > -

Order Status #AMZN28-8823133

2022-06-28 Thread Order Status
amazon INVOICE #AMZN28-8823133 Hi gcc-patches@gcc.gnu.org, Confirmation for your recent purchase with us. Your package has been confirmed and ready to dispatch. You will receive your package by 4th July 2022 You can check your order details below. Help-Desk :

Go patch committed: Permit abstract bool expressions to remain abstract

2022-06-28 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend permits expressions of abstract bool to remain abstract, rather than forcing them into the named type bool. The test case for this is https://go.dev/cl/414755. This fixes https://go.dev/issue/51475. Bootstrarpped and ran Go testsuite on x86_64-pc-linux-gnu.

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 03:59:22PM +, Qing Zhao via Gcc-patches wrote: > > On Jun 28, 2022, at 11:08 AM, Jakub Jelinek wrote: > > > > On Tue, Jun 28, 2022 at 03:03:12PM +, Qing Zhao wrote: > >> 2. Then replace all “array_at_struct_end_p” with using DECL_NOT_FLEXARRAY > >> in GCC, adding

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Martin Sebor via Gcc-patches
On 6/28/22 01:16, Richard Biener wrote: On Mon, Jun 27, 2022 at 4:20 PM Qing Zhao via Gcc-patches wrote: Hi, Per our discussion in the bug report, I came up with the following patch: === PR101836: Add a new option -fstrict-flex-array[=n] Add the new option and use it in

Re: [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto

2022-06-28 Thread Jeff Law via Gcc-patches
On 6/28/2022 5:11 AM, Richard Biener wrote: The following makes sure we preserve EH notes on call insns that indicate the call doesn't perform a non-local goto when distributing notes after combining insns. Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on the m68k testcase

Re: Ping: [PATCH] libatomic: drop redundant all-multi command

2022-06-28 Thread Jeff Law via Gcc-patches
On 6/28/2022 12:52 AM, Jan Beulich via Gcc-patches wrote: On 27.05.2022 10:01, Jan Beulich wrote: ./multilib.am already specifies this same command, and make warns about the earlier one being ignored when seeing the later one. All that needs retaining to still satisfy the preceding comment

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Qing Zhao via Gcc-patches
> On Jun 28, 2022, at 11:08 AM, Jakub Jelinek wrote: > > On Tue, Jun 28, 2022 at 03:03:12PM +, Qing Zhao wrote: >> 2. Then replace all “array_at_struct_end_p” with using DECL_NOT_FLEXARRAY in >> GCC, adding new testing cases > > No, IMHO array_at_struct_end_p should stay as is, just test

RE: [PATCH 1/2]AArch64 Add fallback case using sdot for usdot

2022-06-28 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, June 27, 2022 7:10 AM > To: Tamar Christina > Cc: Richard Sandiford ; Richard Earnshaw > ; nd ; gcc- > patc...@gcc.gnu.org; Marcus Shawcroft > Subject: Re: [PATCH 1/2]AArch64 Add fallback case using sdot for usdot > > On Mon,

Re: [x86 PATCH] Double word logical operation clean-ups in i386.md.

2022-06-28 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 28, 2022 at 1:34 PM Roger Sayle wrote: > > > Hi Uros, > As you've requested/suggested, here's a patch that tidies up and > unifies doubleword handling in i386.md; converting all doubleword > splitters for logic operations to post-reload form, generalizing > their define_insn_and_split

Re: [PATCH gcc 0/1] [PATCH] target: Fix asm generation for AVX builtins when using -masm=intel [PR106095]

2022-06-28 Thread Antoni Boucher via Gcc-patches
Thanks for the review. Does this mean I can commit it, assuming the output of compare_tests is good? By the way, I wanted to mention that it was my first time playing with the assembly generation, so I was not sure about my changes (even though it makes the test case compile, I'm not sure it

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 03:03:12PM +, Qing Zhao wrote: > 2. Then replace all “array_at_struct_end_p” with using DECL_NOT_FLEXARRAY in > GCC, adding new testing cases No, IMHO array_at_struct_end_p should stay as is, just test this extra flag too. Jakub

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Qing Zhao via Gcc-patches
Hi, Richard, > On Jun 28, 2022, at 3:16 AM, Richard Biener > wrote: > > On Mon, Jun 27, 2022 at 4:20 PM Qing Zhao via Gcc-patches > wrote: >> >> Hi, >> >> Per our discussion in the bug report, I came up with the following patch: >> >> === >> >> PR101836: Add a new option

Re: [PATCH, libgomp] Fix chunk_size<1 for dynamic schedule

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 04:06:14PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jun 23, 2022 at 11:47:59PM +0800, Chung-Lin Tang wrote: > > with the way that chunk_size < 1 is handled for gomp_iter_dynamic_next: > > > > (1) chunk_size <= -1: wraps into large unsigned value, seems to work

Re: [committed] libstdc++: Improve directory iterator abstractions for openat

2022-06-28 Thread Jonathan Wakely via Gcc-patches
On Tue, 28 Jun 2022 at 15:24, Jonathan Wakely via Libstdc++ wrote: > --- a/libstdc++-v3/src/filesystem/dir-common.h > +++ b/libstdc++-v3/src/filesystem/dir-common.h > @@ -25,6 +25,7 @@ > #ifndef _GLIBCXX_DIR_COMMON_H > #define _GLIBCXX_DIR_COMMON_H 1 > > +#include // uint32_t > #include //

Re: [PATCH] mksysinfo: add support for musl libc

2022-06-28 Thread Sören Tempel via Gcc-patches
Ian Lance Taylor wrote: > Given that pretty much every one of these musl patches has led to > problems on some glibc systems, it would be very nice if you could do > some testing with glibc. Thanks. Sorry, my bad. I just tested this on Arch Linux and it compiles fine with the patch. > Can you

[PATCH] testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C

2022-06-28 Thread Kito Cheng
That warning won't happen on ilp32 targets, seems like Andrew Pinski already mention that[1] before. Verified on riscv32-unknown-elf and riscv64-unknown-elf. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1 gcc/testsuite/ChangeLog: PR testsuite/102690 *

Re: [PATCH] Remove legacy EVRP code.

2022-06-28 Thread Jeff Law via Gcc-patches
On 6/28/2022 1:37 AM, Richard Biener via Gcc-patches wrote: On Mon, Jun 27, 2022 at 9:04 PM Aldy Hernandez wrote: With DOM converted to ranger, there are no longer any uses of the EVRP engine. For that matter, we haven't used the legacy mode in quite a while, so I think it's safe to remove

Re: [PATCH] libstdc++-v3: check for openat

2022-06-28 Thread Jonathan Wakely via Gcc-patches
On Tue, 28 Jun 2022 at 13:04, Alexandre Oliva wrote: > > On Jun 28, 2022, Jonathan Wakely wrote: > > > I'll push this today. > > Thanks! > > > You can just use --enable-libstdcxx-debug > > Thanks again ;-) > > > Again, that test is *supposed* to return without creating the > > destination. It's

[PATCH] lto: pass -pthread to AM_LDFLAGS [PR 106118]

2022-06-28 Thread Pekka Seppänen
Move -pthread from configure.ac to Makefile.in so that it is passed to AM_LDFLAGS. lto-plugin/ChangeLog: * configure.ac: Move -pthread from here... * Makefile.am: ...to here. * configure: Regenerate. * Makefile.in: Likewise. --- lto-plugin/Makefile.am | 3 ++-

Re: [PATCH, libgomp] Fix chunk_size<1 for dynamic schedule

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 23, 2022 at 11:47:59PM +0800, Chung-Lin Tang wrote: > with the way that chunk_size < 1 is handled for gomp_iter_dynamic_next: > > (1) chunk_size <= -1: wraps into large unsigned value, seems to work though. > (2) chunk_size == 0: infinite loop > > The (2) behavior is obviously not

[x86 PATCH] Double word logical operation clean-ups in i386.md.

2022-06-28 Thread Roger Sayle
Hi Uros, As you've requested/suggested, here's a patch that tidies up and unifies doubleword handling in i386.md; converting all doubleword splitters for logic operations to post-reload form, generalizing their define_insn_and_split templates to form (supporting TARGET_64BIT ? TImode : DImode),

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-06-28 Thread Alexandre Oliva via Gcc-patches
On Jun 3, 2022, Alexandre Oliva wrote: > On Jun 1, 2022, Hans-Peter Nilsson wrote: >> -fmultiflags? > That works for me. I favored -multiflags slightly, because the intended > use is for it to stand for other -m flags, but --multiflags AKA > -fmultiflags will do as well. > Now, is there

[PATCH] testsuite/C++: cope with IPv6 being unavailable

2022-06-28 Thread Jan Beulich via Gcc-patches
When IPv6 is disabled in the kernel, the error message coming back from Cody::OpenInet6() is different from the sole so far expected one. gcc/testsuite/ * g++.dg/modules/bad-mapper-3.C: Relax failure pattern. --- a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C +++

[PATCH] testsuite/C++: suppress filename canonicalization in module tests

2022-06-28 Thread Jan Beulich via Gcc-patches
The pathname underneath gcm.cache/ is determined from the effective name used for the main input file of a particular module. When modules are built, no canonicalization occurs for the main input file. Hence the module file wouldn't be found if a different (the canonicalized) file name was used

[PATCH] Speedup loop splitting SSA update

2022-06-28 Thread Richard Biener via Gcc-patches
Since we never process loops with inner loops that have been split we can delay SSA update until after the pass is done with the whole loop, avoiding the O(function-size) work associated with it. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-06-28 Richard Biener *

Re: [PATCH] Remove legacy EVRP code.

2022-06-28 Thread Aldy Hernandez via Gcc-patches
Since Andrew, Jeff, and Richi have all agreed, I have pushed the patch. Thanks. Aldy On Tue, Jun 28, 2022 at 9:37 AM Richard Biener wrote: > > On Mon, Jun 27, 2022 at 9:04 PM Aldy Hernandez wrote: > > > > With DOM converted to ranger, there are no longer any uses of the EVRP > > engine. For

[FYI, PATCH] Add TFLAGS to gcc's GCC_FOR_TARGET

2022-06-28 Thread Alexandre Oliva via Gcc-patches
When the GCC build runs GCC_FOR_TARGET, e.g. for selftests or for dumping specs, it doesn't use TFLAGS in non-bootstrap scenarios. This patch arranges for TFLAGS to be passed from the top level down to gcc in GCC_FOR_TARGET in this case. Another issue related with TFLAGS fixed herein is that

Re: [PATCH][AArch64] Implement ACLE Data Intrinsics

2022-06-28 Thread Andre Vieira (lists) via Gcc-patches
On 17/06/2022 11:54, Richard Sandiford wrote: "Andre Vieira (lists)" writes: Hi, This patch adds support for the ACLE Data Intrinsics to the AArch64 port. Bootstrapped and regression tested on aarch64-none-linux. OK for trunk? Sorry for the slow review. No worries :) +{

[committed] libstdc++: Do not optimize away storing pathname if it's needed

2022-06-28 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]: Always store pathname if we don't have openat or unlinkat, because the full path is needed to open sub-directories and remove

Re: [PATCH] libstdc++-v3: check for openat

2022-06-28 Thread Alexandre Oliva via Gcc-patches
On Jun 28, 2022, Jonathan Wakely wrote: > I'll push this today. Thanks! > You can just use --enable-libstdcxx-debug Thanks again ;-) > Again, that test is *supposed* to return without creating the > destination. It's testing the failure case. Aha, and that's why one shouldn't debug

[PATCH] Use mark_block_for_update properly in insert_updated_phi_nodes_for

2022-06-28 Thread Richard Biener via Gcc-patches
This makes sure to use mark_block_for_update when adding a block for rewriting in insert_updated_phi_nodes_for as otherwise stmt flags are not initialized. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-06-28 Richard Biener * tree-into-ssa.cc

[pushed][PATCH] loongarch: exclude LARCH_PROLOGUE_TEMP from SIBCALL_REGS [PR 106096]

2022-06-28 Thread Xi Ruoyao via Gcc-patches
Pushed as r13-1319 and r12-8520. Already approved by port maintainer at bugzilla. -- >8 -- The epilogue may clobber LARCH_PROLOGUE_TEMP ($r13/$t1), so it cannot be used for sibcalls. gcc/ChangeLog: PR target/106096 * config/loongarch/loongarch.h (REG_CLASS_CONTENTS): Exclude

[committed] libstdc++: Improve directory iterator abstractions for openat

2022-06-28 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Currently the _Dir::open_subdir function decides whether to construct a _Dir_base with just a pathname, or a file descriptor and pathname. But that means it is tiughtly coupled to the implementation of _Dir_base::openat, which is what actually

Re: [PATCH] fortran, libgfortran, v3: Avoid using libquadmath for glibc 2.26+

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 28, 2022 at 10:35:03AM +0200, Tobias Burnus wrote: > On 27.06.22 15:30, Jakub Jelinek via Gcc-patches wrote: > > > Ok, here is an updated patch that uses _Float128/_Complex _Float128 for all > > of GFC_REAL_{16,17}_IS_FLOAT128, but still uses q/Q suffixes on literal > > constants etc.

[PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto

2022-06-28 Thread Richard Biener via Gcc-patches
The following makes sure we preserve EH notes on call insns that indicate the call doesn't perform a non-local goto when distributing notes after combining insns. Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on the m68k testcase in the PR. OK for trunk if testing passes?

Re: [COMMITTED] Implement vrange::supports_type_p.

2022-06-28 Thread Richard Biener via Gcc-patches
On Tue, Jun 28, 2022 at 11:33 AM Aldy Hernandez wrote: > > On Tue, Jun 28, 2022 at 9:36 AM Richard Biener > wrote: > > > > On Mon, Jun 27, 2022 at 9:00 PM Aldy Hernandez wrote: > > > > > > The conversion for loop-ch is trivial, since the range of a > > > GIMPLE_COND is always an integer. > > >

[PATCH] middle-end/106053 - fold_sign_changed_comparison and large bools

2022-06-28 Thread Richard Biener via Gcc-patches
The following fixes a latent issue in the match.pd variant of fold_sign_changed_comparison which replaces an unsigned integer comparison with a signed boolean comparison of the same precision despite the fact that we treat BOOLEAN_TYPEs as only having two valid values. Bootstrapped and tested on

Re: [COMMITTED] Implement vrange::supports_type_p.

2022-06-28 Thread Aldy Hernandez via Gcc-patches
On Tue, Jun 28, 2022 at 9:36 AM Richard Biener wrote: > > On Mon, Jun 27, 2022 at 9:00 PM Aldy Hernandez wrote: > > > > The conversion for loop-ch is trivial, since the range of a > > GIMPLE_COND is always an integer. > > Yes - but doesn't this hint at the fact that the irange::supports_p is >

[PATCH 12/12 V2] arm: implement bti injection

2022-06-28 Thread Andrea Corallo via Gcc-patches
Hi all, second iteration of this patch enabling Branch Target Identification Armv8.1-M Mechanism [1]. This is achieved by using the bti pass made common with Aarch64. The pass iterates through the instructions and adds the necessary BTI instructions at the beginning of every function and at

[PATCH 10/12 V2] arm: Implement cortex-M return signing address codegen

2022-06-28 Thread Andrea Corallo via Gcc-patches
Hi all, second version of this patch enabling address return signature and verification based on Armv8.1-M Pointer Authentication [1]. To sign the return address, we use the PAC R12, LR, SP instruction upon function entry. This is signing LR using SP and storing the result in R12. R12 will be

[PATCH][pushed] libgomp: fix typo in mold linker detection

2022-06-28 Thread Martin Liška
Pushed as obvious to master and gcc-12 branch. Thanks, Martin libgomp/ChangeLog: * acinclude.m4: Fix typo in mold linker detection. * Makefile.in: Regenerate. * configure: Regenerate. --- libgomp/Makefile.in | 2 +- libgomp/acinclude.m4 | 2 +- libgomp/configure| 2

Re: [PATCH] libstdc++-v3: check for openat

2022-06-28 Thread Jonathan Wakely via Gcc-patches
On Mon, 27 Jun 2022 at 23:04, Alexandre Oliva via Libstdc++ wrote: > > On Jun 27, 2022, Jonathan Wakely wrote: > > > -#if _GLIBCXX_HAVE_DIRFD > > +#if _GLIBCXX_HAVE_DIRFD && _GLIBCXX_HAVE_OPENAT && _GLIBCXX_HAVE_UNLINKAT I'll push this today. > Thanks, I had this bit in the WIP _At_path patch,

Re: [PATCH] fortran, libgfortran, v3: Avoid using libquadmath for glibc 2.26+

2022-06-28 Thread Tobias Burnus
On 27.06.22 15:30, Jakub Jelinek via Gcc-patches wrote: Ok, here is an updated patch that uses _Float128/_Complex _Float128 for all of GFC_REAL_{16,17}_IS_FLOAT128, but still uses q/Q suffixes on literal constants etc. when using libquadmath and f128/F128 otherwise. This patch also includes the

[committed] libstdc++: testsuite: Guard use of C99 std::log2

2022-06-28 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, poushed to trunk. -- >8 -- This prevents the test from failing if the only thing not supported is the text printed to the log about the size of the floating-point type. libstdc++-v3/ChangeLog: * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math

Re: [PATCH] libgompd: Fixed Access bug

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Sun, Jun 26, 2022 at 02:26:27AM +0200, Mohamed Atef wrote: > Hello, > I referenced kind, nthread, and implicit as pointers in my last patch. > This patch fixes this bug. We review patches and even the committed ones. > Another thing, I didn't add gompd_thread_handle_access entries in the >

Re: [PATCH] Remove legacy EVRP code.

2022-06-28 Thread Richard Biener via Gcc-patches
On Mon, Jun 27, 2022 at 9:04 PM Aldy Hernandez wrote: > > With DOM converted to ranger, there are no longer any uses of the EVRP > engine. For that matter, we haven't used the legacy mode in quite a > while, so I think it's safe to remove any associated code. > > There are some methods in

Re: [COMMITTED] Implement vrange::supports_type_p.

2022-06-28 Thread Richard Biener via Gcc-patches
On Mon, Jun 27, 2022 at 9:00 PM Aldy Hernandez wrote: > > The conversion for loop-ch is trivial, since the range of a > GIMPLE_COND is always an integer. Yes - but doesn't this hint at the fact that the irange::supports_p is useless because it checks on the type of the comparison operand rather

Re: [PATCH v2] testsuite: Add new target check for no_alignment_constraints

2022-06-28 Thread Richard Biener via Gcc-patches
On Mon, Jun 27, 2022 at 8:09 PM Dimitar Dimitrov wrote: > > A few testcases were marked for avr target, which has no alignment > requirements. But those tests in fact should filter for any > target having __BIGGEST_ALIGNMENT__=1. > > A new effective target check is introduced:

Re: [GCC 13][PATCH] PR101836: Add a new option -fstrict-flex-array[=n] and use it in __builtin_object_size

2022-06-28 Thread Richard Biener via Gcc-patches
On Mon, Jun 27, 2022 at 4:20 PM Qing Zhao via Gcc-patches wrote: > > Hi, > > Per our discussion in the bug report, I came up with the following patch: > > === > > PR101836: Add a new option -fstrict-flex-array[=n] > > Add the new option and use it in __builtin_object_size. > > Treat the

Re: [PATCH] testsuite/ix86: prune MMX ABI warning

2022-06-28 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 28, 2022 at 8:48 AM Jan Beulich wrote: > > So far on 32-bit hosts this test failed (for both C and C++) because of > the ABI change warning occurring without (explictly) enabling MMX. > > gcc/testsuite/ > > * c-c++-common/torture/builtin-shufflevector-2.c: Prune ix86 MMX >

Re: [Ada] Remove useless pragma Warnings Off from runtime units

2022-06-28 Thread Arnaud Charlet via Gcc-patches
> IIRC, this latter requirement is particularly important for canadian > crosses, but it applies as a general recommendation, and GNAT often > takes advantage of that to use features that will be disregarded by > stage1 (no optimization, no fatal warnings, limited runtime, etc), but > that must be

Re: [PATCH] jit: avoid calloc() poisoning on musl [PR106102]

2022-06-28 Thread Richard Biener via Gcc-patches
On Mon, 27 Jun 2022, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > On musl uses calloc() (via ). jit/ includes > it directly and exposes use of poisoned calloc(): > > /build/build/./prev-gcc/xg++ ... > ../../gcc-13-20220626/gcc/jit/jit-playback.cc > make[3]: ***

Re: [PATCH] fortran, libgfortran, v3: Avoid using libquadmath for glibc 2.26+

2022-06-28 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 27, 2022 at 03:30:49PM +0200, Jakub Jelinek via Gcc-patches wrote: > Ok, here is an updated patch that uses _Float128/_Complex _Float128 for all > of GFC_REAL_{16,17}_IS_FLOAT128, but still uses q/Q suffixes on literal > constants etc. when using libquadmath and f128/F128 otherwise. >

Re: [PATCH] testsuite/ix86: SSE2 is a prereq to _Float16 use

2022-06-28 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 28, 2022 at 8:49 AM Jan Beulich wrote: > > When enabling AVX512FP via attribute or pragma, the _Float16 type would > remain unavailable when at initialization time SSE2 wouldn't be seen as > available for use. While this may hint at a wider underlying issue (like > the feature, the

Ping: [PATCH] libatomic: drop redundant all-multi command

2022-06-28 Thread Jan Beulich via Gcc-patches
On 27.05.2022 10:01, Jan Beulich wrote: > ./multilib.am already specifies this same command, and make warns about > the earlier one being ignored when seeing the later one. All that needs > retaining to still satisfy the preceding comment is the extra > dependency. > > libatomic/ > > *

[PATCH] testsuite/ix86: SSE2 is a prereq to _Float16 use

2022-06-28 Thread Jan Beulich via Gcc-patches
When enabling AVX512FP via attribute or pragma, the _Float16 type would remain unavailable when at initialization time SSE2 wouldn't be seen as available for use. While this may hint at a wider underlying issue (like the feature, the type may want providing dynamically, albeit this may be

[PATCH] testsuite/ix86: prune MMX ABI warning

2022-06-28 Thread Jan Beulich via Gcc-patches
So far on 32-bit hosts this test failed (for both C and C++) because of the ABI change warning occurring without (explictly) enabling MMX. gcc/testsuite/ * c-c++-common/torture/builtin-shufflevector-2.c: Prune ix86 MMX ABI warning. ---

Re: [PATCH gcc 0/1] [PATCH] target: Fix asm generation for AVX builtins when using -masm=intel [PR106095]

2022-06-28 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 28, 2022 at 9:26 AM ~antoyo via Gcc-patches wrote: > > Hi. > > This fixes the following bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106095 The patch LGTM, thanks for handling this. > > It's the first time I work outside of the jit component, so please tell > me if I forgot