[PATCH] Fix PR target/103100 -mstrict-align and memset on not aligned buffers

2021-11-05 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem here is with -mstrict-align, aarch64_expand_setmem needs to check the alginment of the mode to make sure we can use it for doing the stores. gcc/ChangeLog: PR target/103100 * config/aarch64/aarch64.c (aarch64_expand_setmem): Add check for

Re: [PATCH] Add TSVC tests.

2021-11-05 Thread David Edelsohn via Gcc-patches
I just noticed that Iain adjusted the tsvc.h for Darwin in the same way that I need to adjust it for AIX. Are we trying to keep the testcase directory pristine and in sync with its upstream source or can we fix it locally? Thanks, David On Fri, Nov 5, 2021 at 8:24 PM David Edelsohn wrote: > >

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-05 Thread Hans-Peter Nilsson
On Wed, 3 Nov 2021, Maciej W. Rozycki wrote: > Correct a `vax-netbsdelf' target regression ultimately caused by commit > c605a8bf9270 ("VAX: Accept ASHIFT in address expressions") (needed for > LRA) and as of commit 4a960d548b7d ("Avoid invalid loop transformations > in jump threading registry.")

Re: [PATCH v5] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
On 6 November 2021 01:21:43 CET, Marek Polacek via Gcc-patches wrote: > >Thanks, so like this? I'm including an incremental diff so that it's >clear what changed: > >diff --git a/gcc/attribs.c b/gcc/attribs.c >index d5fba7f4bbb..addfe6f6c80 100644 >--- a/gcc/attribs.c >+++ b/gcc/attribs.c >@@

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe
Hi Jason > On 5 Nov 2021, at 21:53, Jason Merrill wrote: > > On 11/5/21 17:16, Iain Sandoe wrote: >> Hi Jason, >>> On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches >>> wrote: >>> >>> On 11/5/21 12:01, Iain Sandoe wrote: +|| (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl))

Re: [PATCH] Add TSVC tests.

2021-11-05 Thread David Edelsohn via Gcc-patches
Hi, Martin These testcases rely on memalign in tsvc.h. memalign is provided in Linux and Solaris, but is not part of Posix, and it is not available in AIX. Posix defines posix_memalign, which also is available in AIX. Should the tsvc.h use posix_memalign? Always? Only when memalign is not

[PATCH v5] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-05 Thread Marek Polacek via Gcc-patches
On Fri, Nov 05, 2021 at 02:48:31PM -0400, Jason Merrill wrote: > On 9/28/21 16:20, Marek Polacek wrote: > > On Thu, Sep 23, 2021 at 02:25:16PM -0400, Jason Merrill wrote: > > > On 9/20/21 18:59, Marek Polacek via Gcc-patches wrote: > > > > + handle_ignored_attributes_option (); > > > > +

Re: [PATCH 18/18] rs6000: Add escape-newline support for builtins files

2021-11-05 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:54AM -0500, Bill Schmidt wrote: > +/* Escape-newline support. For readability, we prefer to allow developers > + to use escape-newline to continue long lines to the next one. We > + maintain a buffer of "original" lines here, which are concatenated into > +

Re: libstdc++: Make atomic::wait() const [PR102994]

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 Nov 2021 at 21:51, Jonathan Wakely via Libstdc++ wrote: > > OK, thanks. Actually, we should really have a test to verify it can be called on a const object. Please add something when you commit, it can be dumb and simple, it just needs to verify that it can be called. > > > On Fri, 5

Re: [PATCH 2/4] libstdc++: Adjust build of PCH files accounting configured host support.

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Thu, 4 Nov 2021 at 21:04, Iain Sandoe wrote: > Well, I did try to CC it to this list .. > > > Begin forwarded message: > > > > From: Iain Sandoe via Gcc-patches > > Subject: [PATCH 2/4] libstdc++: Adjust build of PCH files accounting > configured host support. > > Date: 4 November 2021 at

[PATCH] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-05 Thread Marek Polacek via Gcc-patches
2021 update: Last year I posted a version of this patch: but it didn't make it in. The main objection seemed to be that the patch tried to do too much, and overlapped with the ME uninitialized warnings. Since the patch used

Re: [PATCH 0/2] incpath, Fortran: Fix memory leak in gfc_add_include_path

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 5 Nov 2021 22:17:16 +0100 Bernhard Reutner-Fischer wrote: > Hi! > > In order to fix this very minor leak, we need a knob to free all > cpp_dirs that were added. > This adds a free_cpp_dirs() to gcc/incpath and needs review from some > global maintainer or maybe libcpp maintainer for

Re: [PATCH] PR fortran/102817 - [12 Regression] ICE in gfc_clear_shape, at fortran/expr.c:422

2021-11-05 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 05.11.21 um 22:28 schrieb Mikael Morin: Le 01/11/2021 à 22:39, Harald Anlauf via Fortran a écrit : Dear Fortranners, a recent patch uncovered a latent issue with simplification of array-valued expressions where the resulting shape was not set from the referenced subobject.  Once

Re: [PATCH 16/18] rs6000: Test case adjustments

2021-11-05 Thread Segher Boessenkool
On Wed, Sep 01, 2021 at 11:13:52AM -0500, Bill Schmidt wrote: > * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust. My favourite changelog entry! But, adjust to what? This is the first line :-) "Adjust expected error message"? But you should fold this patch with some previous patch

Re: [PATCH] Cleanup back_threader::find_path_to_names.

2021-11-05 Thread Jeff Law via Gcc-patches
On 11/5/2021 2:44 PM, Aldy Hernandez wrote: On Fri, Nov 5, 2021 at 9:06 PM Jeff Law wrote: On 11/5/2021 9:09 AM, Aldy Hernandez wrote: The main path discovery function was due for a cleanup. First, there's a nagging goto and second, my bitmap use was sloppy. Hopefully this makes the

Fix ICE in insert_access

2021-11-05 Thread Jan Hubicka via Gcc-patches
Hi, this patch makes insert_access to ignore accesses that are paradoxical (i.e. their max_size is smaller than size) which can happen for example when VRP proves that the access happens past the end of array bounds. It also checks for zero sized accesses and verifies that max_size is never

Avoid left shift of negative value in ipa-modref-tree.h

2021-11-05 Thread Jan Hubicka via Gcc-patches
Hi, ubsan is complaining about left shift of negative value which is undefined in c++11..c++17. Replaced by multiplication. Bootstrapped/regtested x86_64-linux, comitted. Honza gcc/ChangeLog: PR ipa/103082 * ipa-modref-tree.h (struct modref_access_node): Avoid left shift

Re: [PATCH 17/18] rs6000: Enable the new builtin support

2021-11-05 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:53AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-gen-builtins.c (write_init_file): > Initialize new_builtins_are_live to 1. > --- a/gcc/config/rs6000/rs6000-gen-builtins.c > +++ b/gcc/config/rs6000/rs6000-gen-builtins.c > @@ -2791,7 +2791,7

Re: [PATCH 15/18] rs6000: Update altivec.h for automated interfaces

2021-11-05 Thread Segher Boessenkool
On Wed, Sep 01, 2021 at 11:13:51AM -0500, Bill Schmidt wrote: > gcc/ > * config/rs6000/altivec.h: Delete a number of #defines that are > now superfluous. Alphabetize. Include rs6000-vecdefines.h. > Include some synonyms. * config/rs6000/altivec.h: Delete a number of

Re: [PATCH,FORTRAN] Fix memory leak in finalization wrappers

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 5 Nov 2021 19:46:16 +0100 Mikael Morin wrote: > Le 29/10/2021 à 01:58, Bernhard Reutner-Fischer via Fortran a écrit : > > On Wed, 27 Oct 2021 23:39:43 +0200 > > Bernhard Reutner-Fischer wrote: > > > >> Ping > >> [hmz. it's been a while, I'll rebase and retest this one. > >> Ok if it

Re: [PATCH] coroutines: Pass lvalues to user-defined operator new [PR 100772].

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 11:49, Iain Sandoe wrote: The wording of the standard has been clarified to be explicit that the the parameters to any user-defined operator-new in the promise class should be lvalues. tested on x86_64 darwin, linux, OK for master and backports? thanks Iain Signed-off-by: Iain

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 17:16, Iain Sandoe wrote: Hi Jason, On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches wrote: On 11/5/21 12:01, Iain Sandoe wrote: + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) +

Re: libstdc++: Make atomic::wait() const [PR102994]

2021-11-05 Thread Jonathan Wakely via Gcc-patches
OK, thanks. On Fri, 5 Nov 2021 at 21:46, Thomas Rodgers via Libstdc++ < libstd...@gcc.gnu.org> wrote: > >

Re: [committed] libstdc++: Fix range access for empty std::valarray [PR103022]

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Mon, 1 Nov 2021 at 13:27, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested powerpc64le-linux, pushed to trunk. > > > The std::begin and std::end overloads for std::valarray are defined in > terms of std::addressof(v[0]) which is undefined for an empty valarray. > >

Re: *PING* [PATCH] PR fortran/69419 - ICE: tree check: expected array_type, have real_type in gfc_conv_array_initializer, at fortran/trans-array.c:5618

2021-11-05 Thread Mikael Morin
Le 04/11/2021 à 20:49, Harald Anlauf via Fortran a écrit : Let's see what others think. OK, thanks. Mikael

Re: [committed] libstdc++: Optimize std::tuple_element and std::tuple_size_v

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 Nov 2021 at 21:19, Patrick Palka wrote: > On Thu, Nov 4, 2021 at 2:34 PM Jonathan Wakely via Libstdc++ > wrote: > > > > Tested powerpc64le-linux, committed to trunk. > > > > > > This reduces the number of class template instantiations needed for code > > using tuples, by reusing

libstdc++: Make atomic::wait() const [PR102994]

2021-11-05 Thread Thomas Rodgers via Gcc-patches
From 360c094a0725bb0cc444115c0377db10e5e9ae1f Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Fri, 5 Nov 2021 14:30:24 -0700 Subject: [PATCH] libstdc++: Make atomic::wait() const [PR102994] This was an oversight in the original commit adding wait/notify to atomic. libstdc++-v3/ChangeLog:

Re: [PATCH 14/18] rs6000: Debug support

2021-11-05 Thread Segher Boessenkool
On Wed, Sep 01, 2021 at 11:13:50AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. > (def_builtin): Change debug formatting for easier parsing and > include more information. > (rs6000_init_builtins): Add dump of autogenerated

Re: [PATCH] PR fortran/102817 - [12 Regression] ICE in gfc_clear_shape, at fortran/expr.c:422

2021-11-05 Thread Mikael Morin
Le 01/11/2021 à 22:39, Harald Anlauf via Fortran a écrit : Dear Fortranners, a recent patch uncovered a latent issue with simplification of array-valued expressions where the resulting shape was not set from the referenced subobject. Once found, the fix looks obvious. Regtested on

Re: [PATCH] gcc: vx-common.h: fix test for VxWorks7

2021-11-05 Thread Rasmus Villemoes via Gcc-patches
On 05/11/2021 16.12, Olivier Hainque wrote: > > >> On 5 Nov 2021, at 15:12, Rasmus Villemoes wrote: > We happen to also have a few fixincludes hunks around. Some of > them have been there for years now and I thought would be nice to > propagate at some point. > > Do you use it? Sort of, kind

Re: [committed] libstdc++: Optimize std::tuple_element and std::tuple_size_v

2021-11-05 Thread Patrick Palka via Gcc-patches
On Thu, Nov 4, 2021 at 2:34 PM Jonathan Wakely via Libstdc++ wrote: > > Tested powerpc64le-linux, committed to trunk. > > > This reduces the number of class template instantiations needed for code > using tuples, by reusing _Nth_type in tuple_element and specializing > tuple_size_v for tuple,

[PATCH 0/2] incpath, Fortran: Fix memory leak in gfc_add_include_path

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
Hi! In order to fix this very minor leak, we need a knob to free all cpp_dirs that were added. This adds a free_cpp_dirs() to gcc/incpath and needs review from some global maintainer or maybe libcpp maintainer for this hunk. Bootstrapped and regtested on x86_64-unknown-linux without regressions.

[PATCH 2/2] Fortran: Fix memory leak in gfc_add_include_path [PR68800]

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: PR fortran/68800 * cpp.h (gfc_cpp_free_cpp_dirs): New declaration. * cpp.c (gfc_cpp_free_cpp_dirs): New definition. (gfc_cpp_add_include_path, gfc_cpp_add_include_path_after): Add comment. *

[PATCH 1/2] Add free_cpp_dirs()

2021-11-05 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer gcc/ChangeLog: * incpath.c (free_cpp_dirs): New function. * incpath.h (free_cpp_dirs): Ditto. --- This adds a helper to allow the fortran FE to free it's include dirs. Bootstrapped and regtested without new regressions on x86_64-unknown-linux. Ok

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe
Hi Jason, > On 5 Nov 2021, at 20:50, Jason Merrill via Gcc-patches > wrote: > > On 11/5/21 12:01, Iain Sandoe wrote: >> + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) >> + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) >> + && DECL_RAMP_FN (DECL_CONTEXT

Re: [pushed] testsuite, Darwin : Fix tsvc test build on Darwin.

2021-11-05 Thread Martin Liška
On 11/5/21 22:08, Iain Sandoe wrote: |Fixed as below.| Thank you Iain for the fix. Martin

[committed] Fortran: Add more documentation for mixed-language programming

2021-11-05 Thread Sandra Loosemore
I was recently pinged about PR35276. It's an old issue, but a couple of the concerns raised there haven't been fixed yet, so I've checked in this patch to fill in the gaps. -Sandra commit b8bf685ed44dba9bd4bbd600bc8bc2be0a2abb1b Author: Sandra Loosemore Date: Fri Nov 5 14:01:03 2021 -0700

[pushed] testsuite, Darwin : Fix tsvc test build on Darwin.

2021-11-05 Thread Iain Sandoe via Gcc-patches
Currently all the tsvc tests fail to build on Darwin because they assume that and memalign() are available. For Darwin, is sufficient to obtain the declarations for malloc and the port has posix_memalign () but not memalign. Fixed as below. tested on x86_64-darwin, pushed to master as

[pushed] Darwin : Make trampoline templates linker-visible.

2021-11-05 Thread Iain Sandoe via Gcc-patches
For aarch64, the alignment of the LTRAMPn symbols matters. Actually, the LTRAMPn symbols _are_ 8 byte aligned, but because they are Local, the linker doesn't know that this guarantee can be met. It assumes that they are not necessarily more aligned than the containing section (ld64 atoms strike

Re: [PATCH] Darwin, Arm64 : Initial support for the self-host driver.

2021-11-05 Thread Iain Sandoe
Hi Richard, > On 5 Nov 2021, at 17:39, Richard Earnshaw > wrote: > > On 05/11/2021 15:14, Iain Sandoe via Gcc-patches wrote: >> This allows people to host a c-family/fortran GCC cross-compiler on >> aarch64-apple-darwin (support for Ada will follow in a separate patch). >> At present, there is

[pushed] Darwin, crts: Fix a build warning.

2021-11-05 Thread Iain Sandoe via Gcc-patches
We have a shim crt for Darwin10 that implements functionality missing in libSystem. Provide this with a prototype to silence the warning about this. Tested on x86_64-darwin, pushed to master, thanks, Iain Signed-off-by: Iain Sandoe libgcc/ChangeLog: *

Re: [PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 12:01, Iain Sandoe wrote: + || (DECL_DECLARES_FUNCTION_P (DECL_CONTEXT (decl)) + && DECL_COROUTINE_P (DECL_CONTEXT (decl)) + && DECL_RAMP_FN (DECL_CONTEXT (decl)) + && LAMBDA_FUNCTION_P (DECL_RAMP_FN (DECL_CONTEXT

Re: [PATCH] Fix PR103028

2021-11-05 Thread Andreas Krebbel via Gcc-patches
On 11/5/21 20:34, Jeff Law wrote: > > > On 11/5/2021 4:19 AM, Andreas Krebbel via Gcc-patches wrote: >> This prevents find_cond_trap from being invoked after reload. It may >> generate compares which would require reloading. >> >> Bootstrapped and regression tested on s390x. >> >> Ok for

Re: [PATCH] Cleanup back_threader::find_path_to_names.

2021-11-05 Thread Aldy Hernandez via Gcc-patches
On Fri, Nov 5, 2021 at 9:06 PM Jeff Law wrote: > > > > On 11/5/2021 9:09 AM, Aldy Hernandez wrote: > > The main path discovery function was due for a cleanup. First, > > there's a nagging goto and second, my bitmap use was sloppy. Hopefully > > this makes the code easier for others to read. > >

Re: [PATCH 13/18] rs6000: Miscellaneous uses of rs6000_builtins_decl_x

2021-11-05 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:49AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use > rs6000_builtin_decls_x when appropriate. > (add_condition_to_bb): Likewise. > (rs6000_atomic_assign_expand_fenv): Likewise. > + tree

Re: [PATCH 12/18] rs6000: Update rs6000_builtin_decl

2021-11-05 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:48AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-call.c (rs6000_new_builtin_decl): New > function. One line, etc. > +static tree > +rs6000_new_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED) No ATTRIBUTE_UNUSED please.

Re: [PATCH] Cleanup back_threader::find_path_to_names.

2021-11-05 Thread Jeff Law via Gcc-patches
On 11/5/2021 9:09 AM, Aldy Hernandez wrote: The main path discovery function was due for a cleanup. First, there's a nagging goto and second, my bitmap use was sloppy. Hopefully this makes the code easier for others to read. Regstrapped on x86-64 Linux. I also made sure there were no

[RFC PATCH] Implement #pragma GCC noexpand

2021-11-05 Thread Florian Weimer via Gcc-patches
This can be used to avoid excessive __ mangling of identifiers merely to guard against accidental macro expansion. (Identifiers in the global scope or with external linkage may still need mangling.) In order to support -fdirectives-only without introducing new line change flags, #include is not

Re: [PATCH] Fortran: Missing error with IMPLICIT none (external) [PR100972]

2021-11-05 Thread Mikael Morin
Le 31/10/2021 à 18:25, Bernhard Reutner-Fischer via Fortran a écrit : As Gerhard Steinmetz noticed, gfc_match_implicit_none() had a notify_std that mentioned IMPORT instead of IMPLICIT. Fix that typo. IMPLICIT NONE (external) is supposed to require external procedures to be explicitly declared

Re: [PATCH,Fortran 1/1] Tweak locations around CAF simplify

2021-11-05 Thread Mikael Morin
Le 27/10/2021 à 23:29, Bernhard Reutner-Fischer via Fortran a écrit : From: Bernhard Reutner-Fischer addresses: FIXME: gfc_current_locus is wrong by using the locus of the current intrinsic. Regtests clean, ok for trunk? Hello, I’m not convinced that replacing a global variable by an other

Re: [PATCH] c++, dyninit: Optimize C++ dynamic initialization by constants into DECL_INITIAL adjustment [PR102876]

2021-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/21 13:06, Martin Sebor wrote: On 11/4/21 3:42 AM, Jakub Jelinek via Gcc-patches wrote: Hi! When users don't use constexpr everywhere in initialization of namespace scope non-comdat vars and the initializers aren't constant when FE is looking at them, the FE performs dynamic

Re: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants.

2021-11-05 Thread will schmidt via Gcc-patches
On Fri, 2021-11-05 at 00:11 -0400, Michael Meissner wrote: > Generate XXSPLTIDP for scalars on power10. > > This patch implements XXSPLTIDP support for SF, and DF scalar constants. > The previous patch added support for vector constants. This patch adds > the support for SFmode and DFmode scalar

Re: [PATCH] Fix PR103028

2021-11-05 Thread Jeff Law via Gcc-patches
On 11/5/2021 4:19 AM, Andreas Krebbel via Gcc-patches wrote: This prevents find_cond_trap from being invoked after reload. It may generate compares which would require reloading. Bootstrapped and regression tested on s390x. Ok for mainline? gcc/ChangeLog: PR

Re: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants

2021-11-05 Thread will schmidt via Gcc-patches
On Fri, 2021-11-05 at 00:10 -0400, Michael Meissner wrote: > Generate XXSPLTIDP for vectors on power10. > > This patch implements XXSPLTIDP support for all vector constants. The > XXSPLTIDP instruction is given a 32-bit immediate that is converted to a > vector > of two DFmode constants. The

Re: [PATCH 3/5] Add Power10 XXSPLTIW

2021-11-05 Thread will schmidt via Gcc-patches
On Fri, 2021-11-05 at 00:09 -0400, Michael Meissner wrote: > Generate XXSPLTIW on power10. > Hi, > This patch adds support to automatically generate the ISA 3.1 XXSPLTIW > instruction for V8HImode, V4SImode, and V4SFmode vectors. It does this by > adding support for vector constants that can

Re: [PATCH v4] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-05 Thread Jason Merrill via Gcc-patches
On 9/28/21 16:20, Marek Polacek wrote: On Thu, Sep 23, 2021 at 02:25:16PM -0400, Jason Merrill wrote: On 9/20/21 18:59, Marek Polacek via Gcc-patches wrote: + handle_ignored_attributes_option (); + /* ??? We can't free (args); here. */ Perhaps we want to copy strings in

Re: [PATCH,FORTRAN] Fix memory leak in finalization wrappers

2021-11-05 Thread Mikael Morin
Le 29/10/2021 à 01:58, Bernhard Reutner-Fischer via Fortran a écrit : On Wed, 27 Oct 2021 23:39:43 +0200 Bernhard Reutner-Fischer wrote: Ping [hmz. it's been a while, I'll rebase and retest this one. Ok if it passes?] Testing passed without any new regressions. Ok for trunk? thanks, On

Re: [committed] libstdc++: Support getentropy and arc4random in std::random_device

2021-11-05 Thread Jonathan Wakely via Gcc-patches
Oops sorry - this is NOT committed yet. I won't push it until I've tested it on at least one BSD, preferably OpenBSD so I can test parts of the new code. On Fri, 5 Nov 2021 at 18:21, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This adds additional "getentropy" and

[committed] libstdc++: Support getentropy and arc4random in std::random_device

2021-11-05 Thread Jonathan Wakely via Gcc-patches
This adds additional "getentropy" and "arc4random" tokens to std::random_device. The former is supported on Glibc and OpenBSD (and apparently wasm), and the latter is supported on various BSDs. I'm trying to test this on OpenBSD but I can't bootstrap GCC using the system clang.

[committed] libstdc++: Add [[unlikely]] attributes to std::random_device routines

2021-11-05 Thread Jonathan Wakely via Gcc-patches
Tested x86+64-linux, pushed to trunk. libstdc++-v3/ChangeLog: * src/c++11/random.cc (__x86_rdrand, __x86_rdseed): Add [[unlikely]] attribute. --- libstdc++-v3/src/c++11/random.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH,Fortran] Fortran: Delete unused decl in gfortran.h

2021-11-05 Thread Mikael Morin
Le 27/10/2021 à 23:11, Bernhard Reutner-Fischer via Fortran a écrit : Delete some more declarations without definitions and make some functions static. Bootstrapped and regtested on x86_64-unknown-linux without regressions. Ok for trunk? Ok. Thanks Mikael

Re: [PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 Nov 2021 at 13:20, Bill Schmidt wrote: > > On 11/5/21 7:44 AM, Jonathan Wakely wrote: > > On Thu, 4 Nov 2021 at 20:44, Bill Schmidt wrote: For posterity: This > was discussed briefly on IRC, and Segher approved with some simplifications > and a request to implement a fail/retry check.

Re: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function)

2021-11-05 Thread Michael Meissner via Gcc-patches
On Fri, Nov 05, 2021 at 12:01:43PM -0500, will schmidt wrote: > On Fri, 2021-11-05 at 00:04 -0400, Michael Meissner wrote: > > Add new constant data structure. > > > > This patch provides the data structure and function to convert a > > CONST_INT, CONST_DOUBLE, CONST_VECTOR, or VEC_DUPLICATE of a

[r12-4931 Regression] FAIL: libgomp.fortran/examples-4/simd-6.f90 -Os (test for excess errors) on Linux/x86_64

2021-11-05 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 33f1d038708a793a498076c8647165613ec90661 is the first bad commit commit 33f1d038708a793a498076c8647165613ec90661 Author: Richard Biener Date: Wed Oct 27 13:14:41 2021 +0200 First refactor of vect_analyze_loop caused FAIL: gfortran.dg/alloc_comp_assign_2.f90 -O3

Re: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ)

2021-11-05 Thread Michael Meissner via Gcc-patches
On Fri, Nov 05, 2021 at 12:52:51PM -0500, will schmidt wrote: > > diff --git a/gcc/config/rs6000/predicates.md > > b/gcc/config/rs6000/predicates.md > > index 956e42bc514..e0d1c718e9f 100644 > > --- a/gcc/config/rs6000/predicates.md > > +++ b/gcc/config/rs6000/predicates.md > > @@ -601,6 +601,14

*PING* [PATCH] PR fortran/102715 - [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8184

2021-11-05 Thread Harald Anlauf via Gcc-patches
Early ping. Am 31.10.21 um 22:35 schrieb Harald Anlauf via Fortran: Dear Fortranners, the fix for initialization of DT arrays caused an apparent regression for cases where inconsistent ranks were used in such an initialization. This caused either an ICE in subsequent uses of these arrays, or

Re: [PATCH 2/5] Add Power10 XXSPLTI* and LXVKQ instructions (LXVKQ)

2021-11-05 Thread will schmidt via Gcc-patches
On Fri, 2021-11-05 at 00:07 -0400, Michael Meissner wrote: > Add LXVKQ support. > > This patch adds support to generate the LXVKQ instruction to load specific > IEEE-128 floating point constants. > > Compared to the last time I submitted this patch, I modified it so that it > uses the bit

Re: [PATCH] Darwin, Arm64 : Initial support for the self-host driver.

2021-11-05 Thread Richard Earnshaw via Gcc-patches
On 05/11/2021 15:14, Iain Sandoe via Gcc-patches wrote: This allows people to host a c-family/fortran GCC cross-compiler on aarch64-apple-darwin (support for Ada will follow in a separate patch). At present, there is no special action needed for aarch64-darwin; this just pulls in generic

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-05 Thread Qing Zhao via Gcc-patches
> On Nov 5, 2021, at 11:17 AM, Jakub Jelinek wrote: > > On Fri, Nov 05, 2021 at 04:11:36PM +, Qing Zhao wrote: >> 3076 if (TREE_CODE (TREE_TYPE (lhs)) != BOOLEAN_TYPE >> 3077 && tree_fits_uhwi_p (var_size) >> 3078 && (init_type == AUTO_INIT_PATTERN >> 3079

Re: [PATCH] gcov-profile: Fix -fcompare-debug with -fprofile-generate [PR100520]

2021-11-05 Thread Jan Hubicka via Gcc-patches
> Hello. > > This strips .gk from aux_base_name in coverage.c. > Do you like the implementation of endswith, or do we have the functionality > somewhere? > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > PR

[PATCH] gcov-profile: Fix -fcompare-debug with -fprofile-generate [PR100520]

2021-11-05 Thread Martin Liška
Hello. This strips .gk from aux_base_name in coverage.c. Do you like the implementation of endswith, or do we have the functionality somewhere? Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR gcov-profile/100520

[COMMITTED] PR-tree-optimization/103093 - Remove def chain import assert from GORI.

2021-11-05 Thread Andrew MacLeod via Gcc-patches
As detailed in the PR, when the IL is changing between queries, the imports and def chains of an ssa-name may change,a nd when coparing with a newly created ssa-name, certain assumptions about presence/lack of presence between lists may no longer be true. This patch simply removes the

[COMMITTED] PR tree-optimization/102943 - Abstract ranger cache update list.

2021-11-05 Thread Andrew MacLeod via Gcc-patches
OK,removing the call to vec::contains() is clearly the right move. Rather than go with the extra bitmap to track whats in the vector, I have done a couple of things.   1 - Abstracted the update list into its own class, making it easier to change the underlying mechaism from a stack to a

[committed] hppa: Support TI mode and soft float on PA64

2021-11-05 Thread John David Anglin
Without TImode support on hppa64, it is necessary to disable building libgomp with fortran. Previously, we didn't support TImode because we need both DImode and TImode divmod routines from libgcc. The standard build only builds one of the two. This is nominally determined by

Re: [PATCH] c++, dyninit: Optimize C++ dynamic initialization by constants into DECL_INITIAL adjustment [PR102876]

2021-11-05 Thread Martin Sebor via Gcc-patches
On 11/4/21 3:42 AM, Jakub Jelinek via Gcc-patches wrote: Hi! When users don't use constexpr everywhere in initialization of namespace scope non-comdat vars and the initializers aren't constant when FE is looking at them, the FE performs dynamic initialization of those variables. But after

Re: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function)

2021-11-05 Thread will schmidt via Gcc-patches
On Fri, 2021-11-05 at 00:04 -0400, Michael Meissner wrote: > Add new constant data structure. > > This patch provides the data structure and function to convert a > CONST_INT, CONST_DOUBLE, CONST_VECTOR, or VEC_DUPLICATE of a constant) to > an array of bytes, half-words, words, and double words

[PATCH, v2, OpenMP 5.0] Implement relaxation of implicit map vs. existing device mappings (for mainline trunk)

2021-11-05 Thread Chung-Lin Tang
Hi Jakub, On 2021/6/24 11:55 PM, Jakub Jelinek wrote: On Fri, May 14, 2021 at 09:20:25PM +0800, Chung-Lin Tang wrote: diff --git a/gcc/gimplify.c b/gcc/gimplify.c index e790f08b23f..69c4a8e0a0a 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -10374,6 +10374,7 @@

Re: [PATCH] Darwin, Arm64 : Ada fixes for hosted tools.

2021-11-05 Thread Arnaud Charlet via Gcc-patches
> No, I just managed to delete it when adding the post-notes to the email > header ;-) … and then didn’t notice when git send-emailing it … OK! > Signed-off-by: Iain Sandoe > > gcc/ada/ChangeLog: should be gcc/ada/ > * gcc-interface/Make-lang.in: Use ios signal trampoline code >

Re: [PATCH] Darwin, Arm64 : Ada fixes for hosted tools.

2021-11-05 Thread Iain Sandoe
Hi Arno, > On 5 Nov 2021, at 16:36, Arnaud Charlet wrote: > >> This is host-only support (target support will come later). >> >> This will allow someone (with an existing Ada compiler on the >> platform - which can be provided by the experimental aarch64-darwin >> branch) - to build the host

Re: [PATCH 0/4] config: Allow a host to opt out of PCH.

2021-11-05 Thread Iain Sandoe
> On 5 Nov 2021, at 15:25, Jakub Jelinek wrote: > > On Fri, Nov 05, 2021 at 11:31:58AM +0100, Richard Biener wrote: >> On Fri, Nov 5, 2021 at 10:54 AM Jakub Jelinek wrote: >>> >>> On Fri, Nov 05, 2021 at 10:42:05AM +0100, Richard Biener via Gcc-patches >>> wrote: I had the impression

Re: [PATCH] Darwin, Arm64 : Ada fixes for hosted tools.

2021-11-05 Thread Arnaud Charlet via Gcc-patches
> This is host-only support (target support will come later). > > This will allow someone (with an existing Ada compiler on the > platform - which can be provided by the experimental aarch64-darwin > branch) - to build the host tools (gnatmake and friends) for a > non-native cross. > > The

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-05 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 05, 2021 at 04:11:36PM +, Qing Zhao wrote: > 3076 if (TREE_CODE (TREE_TYPE (lhs)) != BOOLEAN_TYPE > 3077 && tree_fits_uhwi_p (var_size) > 3078 && (init_type == AUTO_INIT_PATTERN > 3079 || !is_gimple_reg_type (var_type)) > 3080 &&

[PATCH] Darwin, Arm64 : Ada fixes for hosted tools.

2021-11-05 Thread Iain Sandoe via Gcc-patches
This is host-only support (target support will come later). This will allow someone (with an existing Ada compiler on the platform - which can be provided by the experimental aarch64-darwin branch) - to build the host tools (gnatmake and friends) for a non-native cross. The existing provisions

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-05 Thread Qing Zhao via Gcc-patches
Thanks all for the information. Based on the information so far, my understanding is that we cannot revert r12-979-g782e57f2c09 Since it’s for enabling YMM and ZMM registers to be used for by_pieces operations on X86. Let me know if I miss anything here. FYI. This issue was found during my

Re: GCC 11 backports

2021-11-05 Thread Martin Liška
On 8/23/21 10:54, Martin Liška wrote: On 8/16/21 13:13, Martin Liška wrote: I'm going to apply the following 3 tested patches. Martin One more patch I've just tested. Martin And one more backport. MartinFrom 64fbc25cb6983725fefe313bfedd3657df795d54 Mon Sep 17 00:00:00 2001 From: Martin

Re: [PATCH] libsanitizer: remove -pedantic option

2021-11-05 Thread Martin Liška
On 11/5/21 16:29, Jakub Jelinek wrote: On Fri, Nov 05, 2021 at 04:25:53PM +0100, Martin Liška wrote: On 11/5/21 16:22, H.J. Lu wrote: Should we add __extension__ here? I tried doing that but it didn't help me with the warning. Maybe I did something wrong? Works for me just fine say on:

[PATCH] coroutines, c++: Find lambda-ness from the ramp function [PR 96517].

2021-11-05 Thread Iain Sandoe via Gcc-patches
When we query is_capture_proxy(), and the scope of the var is one of the two coroutine helpers, we need to look for the scope information that pertains to the original function (represented by the ramp now). We can look up the ramp function from either helper (in practice, the only caller would

[PATCH] coroutines: Pass lvalues to user-defined operator new [PR 100772].

2021-11-05 Thread Iain Sandoe via Gcc-patches
The wording of the standard has been clarified to be explicit that the the parameters to any user-defined operator-new in the promise class should be lvalues. tested on x86_64 darwin, linux, OK for master and backports? thanks Iain Signed-off-by: Iain Sandoe PR c++/100772

[PATCH] coroutines: Handle initial awaiters with non-void returns [PR 100127].

2021-11-05 Thread Iain Sandoe via Gcc-patches
The way in which a C++20 coroutine is specified discards any value that might be returned from the initial or final await expressions. This PR ICE was caused by an initial await expression with an await_resume () returning a reference, the function rewrite code was not set up to expect this.

Re: [PATCH 1/7] ifcvt: Check if cmovs are needed.

2021-11-05 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > Hi Richard, > > after giving it a second thought, and seeing that most of the changes to > existing code are not strictly necessary anymore, I figured it could be > easier not changing the current control flow too much like in the > attached patch. > > The changes

Re: [PATCH] libsanitizer: remove -pedantic option

2021-11-05 Thread H.J. Lu via Gcc-patches
On Fri, Nov 5, 2021 at 8:25 AM Martin Liška wrote: > > On 11/5/21 16:22, H.J. Lu wrote: > > Should we add __extension__ here? > > I tried doing that but it didn't help me with the warning. > Maybe I did something wrong? [hjl@gnu-cfl-2 tmp]$ cat y.cc #include #define uptr uintptr_t # define

Re: [PATCH] libsanitizer: remove -pedantic option

2021-11-05 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 05, 2021 at 04:25:53PM +0100, Martin Liška wrote: > On 11/5/21 16:22, H.J. Lu wrote: > > Should we add __extension__ here? > > I tried doing that but it didn't help me with the warning. > Maybe I did something wrong? Works for me just fine say on: void foo () { int a = ({ int d =

Re: [PATCH] libsanitizer: remove -pedantic option

2021-11-05 Thread Martin Liška
On 11/5/21 16:22, H.J. Lu wrote: Should we add __extension__ here? I tried doing that but it didn't help me with the warning. Maybe I did something wrong? Cheers, Martin

Re: [PATCH 0/4] config: Allow a host to opt out of PCH.

2021-11-05 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 05, 2021 at 11:31:58AM +0100, Richard Biener wrote: > On Fri, Nov 5, 2021 at 10:54 AM Jakub Jelinek wrote: > > > > On Fri, Nov 05, 2021 at 10:42:05AM +0100, Richard Biener via Gcc-patches > > wrote: > > > I had the impression we have support for PCH file relocation to deal with > >

Re: [PATCH] libsanitizer: remove -pedantic option

2021-11-05 Thread H.J. Lu via Gcc-patches
On Fri, Nov 5, 2021 at 8:00 AM Martin Liška wrote: > > The code uses intentionally braced-groups within expressions: > > ({\ Should we add __extension__ here? >uptr pc;\ >asm("lea 0(%%rip), %0" : "=r"(pc)); \ >

[committed] hppa: Move PREFERRED_DEBUGGING_TYPE define in pa64-hpux.h to pa.h

2021-11-05 Thread John David Anglin
The D language build on hppa64 does not include pa64-hpux.h. It only includes pa.h. As a result PREFERRED_DEBUGGING_TYPE was not defined. This caused a build error when defaults.h was included. The include issue might affect other defines but so far I haven't noticed any problems. Tested

[PATCH] Darwin, Arm64 : Initial support for the self-host driver.

2021-11-05 Thread Iain Sandoe via Gcc-patches
This allows people to host a c-family/fortran GCC cross-compiler on aarch64-apple-darwin (support for Ada will follow in a separate patch). At present, there is no special action needed for aarch64-darwin; this just pulls in generic Darwin code. Tested on aarch64-darwin20, OK for master? thanks,

Re: [PATCH] gcc: vx-common.h: fix test for VxWorks7

2021-11-05 Thread Olivier Hainque via Gcc-patches
> On 5 Nov 2021, at 15:12, Rasmus Villemoes wrote: > >> Yes, I think so. The builds you do used to work before >> the change that introduced the ifdef, > > Well, apart from all the other fixups, some of which are not > upstreamable, that I also need to apply :) Sure. My comment was only

Re: [PATCH] AArch64: Fix PR103085

2021-11-05 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > The stack protector implementation hides symbols in a const unspec, which > means > movdi/movsi patterns must always support const on symbol operands and > explicitly > strip away the unspec. Do this for the recently added GOT alternatives. Add a > test to ensure

[PATCH] Cleanup back_threader::find_path_to_names.

2021-11-05 Thread Aldy Hernandez via Gcc-patches
The main path discovery function was due for a cleanup. First, there's a nagging goto and second, my bitmap use was sloppy. Hopefully this makes the code easier for others to read. Regstrapped on x86-64 Linux. I also made sure there were no difference in the number of threads with this patch.

  1   2   >