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

2022-07-01 Thread Martin Liška
> > OK > I've just pushed that as 51debf7f857. Martin

Re: [PATCH] Remove legacy -gz=zlib-gnu

2022-07-01 Thread Andrew Pinski via Gcc-patches
On Thu, Jun 30, 2022 at 11:58 PM Fangrui Song via Gcc-patches wrote: > > From: Fangrui Song > > SHF_COMPRESSED style zlib has been supported since binutils 2.26 > and the legacy zlib-gnu option hasn't gain adoption. > According to Debian Code Search (`gz=zlib-gnu`), no project uses > -gz=zlib-gnu

Re: [PATCH] Remove legacy -gz=zlib-gnu

2022-07-01 Thread Fangrui Song via Gcc-patches
On 2022-07-01, Andrew Pinski wrote: On Thu, Jun 30, 2022 at 11:58 PM Fangrui Song via Gcc-patches wrote: From: Fangrui Song SHF_COMPRESSED style zlib has been supported since binutils 2.26 and the legacy zlib-gnu option hasn't gain adoption. According to Debian Code Search (`gz=zlib-gnu`), n

[PATCH] wide-int: Fix up wi::shifted_mask [PR106144]

2022-07-01 Thread Jakub Jelinek via Gcc-patches
Hi! As the following self-test testcase shows, wi::shifted_mask sometimes doesn't create canonicalized wide_ints, which then fail to compare equal to canonicalized wide_ints with the same value. In particular, wi::mask (128, false, 128) gives { -1 } with len 1 and prec 128, while wi::shifted_mask

Re: [PATCH v2] Enable __memcmpeq after seeing __memcmpeq prototype

2022-07-01 Thread Richard Biener via Gcc-patches
On Mon, Jun 20, 2022 at 5:44 PM H.J. Lu wrote: > > extern int __memcmpeq (const void *, const void *, size_t); > > was was added to GLIBC 2.35. Expand BUILT_IN_MEMCMP_EQ to __memcmpeq > after seeing __memcmpeq prototype Can you instead use builtin_decl_declared_p (), see how frontends set that v

[PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-01 Thread Dimitrije Milosevic
Building the ASAN for the n32 MIPS ABI currently fails, due to a few reasons: - defined(__mips64), which is set solely based on the architecture type (32-bit/64-bit), was still used in some places. Therefore, defined(__mips64) is swapped with SANITIZER_MIPS64, which takes the ABI into account as

[PATCH] libsanitizer: Fix linkage errors for cross toolchains

2022-07-01 Thread Dimitrije Milosevic
When we use cross toolchains, in which the GCC libraries are not installed within a designated system root, the shared sanitizer libraries link against libstdc++.so* within the same libraries. This directory, however, is not in RPATH, so attempting to build a dynamically linked application with

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-01 Thread Xi Ruoyao via Gcc-patches
Please configure your mail client to send the patch as plain text (not HTML, and don't replace a tab with 8 whitespaces, etc). If it's not possible, send the patch as an attachment. And, it's better to separate the changes in https://reviews.llvm.org/D127098 and struct_kernel_stat_sz into two pat

Re: PING^1 [PATCH] inline: Rebuild target option node for caller [PR105459]

2022-07-01 Thread Richard Biener via Gcc-patches
On Thu, Jun 23, 2022 at 4:03 AM Kewen.Lin wrote: > > Hi, > > Gentle ping https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596212.html > > BR, > Kewen > > on 2022/6/6 14:20, Kewen.Lin via Gcc-patches wrote: > > Hi, > > > > PR105459 exposes one issue in inline_call handling that when it > > decid

Re: [PATCH] configure: When host-shared, pass --with-pic to in-tree lib configs.

2022-07-01 Thread Richard Biener via Gcc-patches
On Sun, Jun 26, 2022 at 5:28 PM Iain Sandoe via Gcc-patches wrote: > > If we are building PIC/PIE host executables, and we are building dependent > libs (e.g. GMP) in-tree those libs need to be configured to generate PIC code. > > At present, if an --enable-host-shared build is attempted on ELF pl

Re: [PATCH] libsanitizer: Fix linkage errors for cross toolchains

2022-07-01 Thread Xi Ruoyao via Gcc-patches
Again, please send patch as plain text. On Fri, 2022-07-01 at 08:18 +, Dimitrije Milosevic wrote: > When we use cross toolchains, in which the GCC libraries are not > installed within a designated system root, the shared sanitizer > libraries link against libstdc++.so* within the same librarie

Re: [PATCH] wide-int: Fix up wi::shifted_mask [PR106144]

2022-07-01 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > Hi! > > As the following self-test testcase shows, wi::shifted_mask sometimes > doesn't create canonicalized wide_ints, which then fail to compare equal > to canonicalized wide_ints with the same value. > In particular, wi::mask (128, false, 128) gives { -1 } with len 1 and

Re: [PATCH] tree-optimization/106131 - wrong code with FRE rewriting

2022-07-01 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > The following makes sure to not use the original TBAA type for > looking up a value across an aggregate copy when we had to offset > the read. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk. > > 2022-06-30 Richard Biener > >

Re: PING^1 [PATCH] inline: Rebuild target option node for caller [PR105459]

2022-07-01 Thread Jan Hubicka via Gcc-patches
> On Thu, Jun 23, 2022 at 4:03 AM Kewen.Lin wrote: > > > > Hi, > > > > Gentle ping https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596212.html > > > > BR, > > Kewen > > > > on 2022/6/6 14:20, Kewen.Lin via Gcc-patches wrote: > > > Hi, > > > > > > PR105459 exposes one issue in inline_call handl

Re: [PATCH] tree-optimization/106131 - wrong code with FRE rewriting

2022-07-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Jul 2022, Richard Sandiford wrote: > Richard Biener via Gcc-patches writes: > > The following makes sure to not use the original TBAA type for > > looking up a value across an aggregate copy when we had to offset > > the read. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: PING^1 [PATCH] inline: Rebuild target option node for caller [PR105459]

2022-07-01 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the insightful comments! on 2022/7/1 16:40, Richard Biener wrote: > On Thu, Jun 23, 2022 at 4:03 AM Kewen.Lin wrote: >> >> Hi, >> >> Gentle ping https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596212.html >> >> BR, >> Kewen >> >> on 2022/6/6 14:20, Kewen.Lin via Gcc-patc

Re: [PATCH] tree-optimization/106131 - wrong code with FRE rewriting

2022-07-01 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 1 Jul 2022, Richard Sandiford wrote: > >> Richard Biener via Gcc-patches writes: >> > The following makes sure to not use the original TBAA type for >> > looking up a value across an aggregate copy when we had to offset >> > the read. >> > >> > Bootstrapped and te

[Committed] Add constraints to new andn_doubleword_bmi pattern in i386.md.

2022-07-01 Thread Roger Sayle
Many thanks to Uros for spotting that I'd forgotten to add constraints to the new define_insn_and_split *andn_doubleword_bmi when moving it from pre-reload to post-reload. I've pushed this obvious fix after a make bootstrap on x86_64-pc-linux-gnu. Sorry for the inconvenience to anyone building t

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

2022-07-01 Thread Andre Vieira (lists) via Gcc-patches
On 29/06/2022 08:18, Richard Sandiford wrote: + break; +case AARCH64_RBIT: +case AARCH64_RBITL: +case AARCH64_RBITLL: + if (mode == SImode) + icode = CODE_FOR_aarch64_rbitsi; + else + icode = CODE_FOR_aarch64_rbitdi; + break; +default: + gcc_u

[committed] gcn: Remove useless register keyword

2022-07-01 Thread Tobias Burnus
This silences the compile warnings: config/gcn/gcn-protos.h:78:61: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] and is in line with many other commits that remove 'register'. I also note that the the definition in config/gcn/gcn.cc already uses print_oper

Re: [PATCH 1/12] arm: Make mbranch-protection opts parsing common to AArch32/64

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:08, Andrea Corallo via Gcc-patches wrote: Hi all, This change refactors all the mbranch-protection option parsing code and types to make it common to both AArch32 and AArch64 backends. This change also pulls in some supporting types from AArch64 to make it common (aarch_pars

Re: [PATCH 2/12] arm: Add Armv8.1-M Mainline target feature +pacbti

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:37, Andrea Corallo via Gcc-patches wrote: This patch adds the -march feature +pacbti to Armv8.1-M Mainline. This feature enables pointer signing and authentication instructions on M-class architectures. Pre-approved here

Re: [PATCH 3/12] arm: Add option -mbranch-protection

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:38, Andrea Corallo via Gcc-patches wrote: [PATCH 3/12] arm: Add option -mbranch-protection Add -mbranch-protection option. This option enables the code-generation of pointer signing and authentication instructions in function prologues and epilogues. gcc/ChangeLog:

Re: [Committed] Add constraints to new andn_doubleword_bmi pattern in i386.md.

2022-07-01 Thread Uros Bizjak via Gcc-patches
On Fri, Jul 1, 2022 at 12:17 PM Roger Sayle wrote: > > > Many thanks to Uros for spotting that I'd forgotten to add constraints > to the new define_insn_and_split *andn_doubleword_bmi when moving it > from pre-reload to post-reload. I've pushed this obvious fix after a > make bootstrap on x86_64-

[committed] libstdc++: Add nodiscard attribute to filesystem operations

2022-07-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- Some of these are not truly "pure" because they access the file system, e.g. exists and file_size, but they do not modify anything and are only useful for the return value. If you really want to use one of those functions just to check whether an er

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

2022-07-01 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > On 29/06/2022 08:18, Richard Sandiford wrote: >>> + break; >>> +case AARCH64_RBIT: >>> +case AARCH64_RBITL: >>> +case AARCH64_RBITLL: >>> + if (mode == SImode) >>> + icode = CODE_FOR_aarch64_rbitsi; >>> + else >>> + icode = CODE_FOR_a

Re: PING^1 [PATCH] inline: Rebuild target option node for caller [PR105459]

2022-07-01 Thread Richard Biener via Gcc-patches
On Fri, Jul 1, 2022 at 11:20 AM Jan Hubicka wrote: > > > On Thu, Jun 23, 2022 at 4:03 AM Kewen.Lin wrote: > > > > > > Hi, > > > > > > Gentle ping > > > https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596212.html > > > > > > BR, > > > Kewen > > > > > > on 2022/6/6 14:20, Kewen.Lin via Gcc-pat

[PATCH 1/2] Make sure checking code is conditional in VN

2022-07-01 Thread Richard Biener via Gcc-patches
VN has checking code with gcc_unreachable (), the following makes it cheaper by instead guarding the side-effect with flag_checking. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-07-01 Richard Biener * tree-ssa-sccvn.cc (vn_nary_op_insert_into): Make checki

[PATCH 2/2] Revert maybe_ne -> known_ne change in vn_reference_lookup_3

2022-07-01 Thread Richard Biener via Gcc-patches
This reverts the change as discussed. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-07-01 Richard Biener * tree-ssa-sccvn.cc (vn_reference_lookup_3): Revert back to using maybe_ne (off, -1). --- gcc/tree-ssa-sccvn.cc | 4 ++-- 1 file changed, 2 insertions(

Re: [PATCH 2/2] Revert maybe_ne -> known_ne change in vn_reference_lookup_3

2022-07-01 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > This reverts the change as discussed. Thanks! > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > 2022-07-01 Richard Biener > > * tree-ssa-sccvn.cc (vn_reference_lookup_3): Revert > back to using maybe_ne (off, -1). > --- >

Mips: Fix kernel_stat structure size

2022-07-01 Thread Dimitrije Milosevic
Fix kernel_stat structure size for non-Android 32-bit Mips. LLVM currently has this value for the kernel_stat structure size, as per compiler-rt/lib/sanitizer-common/sanitizer_platform_limits_posix.h. This also resolves one of the build issues for non-Android 32-bit Mips. libsanitizer/ChangeLo

[PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-01 Thread Dimitrije Milosevic
Building the ASAN for the n32 MIPS ABI currently fails, due to a few reasons: - defined(__mips64), which is set solely based on the architecture type (32-bit/64-bit), was still used in some places. Therefore, defined(__mips64) is swapped with SANITIZER_MIPS64, which takes the ABI into account a

[PATCH] libsanitizer: Fix linkage errors for cross toolchains

2022-07-01 Thread Dimitrije Milosevic
When we use cross toolchains, in which the GCC libraries are not installed within a designated system root, the shared sanitizer libraries link against libstdc++.so* within the same libraries. This directory, however, is not in RPATH, so attempting to build a dynamically linked application with

Re: Mips: Fix kernel_stat structure size

2022-07-01 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-07-01 at 12:40 +, Dimitrije Milosevic wrote: > Fix kernel_stat structure size for non-Android 32-bit Mips. > LLVM currently has this value for the kernel_stat structure size, > as per compiler-rt/lib/sanitizer-common/sanitizer_platform_limits_posix.h. > This also resolves one of th

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

2022-07-01 Thread Qing Zhao via Gcc-patches
> On Jul 1, 2022, at 2:49 AM, Richard Biener wrote: > > On Thu, Jun 30, 2022 at 9:30 PM Qing Zhao wrote: >> >> >> >>> On Jun 30, 2022, at 1:03 PM, Jakub Jelinek wrote: >>> >>> On Thu, Jun 30, 2022 at 03:31:00PM +, Qing Zhao wrote: > No, that’s not true. A FIELD_DELC is only share

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

2022-07-01 Thread Richard Biener via Gcc-patches
On Fri, Jul 1, 2022 at 2:55 PM Qing Zhao wrote: > > > > > On Jul 1, 2022, at 2:49 AM, Richard Biener > > wrote: > > > > On Thu, Jun 30, 2022 at 9:30 PM Qing Zhao wrote: > >> > >> > >> > >>> On Jun 30, 2022, at 1:03 PM, Jakub Jelinek wrote: > >>> > >>> On Thu, Jun 30, 2022 at 03:31:00PM +,

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-01 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-07-01 at 12:40 +, Dimitrije Milosevic wrote: > Building the ASAN for the n32 MIPS ABI currently fails, due to a few reasons: > - defined(__mips64), which is set solely based on the architecture type > (32-bit/64-bit), > was still used in some places. Therefore, defined(__mips64)

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

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 12:55:08PM +, Qing Zhao wrote: > If so, comparing to the current implemenation to have all the checking in > middle-end, what’s the > major benefit of moving part of the checking into FE, and leaving the other > part in middle-end? The point is recording early what F

Re: [PATCH 4/12] arm: Add testsuite library support for PACBTI target

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:40, Andrea Corallo via Gcc-patches wrote: Add targeting-checking entities for PACBTI in testsuite framework. Pre-approved with the requested changes here . gcc/testsuite/ChangeLog: * testsuite/lib/

[Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Tobias Burnus
Attached is the updated patch. Main changes: - File names shown that violate the requires-clause-must-be-same requirement Taken from the offload_vars/funcs context (if available), otherwise (that's no 'omp target'/'omp declare target' but just 'omp target update/data' in the TU), the *.o fil

[PATCH] target/105459 - allow delayed target option node fixup

2022-07-01 Thread Richard Biener via Gcc-patches
The following avoids the need to massage the target optimization node at WPA time when we fixup the optimization node, copying FP related flags from callee to caller. The target is already set up to fixup, but that only works when not switching between functions. After fixing that the fixup is th

[PATCH] Avoid unused sbitmap in update_ssa

2022-07-01 Thread Richard Biener via Gcc-patches
The following avoids copying and using blocks_to_update to the interesting_blocks sbitmap when doing update_ssa as it is unused besides the redundant query in the domwalk. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-into-ssa.cc (rewrite_update_dom_walker::before_do

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

2022-07-01 Thread Qing Zhao via Gcc-patches
> On Jul 1, 2022, at 8:58 AM, Richard Biener wrote: > > On Fri, Jul 1, 2022 at 2:55 PM Qing Zhao wrote: >> >> >> >>> On Jul 1, 2022, at 2:49 AM, Richard Biener >>> wrote: >>> >>> On Thu, Jun 30, 2022 at 9:30 PM Qing Zhao wrote: > On Jun 30, 2022, at 1:03 PM, Jakub

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

2022-07-01 Thread Qing Zhao via Gcc-patches
> On Jul 1, 2022, at 8:59 AM, Jakub Jelinek wrote: > > On Fri, Jul 01, 2022 at 12:55:08PM +, Qing Zhao wrote: >> If so, comparing to the current implemenation to have all the checking in >> middle-end, what’s the >> major benefit of moving part of the checking into FE, and leaving the oth

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Aldy Hernandez via Gcc-patches
FYI...if no one has anything to say, I'd like to formally post this for review. So OK for trunk? Aldy On Wed, Jun 29, 2022, 11:22 Aldy Hernandez wrote: > Currently global ranges are stored in SSA_NAME_RANGE_INFO as a pair of > wide_int-like objects along with the nonzero bits. We frequentl

Re: [PATCH 4/12] arm: Add testsuite library support for PACBTI target

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 01/07/2022 14:03, Richard Earnshaw via Gcc-patches wrote: On 28/04/2022 10:40, Andrea Corallo via Gcc-patches wrote: Add targeting-checking entities for PACBTI in testsuite framework. Pre-approved with the requested changes here

Re: Mips: Fix kernel_stat structure size

2022-07-01 Thread Dimitrije Milosevic
Thanks Xi. Forgive me as I'm not that familiar with the coding standards when submitting patches for a review. Here is the updated version of the patch. Fix kernel_stat structure size for non-Android 32-bit Mips. LLVM currently has this value for the kernel_stat structure size, as per compiler-rt

Re: [PATCH 5/12] arm: Implement target feature macros for PACBTI

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:42, Andrea Corallo via Gcc-patches wrote: This patch implements target feature macros when PACBTI is enabled through the -march option or -mbranch-protection. The target feature macros __ARM_FEATURE_PAC_DEFAULT and __ARM_FEATURE_BTI_DEFAULT are specified in ARM ACLE

Re: [PATCH] Mips: Resolve build issues for the n32 ABI

2022-07-01 Thread Dimitrije Milosevic
Thanks Xi. Forgive me as I'm not that familiar with the coding standards when submitting patches for a review. Here is the updated version of the patch. Building the ASAN for the n32 MIPS ABI currently fails, due to a few reasons: - defined(__mips64), which is set solely based on the architecture

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 03:06:05PM +0200, Tobias Burnus wrote: > --- a/gcc/fortran/parse.cc > +++ b/gcc/fortran/parse.cc > @@ -1168,7 +1168,8 @@ decode_omp_directive (void) > } >switch (ret) > { > -case ST_OMP_DECLARE_TARGET: > +/* Set omp_target_seen; exclude ST_OMP_DECLARE_T

Re: [PATCH 6/12] arm: Add pointer authentication for stack-unwinding runtime

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:44, Andrea Corallo via Gcc-patches wrote: This patch adds authentication for when the stack is unwound when an exception is taken. All the changes here are done to the runtime code in libgcc's unwinder code for Arm target. All the changes are guarded under defined (__ARM_FEAT

Re: [PATCH 7/12] arm: Emit build attributes for PACBTI target feature

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:45, Andrea Corallo via Gcc-patches wrote: This patch emits assembler directives for PACBTI build attributes as defined by the ABI. gcc/ChangeLog: * config/arm/arm.c (arm_file_start): Emi

[pushed] c++: dependent generic lambda template-id [PR106024]

2022-07-01 Thread Jason Merrill via Gcc-patches
We were wrongly looking up the generic lambda op() in a dependent scope, and then trying to look up its instantiation at substitution time, but lambdas aren't instantiated, so we crashed. The fix is to not look into dependent class scopes. But this created trouble with wrongly trying to use a tem

[pushed] c++: add fixup to missing .template warning

2022-07-01 Thread Jason Merrill via Gcc-patches
I experimented with giving this diagnostic in another place, which didn't work out, but we can still benefit from adding the fixup. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * parser.cc (missing_template_diag): Split out... (cp_parser_id_expression): ...fro

Re: [PATCH 8/12 V2] arm: Introduce multilibs for PACBTI target feature

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 01/06/2022 13:32, Andrea Corallo via Gcc-patches wrote: Hi all, second iteration of the previous patch adding the following new multilibs: thumb/v8.1-m.main+pacbti/mbranch-protection/nofp thumb/v8.1-m.main+pacbti+dp/mbranch-protection/soft thumb/v8.1-m.main+pacbti+dp/mbranch-protection/ha

[pushed] c++: tweak resolve_args change

2022-07-01 Thread Jason Merrill via Gcc-patches
I don't know why I used tf_error instead of complain here. PR c++/105779 gcc/cp/ChangeLog: * call.cc (resolve_args): Use complain. --- gcc/cp/call.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc index f1dd8377628..fc98552fda

Re: [PATCH 8/12 V2] arm: Introduce multilibs for PACBTI target feature

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 01/07/2022 15:54, Richard Earnshaw via Gcc-patches wrote: On 01/06/2022 13:32, Andrea Corallo via Gcc-patches wrote: Hi all, second iteration of the previous patch adding the following new multilibs: thumb/v8.1-m.main+pacbti/mbranch-protection/nofp thumb/v8.1-m.main+pacbti+dp/mbranch-p

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 04:12:55PM +0200, Aldy Hernandez wrote: > > --- a/gcc/wide-int.h > > +++ b/gcc/wide-int.h > > @@ -1373,10 +1373,13 @@ namespace wi > > : public int_traits {}; > > } > > > > -/* An array of N wide_int-like objects that can be put at the end of > > - a variable-sized

Re: [PATCH 9/12] arm: Make libgcc bti compatible

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:48, Andrea Corallo via Gcc-patches wrote: This change add bti instructions at the beginning of arm specific libgcc hand written assembly routines. 2022-03-31 Andrea Corallo * libgcc/config/arm/crti.S (FUNC_START): Add bti instruction if necessary.

Re: [PATCH] c++: warn about using keywords as identifiers [PR106111]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 6/29/22 12:11, Marek Polacek wrote: In C++03, -Wc++11-compat should warn about int constexpr; since 'constexpr' is a keyword in C++11. Jonathan reports that we don't emit a similar warning for 'alignas' or 'alignof', and, as I found out, 'thread_local'. Similarly, we don't warn for most

RFA: Another Rust demangler recursion limit

2022-07-01 Thread Nick Clifton via Gcc-patches
Hi Jeff, [I am sending this to your directly since you seem to be the only one reviewing these patches]. Hot on the heels of the fix for the recursion problem in demangle_const a binutils user has filed another PoC that exposes a problem in demangle_path_maybe_open_generics(): https://

[PATCH] i386: Use "r" constraint in *andn3_doubleword_bmi

2022-07-01 Thread Uros Bizjak via Gcc-patches
ANDN is non-destructive, so use "r" instead of "0" for its operand 1 constraint. 2022-07-01 Uroš Bizjak gcc/ChangeLog: * config/i386/i386.md (*andn3_doubleword_bmi): Use "r" constraint for operand 1. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Pushed to master.

Re: [PATCH] x86: Support 2/4/8 byte constant vector stores

2022-07-01 Thread Uros Bizjak via Gcc-patches
On Thu, Jun 30, 2022 at 4:50 PM H.J. Lu wrote: > > 1. Add a predicate for constant vectors which can be converted to integer > constants suitable for constant integer stores. For a 8-byte constant > vector, the converted 64-bit integer must be valid for store with 64-bit > immediate, which is a 6

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

2022-07-01 Thread Martin Sebor via Gcc-patches
On 7/1/22 08:01, Qing Zhao wrote: On Jul 1, 2022, at 8:59 AM, Jakub Jelinek wrote: On Fri, Jul 01, 2022 at 12:55:08PM +, Qing Zhao wrote: If so, comparing to the current implemenation to have all the checking in middle-end, what’s the major benefit of moving part of the checking into F

[Patch] OpenMP: Handle tofrom with target enter/exit data

2022-07-01 Thread Tobias Burnus
Needed a break and some success. Hence, I implemented this useful and simple OpenMP 5.2 feature. OK for trunk? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung

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

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/06/2022 10:17, Andrea Corallo via Gcc-patches wrote: 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 s

Re: [Patch] OpenMP: Handle tofrom with target enter/exit data

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 05:41:27PM +0200, Tobias Burnus wrote: > --- a/gcc/fortran/dump-parse-tree.cc > +++ b/gcc/fortran/dump-parse-tree.cc > @@ -1414,6 +1414,11 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n) > case OMP_MAP_TO: fputs ("to:", dumpfile); break; > case OMP_

Re: [PATCH v2] c++: fix broken copy elision with nested TARGET_EXPRs [PR105550]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 6/24/22 20:30, Marek Polacek wrote: On Thu, Jun 02, 2022 at 05:08:54PM -0400, Jason Merrill wrote: On 5/26/22 11:01, Marek Polacek wrote: In this problem, we are failing to properly perform copy elision with a conditional operator, so this: constexpr A a = true ? A{} : A{}; fails with:

Re: [PATCH 11/12] aarch64: Make bti pass generic so it can be used by the arm backend

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/04/2022 10:51, Andrea Corallo via Gcc-patches wrote: Hi all, this patch splits and restructures the aarch64 bti pass code in order to have it usable by the arm backend as well. These changes have no functional impact. Best Regards Andrea gcc/Changelog * config.gcc (aarch

Re: [PATCH] aarch64: Fix pure/const function attributes for intrinsics

2022-07-01 Thread Andrew Carlotti via Gcc-patches
On Fri, Jul 01, 2022 at 08:42:15AM +0200, Richard Biener wrote: > On Thu, Jun 30, 2022 at 6:04 PM Andrew Carlotti via Gcc-patches > wrote: > > diff --git a/gcc/config/aarch64/aarch64-builtins.cc > > b/gcc/config/aarch64/aarch64-builtins.cc > > index > > e0a741ac663188713e21f457affa57217d074783..

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

2022-07-01 Thread Richard Earnshaw via Gcc-patches
On 28/06/2022 10:21, Andrea Corallo via Gcc-patches wrote: 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

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Tobias Burnus
On 01.07.22 16:34, Jakub Jelinek wrote: On Fri, Jul 01, 2022 at 03:06:05PM +0200, Tobias Burnus wrote: [...] Will Fortran diagnose: subroutine foo !$omp requires unified_shared_memory !$omp target !$omp end target end subroutine foo subroutine bar !$omp requires reverse_offload !$omp target !$omp

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Aldy Hernandez via Gcc-patches
On Fri, Jul 1, 2022 at 4:58 PM Jakub Jelinek wrote: > > On Fri, Jul 01, 2022 at 04:12:55PM +0200, Aldy Hernandez wrote: > > > --- a/gcc/wide-int.h > > > +++ b/gcc/wide-int.h > > > @@ -1373,10 +1373,13 @@ namespace wi > > > : public int_traits {}; > > > } > > > > > > -/* An array of N wide_i

Re: RFA: Another Rust demangler recursion limit

2022-07-01 Thread Jeff Law via Gcc-patches
On 7/1/2022 9:12 AM, Nick Clifton wrote: Hi Jeff, [I am sending this to your directly since you seem to be the only one reviewing these patches]. Hot on the heels of the fix for the recursion problem in demangle_const a binutils user has filed another PoC that exposes a problem i

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 06:31:48PM +0200, Tobias Burnus wrote: > This is done in openmp.cc during parsing. The merging you quoted (in > parse.cc) happens > after the whole input file has been parsed and resolved. For your test case, > the > following error is shown: > > test.f90:1:15: > > 1

[og12] [committed] Port remaining OG11 patches

2022-07-01 Thread Kwok Cheung Yeung
Hello I have committed the following forward-ports from OG11 onto the devel/omp/gcc-12 branch to bring OG12 up-to-parity with OG11 again. 12d14a9a255 amdgcn: libgomp plugin USM implementation 687640af27a amdgcn, openmp: Auto-detect USM mode and set HSA_XNACK cbc3dd01de8 amdgcn: Support XNACK m

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 06:47:48PM +0200, Aldy Hernandez wrote: > > So, you are looking for something like trailing_wide_ints but where that > > N is actually a runtime value? Then e.g. the > > struct {unsigned char len;} m_len[N]; > > member can't work properly either, because it isn't constant

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Aldy Hernandez via Gcc-patches
On Fri, Jul 1, 2022, 18:58 Jakub Jelinek wrote: > On Fri, Jul 01, 2022 at 06:47:48PM +0200, Aldy Hernandez wrote: > > > So, you are looking for something like trailing_wide_ints but where > that > > > N is actually a runtime value? Then e.g. the > > > struct {unsigned char len;} m_len[N]; > >

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Richard Sandiford via Gcc-patches
Aldy Hernandez via Gcc-patches writes: > Currently global ranges are stored in SSA_NAME_RANGE_INFO as a pair of > wide_int-like objects along with the nonzero bits. We frequently lose > precision when streaming out our higher resolution iranges. The plan > was always to store the full irange bet

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 01, 2022 at 07:43:28PM +0200, Aldy Hernandez wrote: > You can still say N=255 and things continue to work as they do now, since > m_len[] is still statically determined. The only difference is that before, > the size of the structure would be 2+1+255+sizeof(int) whereas now it would > b

Re: [PATCH] sanitizer: Fix hwasan related option conflicts [PR106132]

2022-07-01 Thread Jeff Law via Gcc-patches
On 6/29/2022 6:04 AM, Martin Liška wrote: Split report_conflicting_sanitizer_options(..., SANITIZE_ADDRESS | SANITIZE_HWADDRESS) call into 2 calls as we don't have any option that would be address+hwaddress (that conflicts as well). PR sanitizer/106132 gcc/ChangeLog: * opts.cc (fin

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 6/29/22 12:59, Jason Merrill wrote: On 6/23/22 13:03, Lewis Hyatt via Gcc-patches wrote: Hello- https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595556.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431#c49 Would a C++ maintainer have some time to take a look at this patch please? I

Re: [pushed] c++: Include -Woverloaded-virtual in -Wall [PR87729]

2022-07-01 Thread Stephan Bergmann via Gcc-patches
On 6/25/22 00:26, Jason Merrill via Gcc-patches wrote: This seems like a good warning to have in -Wall, as requested. But as pointed out in PR20423, some users want a warning only when a derived function doesn't override any base function. So let's put that lesser version in -Wall (and -Woverlo

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Aldy Hernandez via Gcc-patches
On Fri, Jul 1, 2022 at 8:53 PM Jakub Jelinek wrote: > > On Fri, Jul 01, 2022 at 07:43:28PM +0200, Aldy Hernandez wrote: > > You can still say N=255 and things continue to work as they do now, since > > m_len[] is still statically determined. The only difference is that before, > > the size of the

Go patch committed: Avoid C++20 keyword requires

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend renames "requires" to "needs" to avoid the C++20 keyword. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian 9d44418664ec8c3e59365901e3ec02e488d9e01c diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 0d49e9e70c6..65f64e0fbfb 100644 --

Re: [RFC] trailing_wide_ints with runtime variable lengths

2022-07-01 Thread Aldy Hernandez via Gcc-patches
BTW, I don't know if it got lost in all my patches, but we already have an irange allocator that given an irange, returns a chunk of memory holding a clone of that irange squished into its minimum representable pairs (see vrange_allocator and friends). So we won't ever be storing 255 or something

[PATCH] tree-sra: Fix union handling in build_reconstructed_reference (PR 105860)

2022-07-01 Thread Martin Jambor
Hi, As the testcase in PR 105860 shows, the code that tries to re-use the handled_component chains in SRA can be horribly confused by unions, where it thinks it has found a compatible structure under which it can chain the references, but in fact it found the type it was looking for elsewhere in a

Re: [Patch][v5] OpenMP: Move omp requires checks to libgomp

2022-07-01 Thread Tobias Burnus
Updated version attached – I hope I got everything right, but I start to get tired, I am not 100% sure. On 01.07.22 18:55, Jakub Jelinek wrote: Perhaps you're just lucky and the stack contains '\0' there? Probably. Maybe it would be better to simply use different error message for the 0 vs. no

[r13-1395 Regression] FAIL: gfortran.dg/check_bits_2.f90 -O1 output pattern test on Linux/x86_64

2022-07-01 Thread skpandey--- via Gcc-patches
On Linux/x86_64, f843bea4ca5613cb713f8b9313daa3938f254a05 is the first bad commit commit f843bea4ca5613cb713f8b9313daa3938f254a05 Author: Uros Bizjak Date: Fri Jul 1 17:25:03 2022 +0200 i386: Use "r" constraint in *andn3_doubleword_bmi caused FAIL: gfortran.dg/check_bits_2.f90 -O1 out

[committed] libstdc++: Add missing prerequisite to generated header [PR106162]

2022-07-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This should be backported too. -- >8 -- The ${host_builddir}/largefile-config.h header can't be written until its parent directory has been created, so it needs to have the creation of that directory as a prerequisite. libstdc++-v3/ChangeLog: P

DSE patch RFA: Don't delete trapping insn

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
The DSE pass can delete a dead store even if the instruction can trap. That is incorrect when using -fnon-call-exceptions -fno-delete-dead-exceptions. This led to a bug report against gccgo: https://go.dev/issue/53012. However, the bug is not specific to Go. This patch fixes the problem in a sim

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-01 Thread Lewis Hyatt via Gcc-patches
On Fri, Jul 1, 2022 at 3:59 PM Jason Merrill wrote: > > On 6/29/22 12:59, Jason Merrill wrote: > > On 6/23/22 13:03, Lewis Hyatt via Gcc-patches wrote: > >> Hello- > >> > >> https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595556.html > >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431#c49 >

Re: [PATCH] c++: generic targs and identity substitution [PR105956]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 6/29/22 13:42, Patrick Palka wrote: In r13-1045-gcb7fd1ea85feea I assumed that substitution into generic DECL_TI_ARGS corresponds to an identity mapping of the given arguments, and hence its safe to always elide such substitution. But this PR demonstrates that such a substitution isn't always

Go patch committe: Use correct init order for multi-value init

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses the correct initialization order for code like var a = c var b, c = x.(bool) The global c is initialized by the preinit of b, but we were missing a dependency of c on b, so a would be initialized to the zero value of c rather than the correct value. Simply addi

Re: DSE patch RFA: Don't delete trapping insn

2022-07-01 Thread Jeff Law via Gcc-patches
On 7/1/2022 4:04 PM, Ian Lance Taylor via Gcc-patches wrote: The DSE pass can delete a dead store even if the instruction can trap. That is incorrect when using -fnon-call-exceptions -fno-delete-dead-exceptions. This led to a bug report against gccgo: https://go.dev/issue/53012. However, the

Re: [PATCH]middle-end Add optimized float addsub without needing VEC_PERM_EXPR.

2022-07-01 Thread Jeff Law via Gcc-patches
On 6/17/2022 2:33 PM, Andrew Pinski via Gcc-patches wrote: On Thu, Jun 16, 2022 at 3:59 AM Tamar Christina via Gcc-patches wrote: Hi All, For IEEE 754 floating point formats we can replace a sequence of alternative +/- with fneg of a wider type followed by an fadd. This eliminated the need

Re: [PATCH]middle-end Add optimized float addsub without needing VEC_PERM_EXPR.

2022-07-01 Thread Jeff Law via Gcc-patches
On 6/20/2022 5:56 AM, Richard Biener via Gcc-patches wrote: Note one option would be to emit a multiply with { 1, -1, 1, -1 } on GIMPLE where then targets could opt-in to handle this via a DFmode negate via a combine pattern? Not sure if this can be even done starting from the vec-perm RTL

Re: Ping^2: [PATCH v2] diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431]

2022-07-01 Thread Jason Merrill via Gcc-patches
On 7/1/22 18:05, Lewis Hyatt wrote: On Fri, Jul 1, 2022 at 3:59 PM Jason Merrill wrote: On 6/29/22 12:59, Jason Merrill wrote: On 6/23/22 13:03, Lewis Hyatt via Gcc-patches wrote: Hello- https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595556.html https://gcc.gnu.org/bugzilla/show_bug.cgi