Re: [PATCH v2] Return a NULL rtx when targets don't support cbranchcc4 or predicate check fails in prepare_cmp_insn

2022-12-04 Thread Richard Biener via Gcc-patches
On Mon, Dec 5, 2022 at 4:08 AM HAO CHEN GUI wrote: > > Hi, > It gets an assertion failure when targers don't support cbranchcc4 or > predicate check fails in prepare_cmp_insn. prepare_cmp_insn is a help > function to generate compare rtx, so it should not assume that cbranchcc4 > is existing or

Re: [PATCH] [testsuite] [arm/aarch64] -fno-short-enums for auto-init-[12].c

2022-12-04 Thread Richard Sandiford via Gcc-patches
Alexandre Oliva via Gcc-patches writes: > On arm-eabi, and possibly on other platforms, -fshort-enums is enabled > by default, which breaks some tests' expectations as to enum sizes > with DEFERRED_INIT. Disable short enums so that the expectations are > met. > > Regstraped on x86_64-linux-gnu,

Re: [PATCH 1/3] Use sub mode to move block for struct parameter

2022-12-04 Thread Jiufu Guo via Gcc-patches
Hi, Jiufu Guo writes: > Hi, > > This patch checks an assignment to see if the "from" is about parameter, > and if the parameter may passing through registers, then use the register > mode to move sub-blocks for the assignment. > > Bootstraped and regtested on ppc{,le} and x86_64. > Is this ok

Re: [PATCH 2/3]rs6000: NFC use sext_hwi to replace ((v&0xf..f)^0x80..0) - 0x80..0

2022-12-04 Thread Jiufu Guo via Gcc-patches
Hi Kewen, "Kewen.Lin" writes: > on 2022/12/1 20:16, guojiufu wrote: >> On 2022-12-01 15:10, Jiufu Guo via Gcc-patches wrote: >>> Hi Kewen, >>> >>> 在 12/1/22 2:11 PM, Kewen.Lin 写道: on 2022/12/1 13:35, Jiufu Guo wrote: > Hi Kewen, > > Thanks for your quick and insight review!

[PATCH] tree, c++: optimize walk_tree_1 and cp_walk_subtrees

2022-12-04 Thread Patrick Palka via Gcc-patches
These functions currently repeatedly dereference tp during the subtree walk, dereferences which the compiler can't CSE because it can't guarantee that the subtree walking doesn't modify *tp. But we already implicitly require that TREE_CODE (*tp) remains the same throughout the subtree walks, so

[PATCH] tree, c++: declare some basic functions inline

2022-12-04 Thread Patrick Palka via Gcc-patches
The functions strip_array_types, is_typedef_decl, typedef_variant_p, cp_type_quals and cp_expr_location are used throughout the C++ frontend including in some fairly hot parts (e.g. in the tsubst routines and cp_walk_subtree) and they're small enough that the overhead of calling them out-of-line

[PATCH v2] Return a NULL rtx when targets don't support cbranchcc4 or predicate check fails in prepare_cmp_insn

2022-12-04 Thread HAO CHEN GUI via Gcc-patches
Hi, It gets an assertion failure when targers don't support cbranchcc4 or predicate check fails in prepare_cmp_insn. prepare_cmp_insn is a help function to generate compare rtx, so it should not assume that cbranchcc4 is existing or all sub-CC modes are supported on one target. I think it should

[PATCH v3] Add condition coverage profiling

2022-12-04 Thread Jørgen Kvalsvik via Gcc-patches
This patch adds support in gcc+gcov for modified condition/decision coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of test/code coverage and it is particularly important in the avation and automotive industries for safety-critical applications. MC/DC it is required for or

Re: [PATCH] Fortran: fix typo in documentation of intrinsic FLOOR [PR107870]

2022-12-04 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, You will, perhaps, rue having me back when you see the updated finalization patch :-) This time, I will be breaking it up into digestible chunks! I'll be posting in about one week. Regards Paul On Sun, 4 Dec 2022 at 19:40, Harald Anlauf wrote: > Hi Paul, > > thanks - and it is

Re: [PATCH][GCC][DOC] Relocate list under Deprecated in options.texi to Var

2022-12-04 Thread Andrew Pinski via Gcc-patches
On Fri, Oct 5, 2018 at 5:11 AM Sam Tebbs wrote: > > Hi all, > > I recently found what seems to be an error in the options documentation > (gcc/doc/options.texi) where a list describing how _var_ is set (referring to > the Var attribute) is written beneath the _Deprecated_ attribute instead. This

Re: [PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI.

2022-12-04 Thread Iain Sandoe
> On 4 Dec 2022, at 20:20, Uros Bizjak via Gcc-patches > wrote: > > On Sun, Dec 4, 2022 at 12:51 PM Iain Sandoe wrote: >> >> This is almost a completely Darwin-local patch, but there is one (repeated) >> place where a general change is needed - which is in making xmm_regs and >> x87_regs

Re: [PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI.

2022-12-04 Thread Uros Bizjak via Gcc-patches
On Sun, Dec 4, 2022 at 12:51 PM Iain Sandoe wrote: > > This is almost a completely Darwin-local patch, but there is one (repeated) > place where a general change is needed - which is in making xmm_regs and > x87_regs extern in the three copies of args.h (this is consistent with the > other saved

Re: [PATCH] Fortran: error recovery simplifying UNPACK for insufficient FIELD [PR107922]

2022-12-04 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 04.12.22 um 14:11 schrieb Mikael Morin: Le 01/12/2022 à 21:25, Harald Anlauf via Fortran a écrit : Dear all, we did not properly handle the case of insufficient array-valued FIELD when trying to simplify UNPACK and could run into a NULL pointer dereference.  The fix is obvious.

Re: [PATCH] Fortran: fix typo in documentation of intrinsic FLOOR [PR107870]

2022-12-04 Thread Harald Anlauf via Gcc-patches
Hi Paul, thanks - and it is good to see that you are back! Harald Am 04.12.22 um 12:48 schrieb Paul Richard Thomas via Gcc-patches: Hi Harald, That's good to commit. Thanks for the patch. Paul On Sat, 3 Dec 2022 at 20:40, Harald Anlauf via Fortran wrote: Dear all, here's a small

[PATCH] c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.

2022-12-04 Thread Iain Sandoe via Gcc-patches
This fixes a long-standing problem on Darwin where we cannot independently set -static-libstdc++ because the flag gets stripped by the g++ driver. This patch is essentially the same as the one used for the 'D' driver and has been in local use for some time. It has also been tested on Linux. OK

Re: [PATCH] Fortran: error recovery simplifying UNPACK for insufficient FIELD [PR107922]

2022-12-04 Thread Mikael Morin
Le 01/12/2022 à 21:25, Harald Anlauf via Fortran a écrit : Dear all, we did not properly handle the case of insufficient array-valued FIELD when trying to simplify UNPACK and could run into a NULL pointer dereference. The fix is obvious. Regtested on x86_64-pc-linux-gnu. OK for mainline?

Re: [PATCH] libstdc++, Darwin: Limit recursive mutex init to OS versions needing it.

2022-12-04 Thread Jonathan Wakely via Gcc-patches
On Sun, 4 Dec 2022, 11:08 Iain Sandoe via Libstdc++, wrote: > While looking at Darwin's os_defines, I wondered whether > _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC was really still necessary. On > checking > the OS, it seems that it was a transient problem that only appears in > Darwin11. > Earlier

Re: [pushed] libstdc++, Darwin: Fix weak attribute to use __weak__ instead of weak.

2022-12-04 Thread Jonathan Wakely via Gcc-patches
On Sun, 4 Dec 2022, 10:54 Iain Sandoe via Libstdc++, wrote: > As pointed out on irc by Jonathan, the Darwin os_defines contains a "weak" > attribute where we should use '__weak__'. Fixed thus, tested on i686, > x86_64 > Darwin and x86_64 Linux, pushed to master, thanks, > Iain > -- >8 -- > I

[PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI.

2022-12-04 Thread Iain Sandoe via Gcc-patches
This is almost a completely Darwin-local patch, but there is one (repeated) place where a general change is needed - which is in making xmm_regs and x87_regs extern in the three copies of args.h (this is consistent with the other saved vars). These fails represent most of the current testsuite

Re: [PATCH] Fortran: fix typo in documentation of intrinsic FLOOR [PR107870]

2022-12-04 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, That's good to commit. Thanks for the patch. Paul On Sat, 3 Dec 2022 at 20:40, Harald Anlauf via Fortran wrote: > Dear all, > > here's a small documentation fix for the intrinsic FLOOR. > Besides that, I adjusted the description of the optional > KIND argument to Fortran

[PATCH] libstdc++, Darwin: Limit recursive mutex init to OS versions needing it.

2022-12-04 Thread Iain Sandoe via Gcc-patches
While looking at Darwin's os_defines, I wondered whether _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC was really still necessary. On checking the OS, it seems that it was a transient problem that only appears in Darwin11. Earlier versions do not have the initializer, and the operation is fixed in

[pushed] libstdc++, Darwin: Fix weak attribute to use __weak__ instead of weak.

2022-12-04 Thread Iain Sandoe via Gcc-patches
As pointed out on irc by Jonathan, the Darwin os_defines contains a "weak" attribute where we should use '__weak__'. Fixed thus, tested on i686, x86_64 Darwin and x86_64 Linux, pushed to master, thanks, Iain -- >8 -- The text for _GLIBCXX_WEAK_DEFINITION has used 'weak' for the attribute name,

[pushed] libsanitizer, Darwin: Restrict build to Darwin 16 or newer.

2022-12-04 Thread Iain Sandoe via Gcc-patches
Tested on i686-darwin9, x86_64-darwin12, 21, and on x86_64-linux-gnu, pushed to master, thanks Iain -- >8 -- The latest import has added dependencies on system resources that are not present until Darwin 16. It might be possible to work around these for earlier systems, but in the short-term we

Re: [PATCH] Fortran: error recovery handling invalid CLASS variable [PR107899]

2022-12-04 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, It looks good to me. OK to commit. Thanks Paul On Sat, 3 Dec 2022 at 18:27, Harald Anlauf via Fortran wrote: > Dear all, > > the attached obvious patch fixes a NULL pointer dereference > that occurs with an invalid CLASS argument to DEALLOCATE. > > Regtested on