[PATCH] xtensa: Enforce return address saving when -Og is specified

2023-02-17 Thread Takayuki 'January June' Suwa via Gcc-patches
Leaf function often omits saving its return address to the stack slot, and this feature often makes debugging very confusing, especially for stack dump analysis. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_call_save_reg): Change to return true if register A0 (return address r

[PATCH v5] xtensa: Eliminate unnecessary general-purpose reg-reg moves

2023-02-17 Thread Takayuki 'January June' Suwa via Gcc-patches
Register-register move instructions that can be easily seen as unnecessary by the human eye may remain in the compiled result. For example: /* example */ double test(double a, double b) { return __builtin_copysign(a, b); } test: add.n a3, a3, a3 extui a5, a5, 31, 1 s

'#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' (was: [gcc r13-5533] gccrs: const folding port)

2023-02-17 Thread Thomas Schwinge
Hi! On 2023-01-31T13:14:10+, Arthur Cohen via Gcc-cvs wrote: > commit r13-5533-ge66fec8e6ba35edf01f86c2bf6514109aba4ded2 > Author: Faisal Abbas <90.abbasfai...@gmail.com> > Date: Mon Jun 27 16:05:49 2022 +0100 > > gccrs: const folding port > --- a/gcc/rust/backend/rust-tree.cc > +++ b

[PATCH resend] Make -Wuse-after-free=3 the default one in -Wall

2023-02-17 Thread Alejandro Colomar via Gcc-patches
Link: Link: Cc: Andreas Schwab Cc: David Malcolm Cc: Florian Weimer Cc: Iker Pedrosa Cc: Jens Gustedt Cc: Jonathan Wakely Cc: Mark Wi

Re: [PATCH RFC] c++: static_assert (false) in template [DR2518]

2023-02-17 Thread Marek Polacek via Gcc-patches
On Fri, Feb 17, 2023 at 03:32:09PM -0500, Jason Merrill via Gcc-patches wrote: > Tested x86_64-pc-linux-gnu. This isn't really a regression fix, but it's very > safe, and fixes a longstanding annoyance, so I'm leaning toward putting it > into > GCC 13. Thoughts? LGTM. > -- 8< -- > > For a lo

[PATCH v3] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Marek Polacek via Gcc-patches
On Fri, Feb 17, 2023 at 04:32:50PM -0500, Patrick Palka wrote: > On Fri, 17 Feb 2023, Patrick Palka wrote: > > > On Fri, 17 Feb 2023, Marek Polacek wrote: > > > > > On Fri, Feb 17, 2023 at 03:00:39PM -0500, Patrick Palka wrote: > > > > On Fri, 17 Feb 2023, Marek Polacek via Gcc-patches wrote: > >

Re: [PATCH] Fixing PR107411

2023-02-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 17, 2023 at 10:26:03PM +, Qing Zhao via Gcc-patches wrote: > + else if (!DECL_NAME (lhs_var)) > + { > + char *lhs_var_name_str > + = xasprintf ("D.%u", DECL_UID (lhs_var)); Why xasprintf? D.%u can be sprintfed into a fixed size a

[PATCH] Fixing PR107411

2023-02-17 Thread Qing Zhao via Gcc-patches
This is a bug in tree-ssa-uninit.cc. When doing the following: /* Ignore the call to .DEFERRED_INIT that define the original var itself as the following case: temp = .DEFERRED_INIT (4, 2, “alt_reloc"); alt_reloc = temp; In order to avoid generating warning for the fake us

Re: [C PATCH] Detect all variably modified types [PR108375]

2023-02-17 Thread Joseph Myers
On Fri, 17 Feb 2023, Martin Uecker via Gcc-patches wrote: > Here is a patch for PR108375. This patch is OK. > and another C FE patch for PR105660: > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611817.html This one is also OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 2/2] Remove #if GIMPLE around 1 - a pattern

2023-02-17 Thread Jeff Law via Gcc-patches
On 2/17/23 14:45, Andrew Pinski via Gcc-patches wrote: This removes the "#if GIMPLE" around the "1 - a" pattern as ssa_name_has_boolean_range (get_range_query) works when cfun is a nullptr. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * match.p

[PATCH 1/2] Support get_range_query with a nullptr argument

2023-02-17 Thread Andrew Pinski via Gcc-patches
get_range_query didn't support a nullptr argument before and would crash. See also the thread at https://inbox.sourceware.org/gcc/4f6718af-e17a-41ef-a886-f45e4ac3d...@redhat.com/T/ OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * value-query.h (get_ra

[PATCH 2/2] Remove #if GIMPLE around 1 - a pattern

2023-02-17 Thread Andrew Pinski via Gcc-patches
This removes the "#if GIMPLE" around the "1 - a" pattern as ssa_name_has_boolean_range (get_range_query) works when cfun is a nullptr. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * match.pd: Remove #if GIMPLE around the "1 - a" pattern ---

Re: [PATCH v2] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Patrick Palka via Gcc-patches
On Fri, 17 Feb 2023, Patrick Palka wrote: > On Fri, 17 Feb 2023, Marek Polacek wrote: > > > On Fri, Feb 17, 2023 at 03:00:39PM -0500, Patrick Palka wrote: > > > On Fri, 17 Feb 2023, Marek Polacek via Gcc-patches wrote: > > > > > > > Here we crash in is_capture_proxy: > > > > > > > > /* Locati

Re: [PATCH v2] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Patrick Palka via Gcc-patches
On Fri, 17 Feb 2023, Marek Polacek wrote: > On Fri, Feb 17, 2023 at 03:00:39PM -0500, Patrick Palka wrote: > > On Fri, 17 Feb 2023, Marek Polacek via Gcc-patches wrote: > > > > > Here we crash in is_capture_proxy: > > > > > > /* Location wrappers should be stripped or otherwise handled by the

Re: [PATCH] doc: Fix typo in -Wall description

2023-02-17 Thread Siddhesh Poyarekar
On 2023-02-17 14:43, Jeff Law wrote: On 2/17/23 06:41, Siddhesh Poyarekar wrote: -Wall enables -Wuse-after-free=2 and not -Wuse-after-free=3. gcc/ChangeLog: * gcc/doc/invoke.texi (@item -Wall): Fix typo in -Wuse-after-free. Looks obvious to me.  If you haven't committed it already,

[PATCH v2] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Marek Polacek via Gcc-patches
On Fri, Feb 17, 2023 at 03:00:39PM -0500, Patrick Palka wrote: > On Fri, 17 Feb 2023, Marek Polacek via Gcc-patches wrote: > > > Here we crash in is_capture_proxy: > > > > /* Location wrappers should be stripped or otherwise handled by the > > caller before using this predicate. */ > >

Re: [PATCH RFC] c++: static_assert (false) in template [DR2518]

2023-02-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 17, 2023 at 03:32:09PM -0500, Jason Merrill via Gcc-patches wrote: > Tested x86_64-pc-linux-gnu. This isn't really a regression fix, but it's very > safe, and fixes a longstanding annoyance, so I'm leaning toward putting it > into > GCC 13. Thoughts? I think it is ok for GCC 13. I

Re: [PATCH] [libstdc++] ensure mutex_pool survives _Safe_sequence_base

2023-02-17 Thread François Dumont via Gcc-patches
On 17/02/23 09:01, Alexandre Oliva via Libstdc++ wrote: On Feb 17, 2023, Alexandre Oliva wrote: On vxworks, after destroying the semaphore used to implement a mutex, __gthread_mutex_lock fails and __gnu_cxx::__mutex::lock calls __throw_concurrence_lock_error. Nothing ensures the mutex_pool mu

[PATCH RFC] c++: static_assert (false) in template [DR2518]

2023-02-17 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu. This isn't really a regression fix, but it's very safe, and fixes a longstanding annoyance, so I'm leaning toward putting it into GCC 13. Thoughts? -- 8< -- For a long time, people have expected to be able to write static_assert (false) in a template and only have it

Re: [PATCH] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Patrick Palka via Gcc-patches
On Fri, 17 Feb 2023, Marek Polacek via Gcc-patches wrote: > Here we crash in is_capture_proxy: > > /* Location wrappers should be stripped or otherwise handled by the > caller before using this predicate. */ > gcc_checking_assert (!location_wrapper_p (decl)); > > so fixed as the commen

Re: [PATCH] Drop need for constant I in ctf test

2023-02-17 Thread Mike Stump via Gcc-patches
On Feb 16, 2023, at 10:59 PM, Alexandre Oliva wrote: > > Though I is supposed to be a constant expression, this is not the case > on vxworks, but this is not what this debug information format test is > testing for, so use real constants to initialize complex variables. > > Regstrapped on x86_64

Re: [PATCH] [arm] xfail fp-uint64-convert-double-* on all arm targets

2023-02-17 Thread Mike Stump via Gcc-patches
On Feb 16, 2023, at 10:20 PM, Alexandre Oliva wrote: > > It wasn't long ago that I xfailed these tests on arm-*-eabi, but the > fail is expected on all other arm targets: even when hard float is > available, conversions between 64-bit integers and double are always > emulated on ARM, and the emul

Re: [arm] [testsuite] asm-flag-4.c: match quotes in expected message

2023-02-17 Thread Mike Stump via Gcc-patches
On Feb 16, 2023, at 10:15 PM, Alexandre Oliva wrote: > > Quotes were added around the "asm" keyword in the message expected by > the test, so the test needs adjusting. > > Regstrapped on x86_64-linux-gnu. > Tested on arm-vxworks7 (gcc-12) and arm-eabi (trunk). > Ok to install? Ok.

Re: [PATCH] Fix PR target/90458

2023-02-17 Thread Jeff Law via Gcc-patches
On 2/17/23 01:56, NightStrike via Gcc-patches wrote: On Thu, Feb 16, 2023 at 3:16 AM Eric Botcazou wrote: This fixes dg.exp/stack-check-2.c, -7, 8, and -16.c, which is great! Try the attached patch. Well... that patch just marks all of the tests as unsupported. But for example, the on

Re: [PATCH] doc: Fix typo in -Wall description

2023-02-17 Thread Jeff Law via Gcc-patches
On 2/17/23 06:41, Siddhesh Poyarekar wrote: -Wall enables -Wuse-after-free=2 and not -Wuse-after-free=3. gcc/ChangeLog: * gcc/doc/invoke.texi (@item -Wall): Fix typo in -Wuse-after-free. Looks obvious to me. If you haven't committed it already, go ahead. jeff

[PATCH] c++: ICE with redundant capture [PR108829]

2023-02-17 Thread Marek Polacek via Gcc-patches
Here we crash in is_capture_proxy: /* Location wrappers should be stripped or otherwise handled by the caller before using this predicate. */ gcc_checking_assert (!location_wrapper_p (decl)); so fixed as the comment suggests. We only crash with the redundant capture: int abyPage = [

[C PATCH] Detect all variably modified types [PR108375]

2023-02-17 Thread Martin Uecker via Gcc-patches
Here is a patch for PR108375. Bootstrapped and regession tested on x86_64-linux-gnu Also there is a middle-end patch for PR107557 and PR108423: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611562.html and another C FE patch for PR105660: https://gcc.gnu.org/pipermail/gcc-patches/20

Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-17 Thread Segher Boessenkool
Hi! On Fri, Feb 17, 2023 at 10:28:41PM +0530, Ajit Agarwal wrote: > This patch replaces fmr instruction (6 cycles) with xxlor instruction ( 2 > cycles) > Bootstrapped and regtested on powerpc64-linux-gnu. You tested this on a CPU that does have VSX. It is incorrect on other (older) CPUs. > ---

Re: [PATCH] Accept pmf-vbit-in-delta extra warning

2023-02-17 Thread Jason Merrill via Gcc-patches
On 2/17/23 23:02, Alexandre Oliva wrote: cp_build_binary_op, that issues -Waddress warnings, issues an extra warning on arm targets, that g++.dg/warn/Waddress-5.C does not expect when comparing a pointer-to-member-function literal with null. The reason for the extra warning is that, on arm targ

Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-17 Thread Andrew Pinski via Gcc-patches
On Fri, Feb 17, 2023 at 8:59 AM Ajit Agarwal via Gcc-patches wrote: > > > Hello All: > > This patch replaces fmr instruction (6 cycles) with xxlor instruction ( 2 > cycles) > Bootstrapped and regtested on powerpc64-linux-gnu. I don't think this can be unconditionally replaced. xxlor only exists

Re: [PATCH] [vxworks] make wint_t and wchar_t the same distinct type

2023-02-17 Thread Jason Merrill via Gcc-patches
On 2/17/23 23:04, Alexandre Oliva wrote: We used to define WINT_TYPE to WCHAR_TYPE, so that both wint_t and wchar_t mapped to the same underlying type, but this caused a glitch in Wstringop-overflow-6.C: on vxworks, wint_t is typedef'ed to wchar_t And fixing that isn't an option? Do the integ

RE: 3D Printing Software - Gcc 

2023-02-17 Thread Zoe Smith via Gcc-patches
Hello , Hope you're doing good. I'm writing to thank you for your time and kindly let me know your thoughts on below email, so that I can revert you with the more information on the same. Regards, Zoe Smith From: Zoe Smith Sent: 15 February 2023 09:25 AM To: Gcc Subject: 3D Printing Software

[PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-17 Thread Ajit Agarwal via Gcc-patches
Hello All: This patch replaces fmr instruction (6 cycles) with xxlor instruction ( 2 cycles) Bootstrapped and regtested on powerpc64-linux-gnu. copyright assignment form is still in the process of being sent. Thanks & Regards Ajit rs6000: fmr gets used instead of faster xxlor

[PATCH] i386: Generate QImode binary ops with high-part input register [PR108831]

2023-02-17 Thread Uros Bizjak via Gcc-patches
Following testcase: --cut here-- struct S { unsigned char pad1; unsigned char val; unsigned short pad2; }; unsigned char test_add (unsigned char a, struct S b) { a += b.val; return a; } --cut here-- should be compiled to something like: addb %dh, %al but is currently compile

Re: [Patch] Fortran: Avoid SAVE_EXPR for deferred-len char types

2023-02-17 Thread Steve Kargl via Gcc-patches
On Fri, Feb 17, 2023 at 12:13:52PM +0100, Tobias Burnus wrote: > Short version: > > This fixes potential and real bugs related to 'len=:' character variables > as for the length/byte size an old/saved expression is used instead of > the current value. - That's fine but not for allocatable/pointer

Re: [PATCH] simplify-rtx: Fix VOIDmode operand handling in simplify_subreg [PR108805]

2023-02-17 Thread Uros Bizjak via Gcc-patches
On Fri, Feb 17, 2023 at 12:31 PM Richard Biener wrote: > > On Fri, 17 Feb 2023, Uros Bizjak wrote: > > > On Fri, Feb 17, 2023 at 8:38 AM Richard Biener wrote: > > > > > > On Thu, 16 Feb 2023, Uros Bizjak wrote: > > > > > > > simplify_subreg can return VOIDmode const_int operand and will > > > > c

Re: [PATCH] diagnostics: fix crash with -fdiagnostics-format=json-file

2023-02-17 Thread Martin Liška
PING^3 On 2/1/23 14:13, Martin Liška wrote: > PING^2 > > On 1/24/23 14:34, Martin Liška wrote: >> PING^1 >> >> On 1/10/23 16:10, Martin Liška wrote: >>> On 1/6/23 14:21, David Malcolm wrote: On Fri, 2023-01-06 at 12:33 +0100, Martin Liška wrote: > Patch can bootstrap on x86_64-linux-gnu

Re: [PING] Re: [PATCH 2/2] Corrected pr25521.c target matching.

2023-02-17 Thread Cupertino Miranda via Gcc-patches
PING ! Cupertino Miranda via Gcc-patches writes: > Hi Jeff, > > Can you please confirm if the patch is Ok? > > Thanks, > Cupertino > >> Cupertino Miranda via Gcc-patches writes: >> >>> Thank you for the comments and suggestions. >>> I have changed the patch. >>> >>> Unfortunately in case of

RISC-V: Add divmod instruction support

2023-02-17 Thread Matevos Mehrabyan via Gcc-patches
Hi all, If we have division and remainder calculations with the same operands: a = b / c; d = b % c; We can replace the calculation of remainder with multiplication + subtraction, using the result from the previous division: a = b / c; d = a * c; d = b - d; Which will be faster. Curre

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-17 Thread Qing Zhao via Gcc-patches
Ping… Qing > On Feb 10, 2023, at 7:50 PM, Qing Zhao wrote: > > on structure with C99 flexible array member being nested in another structure. > > This is also fixed PR77650. > > " GCC extension accepts a structure containing a ISO C99 "flexible array > member", or a union containing such a st

Re: [v3][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-02-17 Thread Qing Zhao via Gcc-patches
Ping… Qing > On Feb 10, 2023, at 7:50 PM, Qing Zhao wrote: > > GCC extension accepts the case when a struct with a C99 flexible array member > is embedded into another struct or union (possibly recursively). > __builtin_object_size should treat such struct as flexible size. > > gcc/c/ChangeLog

Re: [v3][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size

2023-02-17 Thread Qing Zhao via Gcc-patches
Ping… Qing > On Feb 10, 2023, at 7:50 PM, Qing Zhao wrote: > > These are the 3rd version of the patches for PR101832, to fix > builtin_object_size to correctly handle component_ref to a > structure/union field that includes a flexible array member. > > also includes a documentation update for

[PATCH] doc: Fix typo in -Wall description

2023-02-17 Thread Siddhesh Poyarekar
-Wall enables -Wuse-after-free=2 and not -Wuse-after-free=3. gcc/ChangeLog: * gcc/doc/invoke.texi (@item -Wall): Fix typo in -Wuse-after-free. Signed-off-by: Siddhesh Poyarekar --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/i

Re: [PR100127] Test for coroutine header in clang-compatible tests

2023-02-17 Thread Iain Sandoe
Hi, > On 17 Feb 2023, at 06:42, Alexandre Oliva via Gcc-patches > wrote: > > > The test is compatible with clang as well as gcc, but ISTM that > testing for the __clang__ macro is just as potentially error-prone as > macros that used to be GCC-specific are now defined in compilers that > aim f

Re: [PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 17, 2023 at 04:47:45AM -0300, Alexandre Oliva wrote: > > On platforms that fail the ptrtomemfn-cast-to-pfn hack, such as > arm-*-vxworks*, time_get fails with %I and %p because the state is not > preserved across do_get calls. > > This patch introduces an alternate hack, that encodes

[COMMITTED] fixincludes: Bypass solaris_math_12 on newer Solaris 11.4

2023-02-17 Thread Rainer Orth
Solaris 11 long had this snippet #if __cplusplus >= 201103L #undef _GLIBCXX_USE_C99_MATH #undef _GLIBCXX_USE_C99_MATH_TR1 #endif which badly broke libstdc++. This has long been undone using fixincludes in [fixincludes, v3] Don't define libstdc++-internal macros in Solaris 10+

[COMMITTED] contrib: Fix make_sunver.pl warning

2023-02-17 Thread Rainer Orth
Petr informed me that perl 5.32 bundled with Solaris 11.4 warns about make_sunver.pl: Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/^([ \t]*){ <-- HERE $/ at /vol/gcc/src/hg/master/local/libgomp/../contrib/make_sunver.pl line 216. I didn't notice since I'm us

[PATCHv2] openmp: Add support for 'present' modifier

2023-02-17 Thread Kwok Cheung Yeung
Hello This is a revised version of the patch for the 'present' modifier for OpenMP. Compared to the first version, three improvements have been made: - A bug which caused bootstrapping with a '-m32' multilib on x86-64 to fail due to pointer size issues has been fixed. - The Fortran parse tre

[PATCH] tree-optimization/108821 - store motion and volatiles

2023-02-17 Thread Richard Biener via Gcc-patches
The following fixes store motion to not re-issue volatile stores to preserve TBAA behavior since that will result in the number of volatile accesses changing. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk. PR tree-optimization/108821 * tree-ssa-loop-im.cc (s

Re: [PATCH] simplify-rtx: Fix VOIDmode operand handling in simplify_subreg [PR108805]

2023-02-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Feb 2023, Uros Bizjak wrote: > On Fri, Feb 17, 2023 at 8:38 AM Richard Biener wrote: > > > > On Thu, 16 Feb 2023, Uros Bizjak wrote: > > > > > simplify_subreg can return VOIDmode const_int operand and will > > > cause ICE in simplify_gen_subreg when this operand is passed to it. > > >

[PATCH] Fix wrong-code issue in VN

2023-02-17 Thread Richard Biener via Gcc-patches
The following fixes the wrong removed dead store discovered on the PR108657 testcase when the reported DSE issue is not fixed. The issue is we were using ssa_undefined_value_p on virtual operands which returns a result based on the real definition of the definition statement. That doesn't make sen

[Patch] Fortran: Avoid SAVE_EXPR for deferred-len char types

2023-02-17 Thread Tobias Burnus
Short version: This fixes potential and real bugs related to 'len=:' character variables as for the length/byte size an old/saved expression is used instead of the current value. - That's fine but not for allocatable/pointer with 'len=:'. Main part of the patch: Strip the SAVE_EXPR from the siz

Re: [PATCH] [libstdc++] ensure mutex_pool survives _Safe_sequence_base

2023-02-17 Thread Jonathan Wakely via Gcc-patches
On Fri, 17 Feb 2023, 08:02 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Feb 17, 2023, Alexandre Oliva wrote: > > > On vxworks, after destroying the semaphore used to implement a mutex, > > __gthread_mutex_lock fails and __gnu_cxx::__mutex::lock calls > > __throw_concurrence

Re: [PATCH] [libstdc++] xfail noreplace tests on vxworks

2023-02-17 Thread Jonathan Wakely via Gcc-patches
On Fri, 17 Feb 2023, 07:40 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > vxworks ignores O_EXCL in open, so noreplace open succeeds when it is > expected to fail. xfail the tests. > > Regstrapped on x86_64-linux-gnu. > Tested on arm-vxworks7 (gcc-12) and arm-eabi (trunk). Ok

Re: [libstdc++] [testsuite] intro/names.cc: undef func on vxw7krn

2023-02-17 Thread Jonathan Wakely via Gcc-patches
On Fri, 17 Feb 2023, 06:19 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > The '#define func' added in 2021, to test that system headers don't > violate the user namespace, exposes such a bug in the vxworks sysLib.h > header, so add yet another such annotated workaround. > > Reg

Re: [libstdc++] Use __gthread_join in jthread/95989

2023-02-17 Thread Jonathan Wakely via Gcc-patches
On Fri, 17 Feb 2023, 06:40 Alexandre Oliva via Libstdc++, < libstd...@gcc.gnu.org> wrote: > > Ref: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570617.html > > Bernd Edlinger reported that the 95989.cc > test fails without pthread_join at the end of main, Yes, but that doesn't mean we wan

[PATCH] optabs: Fix up expand_doubleword_shift_condmove for shift_mask == 0 [PR108803]

2023-02-17 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled on aarch64. The problem is that aarch64 with TARGET_SIMD is !SHIFT_COUNT_TRUNCATED target with targetm.shift_truncation_mask (DImode) == 0 which has HAVE_conditional_move true. If a doubleword shift (in this case TImode) doesn't have its own expander (as

[PATCH] rs6000: Fix vector_set_var_p9 by considering BE [PR108807]

2023-02-17 Thread Kewen.Lin via Gcc-patches
Hi, As PR108807 exposes, the current handling in function rs6000_expand_vector_set_var_p9 doesn't take care of big endianness. Currently the function is to rotate the target vector by moving element to-be-set to element 0, set element 0 with the given val, then rotate back. To get the permutatio

[PATCH v2] rs6000: Fix vector parity support [PR108699]

2023-02-17 Thread Kewen.Lin via Gcc-patches
Hi, The failures on the original failed case builtin-bitops-1.c and the associated test case pr108699.c here show that the current support of parity vector mode is wrong on Power. The hardware insns vprtyb[wdq] which operate on the least significant bit of each byte per element, they doesn't match

Re: [PATCH] Fix PR target/90458

2023-02-17 Thread Eric Botcazou via Gcc-patches
> Is there a way to say that the test results should be inverted on a > particular platform (instead of purely unsupported)? Yes, you can do pretty much what you want with the testsuite harness. -- Eric Botcazou

Re: [PATCH] -Wdangling-pointer: don't mark SSA lhs sets as stores

2023-02-17 Thread Alexandre Oliva via Gcc-patches
On Feb 17, 2023, Alexandre Oliva wrote: > Now, really, I did not get as far as trying to make sense of the > algorithm in there (get_ref definitely doesn't do what its name suggests > to me), I just saw a bunch of weirdnesses in blackbox testing and > failing variations, that seemed to suggest so

Re: [PATCH] Fix PR target/90458

2023-02-17 Thread NightStrike via Gcc-patches
On Thu, Feb 16, 2023 at 3:16 AM Eric Botcazou wrote: > > > This fixes dg.exp/stack-check-2.c, -7, 8, and -16.c, which is great! > > Try the attached patch. Well... that patch just marks all of the tests as unsupported. But for example, the ones quoted above run, work, and pass. And when they di

Re: [PATCH] simplify-rtx: Fix VOIDmode operand handling in simplify_subreg [PR108805]

2023-02-17 Thread Uros Bizjak via Gcc-patches
On Fri, Feb 17, 2023 at 8:38 AM Richard Biener wrote: > > On Thu, 16 Feb 2023, Uros Bizjak wrote: > > > simplify_subreg can return VOIDmode const_int operand and will > > cause ICE in simplify_gen_subreg when this operand is passed to it. > > > > The patch prevents VOIDmode temporary from entering

RE: [PATCH] RISC-V: Bugfix for rvv bool mode precision adjustment

2023-02-17 Thread Li, Pan2 via Gcc-patches
Cool, thank you! Hi Richard S, Could you please help to do me a fever for this change when you free? Thank you! Pan -Original Message- From: Richard Biener Sent: Friday, February 17, 2023 3:36 PM To: juzhe.zhong Cc: incarnation.p@outlook.com; gcc-patches@gcc.gnu.org; kito.ch...@

[PATCH] Add pattern for clo

2023-02-17 Thread Junxian Zhu
From: Junxian Zhu gcc/ChangeLog: * config/mips/mips.md (*clo2): New pattern. gcc/testsuite/ChangeLog: * gcc.target/mips/clz.c: New test. * gcc.target/mips/clz.c: New test. * gcc.target/mips/mips.exp: New option HAS_CLZ. Signed-off-by: Junxian Zhu --- gcc/conf

Re: [PATCH] -Wdangling-pointer: don't mark SSA lhs sets as stores

2023-02-17 Thread Alexandre Oliva via Gcc-patches
Hi, richi, On Feb 17, 2023, Richard Biener wrote: > It seems the case should run into Yeah, but when the stmt is _7 = this_2(D), lhs is _7, whereas lhs_ref.ref is this_2(D), a parm decl's default def, so def_stmt is a gimple_nop, and this is not a decl_by_reference, so we don't skip stores.add,

[PATCH] Hazard barrier return support

2023-02-17 Thread Junxian Zhu
From: Junxian Zhu This patch allows a function to request clearing of all instruction and execution hazards upon normal return via __attribute__ ((use_hazard_barrier_return)). 2017-04-25 Prachi Godbole gcc/ChangeLog: * config/mips/mips.h (machine_function): New variable use

Re: [og12] Attempt to register OpenMP pinned memory using a device instead of 'mlock' (was: [PATCH] libgomp, openmp: pinned memory)

2023-02-17 Thread Thomas Schwinge
Hi Andrew! On 2023-02-16T23:06:44+0100, I wrote: > On 2023-02-16T16:17:32+, "Stubbs, Andrew via Gcc-patches" > wrote: >> The mmap implementation was not optimized for a lot of small allocations, >> and I can't see that issue changing here > > That's correct, 'mmap' remains. Under the hood,

Re: [PATCH] [libstdc++] ensure mutex_pool survives _Safe_sequence_base

2023-02-17 Thread Alexandre Oliva via Gcc-patches
On Feb 17, 2023, Alexandre Oliva wrote: > On vxworks, after destroying the semaphore used to implement a mutex, > __gthread_mutex_lock fails and __gnu_cxx::__mutex::lock calls > __throw_concurrence_lock_error. Nothing ensures the mutex_pool > mutexes survive init-once objects containing _Safe_se