Re: [PATCH v3] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/2/21 15:06, Uecker, Martin wrote: Am Donnerstag, den 23.09.2021, 17:37 -0400 schrieb Jason Merrill: On 9/23/21 15:49, Uecker, Martin wrote: Am Mittwoch, den 22.09.2021, 17:18 -0400 schrieb Jason Merrill: On 9/5/21 15:14, Uecker, Martin wrote: Here is the third version of the patch.

Re: [PATCH, v2] c++: Implement C++23 P2334R1 - #elifdef/#elifndef

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 16:24, Jakub Jelinek wrote: On Tue, Oct 05, 2021 at 05:23:26PM +, Joseph Myers wrote: One is in the patch below, ignores that sentence and only implements it for -std=c++23/-std=gnu++23 like it is only implemented for -std=c23. Another option would be to implement it also in the

Re: [PATCH, v2] c++: Implement C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 18:24, Jakub Jelinek wrote: On Tue, Oct 05, 2021 at 05:24:09PM -0400, Jason Merrill wrote: That seems correct to me. If they have static initialization, they are initialized. Ok, I've included those tests in the patch now too. @@ -8736,14 +8765,14 @@

[PATCH, v5] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/1/21 11:07, Jakub Jelinek wrote: On Thu, Sep 30, 2021 at 03:01:49PM -0400, Jason Merrill wrote: After fixing the incomplete std::strong_ordering spaceship-synth8.C is now accepted, but I'm afraid I'm getting lost in this - clang++ rejects that testcase instead complaining that D has <=>

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-05 Thread Eric Gallager via Gcc-patches
On Tue, Oct 5, 2021 at 1:28 PM Luís Ferreira wrote: > > On Tue, 2021-10-05 at 09:00 -0600, Jeff Law wrote: > > > > > > On 10/4/2021 10:52 AM, Luís Ferreira wrote: > > > On Thu, 2021-09-23 at 09:50 -0600, Jeff Law wrote: > > > > > > > > On 9/23/2021 4:16 AM, ibuclaw--- via Gcc-patches wrote: > > >

Re: [PATCH] c++: odr-use argument to a function NTTP [PR53164]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 15:17, Patrick Palka wrote: On Mon, 4 Oct 2021, Patrick Palka wrote: When passing a function template as the argument to a function NTTP inside a template, we resolve it to the right specialization ahead of time via resolve_address_of_overloaded_function, though the call to

[PATCH v2] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-10-05 Thread H.J. Lu via Gcc-patches
On Tue, Oct 5, 2021 at 9:40 AM H.J. Lu wrote: > > On Tue, Oct 5, 2021 at 3:07 AM Richard Biener wrote: > > > > On Mon, 4 Oct 2021, H.J. Lu wrote: > > > > > commit adedd5c173388ae505470df152b9cb3947339566 > > > Author: Jakub Jelinek > > > Date: Tue May 3 13:37:25 2016 +0200 > > > > > > re

Re: [patch][middle-end/PR102359]Not add initialization for DECL_VALUE_EXPR variables with -ftrivial-auto-var-init

2021-10-05 Thread Qing Zhao via Gcc-patches
> On Oct 5, 2021, at 1:30 PM, Jason Merrill wrote: > >>> 'decl_had_value_expr_p' and check && !decl_had_value_expr_p here? >>> So sth like >> I can do this -:) I agree that the change will make the code simpler. >> However, my major concern with this change is: later when people look at >>

[PATCH] ctfc: Free CTF type and CTF variable objects in ctfc_delete_container ()

2021-10-05 Thread Indu Bhagat via Gcc-patches
Hello, This patch fixes an outstanding issue with memory cleanup in the CTF container. Earlier the two hash tables in the CTF container were not cleaned up in ctfc_delete_container (). With this patch, we first free up the CTF type and CTF variable entries in the hash_table slots, followed by

[PATCH, v2] c++: Implement C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions

2021-10-05 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 05, 2021 at 05:24:09PM -0400, Jason Merrill wrote: > That seems correct to me. If they have static initialization, they are > initialized. Ok, I've included those tests in the patch now too. > > @@ -8736,14 +8765,14 @@ potential_constant_expression_1 (tree t, > > tmp =

Go patch committed: Use nullptr in a couple of cases

2021-10-05 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Than McIntosh uses nullptr in a couple of cases to avoid errors in template matching with some stage1 compilers. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian patch f4da52d91658cf73eb95d3d8b4b0fd79c8b0ac23 diff --git a/gcc/go/gofrontend/MERGE

Re: [PATCH v3] libgcc: Add a backchain fallback to _Unwind_Backtrace() on PowerPC

2021-10-05 Thread Segher Boessenkool
On Tue, Oct 05, 2021 at 03:32:52PM -0300, Raphael Moreira Zinsly wrote: > Without dwarf2 unwind tables available _Unwind_Backtrace() is not > able to return the full backtrace. > This patch adds a fallback function on powerpc to get the backtrace > by doing a backchain, this code was originally at

Re: [PATCH] c++: Implement C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 08:39, Jakub Jelinek wrote: Hi! The following patch implements C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions. I think it is mostly straightforward, don't diagnose certain statements/declarations just because of their presence in

[PATCH, v2] c++: Implement C++23 P2334R1 - #elifdef/#elifndef

2021-10-05 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 05, 2021 at 05:23:26PM +, Joseph Myers wrote: > > One is in the patch below, ignores that sentence and only implements it > > for -std=c++23/-std=gnu++23 like it is only implemented for -std=c23. > > Another option would be to implement it also in the older GNU modes but > > not in

Re[2]: [PATCH] Fix check C99 TR1 support

2021-10-05 Thread mkh199740
Thank you, for your fast response. > There are some cross-compilation cases > where we can't link, and that's why we only > use AC_TRY_COMPILE. May you give me some examples of this cases?  I had some problems when tries to create toolchain with ulibc-ng and gcc11 for armv5.  The problem is

Re: [Patch] Fortran: Fix deprecate warning with parameter

2021-10-05 Thread Tobias Burnus
Hi Harald, On 05.10.21 21:10, Harald Anlauf wrote: Am 05.10.21 um 20:03 schrieb Tobias Burnus: Played around with the warning in the 'omp_lib' module (needs tweaking as for the current version, no warning is done). Turned out that already use omp_lib outputs a warning even when not used.

Re: [committed] d: gdc driver ignores -static-libstdc++ when automatically linking libstdc++ library

2021-10-05 Thread Iain Sandoe
Hi Iain, > On 5 Oct 2021, at 09:02, ibuc...@gdcproject.org wrote: > >> On 04/10/2021 18:48 Iain Sandoe wrote: >> >> For targets that don’t support HAVE_LD_STATIC_DYNAMIC it would be useful >> to push the option back out, so that they can use that to substitute a >> static version >> of the

[pushed] Darwin, D: Fix bootstrap when target does not support -Bstatic/dynamic.

2021-10-05 Thread Iain Sandoe via Gcc-patches
This fixes a bootstrap fail because saw_static_libcxx was unused for targets without support for -Bstatic/dynamic. The fix applied pushes the -static-libstdc++ back onto the command line, which allows a target to substitute a static version of the c++ standard library using specs. tested on

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/1/21 15:52, Nick Huang wrote: ...the subject line for the commit should be the first line of the commit message, followed by a blank line, followed by the description of the patch; without the subject line, git format-patch thought your whole description was the subject of the patch. oh,

Re: [PATCH] c++: odr-use argument to a function NTTP [PR53164]

2021-10-05 Thread Patrick Palka via Gcc-patches
On Mon, 4 Oct 2021, Patrick Palka wrote: > When passing a function template as the argument to a function NTTP > inside a template, we resolve it to the right specialization ahead of > time via resolve_address_of_overloaded_function, though the call to > mark_used within defers odr-using it until

Re: [Patch] Fortran: Fix deprecate warning with parameter

2021-10-05 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 05.10.21 um 20:03 schrieb Tobias Burnus: Played around with the warning in the 'omp_lib' module (needs tweaking as for the current version, no warning is done). Turned out that already   use omp_lib outputs a warning even when not used. that must have been a non-trivial

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/1/21 16:14, Marek Polacek wrote: On Fri, Oct 01, 2021 at 09:30:41AM -0400, Jason Merrill wrote: On 9/30/21 17:56, Marek Polacek wrote: On Thu, Sep 30, 2021 at 03:34:24PM -0400, Jason Merrill wrote: On 9/30/21 10:50, Marek Polacek wrote: This patch addresses one of my leftovers from GCC

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/1/21 13:29, Patrick Palka wrote: On Fri, 1 Oct 2021, Jason Merrill wrote: On 10/1/21 10:26, Patrick Palka wrote: On Fri, 1 Oct 2021, Jason Merrill wrote: On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with

Re: [PATCH] c++: Fix apply_identity_attributes [PR102548]

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 03:50, Jakub Jelinek wrote: Hi! The following testcase ICEs on x86_64-linux with -m32 due to a bug in apply_identity_attributes. The function is being smart and attempts not to duplicate the chain unnecessarily, if either there are no attributes that affect type identity or there is

Re: [PATCH RFA] vec: Fix --enable-gather-detailed-mem-stats

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 07:27, Richard Biener wrote: On Mon, Oct 4, 2021 at 8:28 PM Jason Merrill via Gcc-patches wrote: When r12-4038 introduced the global auto_vec save_opt_decoded_options, it broke compilers configured with --enable-gather-detailed-mem-stats, due to the memory descriptors getting

[PATCH v3] libgcc: Add a backchain fallback to _Unwind_Backtrace() on PowerPC

2021-10-05 Thread Raphael Moreira Zinsly via Gcc-patches
Without dwarf2 unwind tables available _Unwind_Backtrace() is not able to return the full backtrace. This patch adds a fallback function on powerpc to get the backtrace by doing a backchain, this code was originally at glibc. libgcc/ChangeLog: * config/rs6000/linux-unwind.h (struct

Re: [patch][middle-end/PR102359]Not add initialization for DECL_VALUE_EXPR variables with -ftrivial-auto-var-init

2021-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/21 10:32, Qing Zhao wrote: On Oct 5, 2021, at 3:19 AM, Richard Biener wrote: On Tue, 5 Oct 2021, Qing Zhao wrote: Hi, This is the patch to fix this issue based on our discussion. I have tested it on aarch64 with bootstrap and regtests. X86 bootstrap was done, regtests is

[Patch] Fortran: Fix deprecate warning with parameter

2021-10-05 Thread Tobias Burnus
Played around with the warning in the 'omp_lib' module (needs tweaking as for the current version, no warning is done). Turned out that already use omp_lib outputs a warning even when not used. That's fixed by the attached patch - even if the location is not perfect. OK for GCC 12 + GCC 11

Re: [PATCH] d-demangle: properly skip anonymous symbols

2021-10-05 Thread Luís Ferreira
On Tue, 2021-10-05 at 18:13 +0100, Luís Ferreira wrote: > This patch fixes a bug on the D demangler by parsing and skip anonymous > symbols > correctly, according the ABI specification. Furthermore, it also > includes tests > to cover anonymous symbols. > > The spec specifies [1] that a symbol

[PATCH] Transition nvptx backend to STORE_FLAG_VALUE = 1

2021-10-05 Thread Roger Sayle
This patch to the nvptx backend changes the backend's STORE_FLAG_VALUE from -1 to 1, by using BImode predicates and selp instructions, instead of set instructions (almost always followed by integer negation). Historically, it was reasonable (through rare) for backends to use -1 for representing

Re: [PATCH] d-demangle: properly skip anonymous symbols

2021-10-05 Thread Luís Ferreira
On Tue, 2021-10-05 at 18:13 +0100, Luís Ferreira wrote: > This patch fixes a bug on the D demangler by parsing and skip > anonymous symbols > correctly, according the ABI specification. Furthermore, it also > includes tests > to cover anonymous symbols. > > The spec specifies [1] that a symbol

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-05 Thread Luís Ferreira
On Tue, 2021-10-05 at 09:00 -0600, Jeff Law wrote: > > > On 10/4/2021 10:52 AM, Luís Ferreira wrote: > > On Thu, 2021-09-23 at 09:50 -0600, Jeff Law wrote: > > > > > > On 9/23/2021 4:16 AM, ibuclaw--- via Gcc-patches wrote: > > > > > On 22/09/2021 03:10 Luís Ferreira > > > > > wrote: > > > > >

Re: [PATCH] c++: Implement C++23 P2334R1 - #elifdef/#elifndef

2021-10-05 Thread Joseph Myers
On Tue, 5 Oct 2021, Jakub Jelinek via Gcc-patches wrote: > One is in the patch below, ignores that sentence and only implements it > for -std=c++23/-std=gnu++23 like it is only implemented for -std=c23. > Another option would be to implement it also in the older GNU modes but > not in the C/CXX

[wwwdocs] Update cxx-status with October 2021 WG21 plenary

2021-10-05 Thread Marek Polacek via Gcc-patches
Pushed. Jakub already added the feature test macros. commit 78f03a4a633950743a416f5b9e7f721db7892090 Author: Marek Polacek Date: Tue Oct 5 12:57:19 2021 -0400 cxx-status: Add papers from the October 2021 WG21 plenary diff --git a/htdocs/projects/cxx-status.html

[PATCH] d-demangle: properly skip anonymous symbols

2021-10-05 Thread Luís Ferreira
This patch fixes a bug on the D demangler by parsing and skip anonymous symbols correctly, according the ABI specification. Furthermore, it also includes tests to cover anonymous symbols. The spec specifies [1] that a symbol name can be anonymous and multiple anonymous symbols are allowed. [1]:

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-10-05 Thread Andrew MacLeod via Gcc-patches
On 9/28/21 7:50 AM, Richard Biener wrote: On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: Hello. The patch extends the loop unswitching pass so that gswitch statements are supported. The pass now uses ranger which marks switch edges that are known to be unreachable in a versioned loop.

Re: [PATCH] Improve integer bit test on atomic builtin return

2021-10-05 Thread H.J. Lu via Gcc-patches
On Tue, Oct 5, 2021 at 3:07 AM Richard Biener wrote: > > On Mon, 4 Oct 2021, H.J. Lu wrote: > > > commit adedd5c173388ae505470df152b9cb3947339566 > > Author: Jakub Jelinek > > Date: Tue May 3 13:37:25 2016 +0200 > > > > re PR target/49244 (__sync or __atomic builtins will not emit 'lock >

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 5, 2021 at 6:08 PM Jeff Law wrote: > OK. I think there may still be some concern if the latch is marked as a > joiner.I think we should always reject those before the loop optimizers > run as the joiner's clone would introduce a second latch. I think that can > be handled

Re: *PING* [PATCH] libiberty: allow comments in option file

2021-10-05 Thread Hans-Peter Nilsson
On Sat, 25 Sep 2021, Hu Jialun wrote: > Hello, > > Sorry for bumping it again but I guess it was getting overlooked. > > I am very junior with mailing list open source contributions so please feel > free to point out if I have inadvertantly done something in an incorrect way. > > The archive of

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 7:33 AM, Aldy Hernandez wrote: OK? BTW Jeff, this fixes all the regressions you mention except: 1. pr68911.c The path not being threaded here is 7->10->11->12. It crosses loops multiple times, so I believe the restriction code is correct. 7, 10, 12 are in loop1. 11 is in

[i386] Fix couple of issues in large PIC model on x86-64/VxWorks

2021-10-05 Thread Eric Botcazou via Gcc-patches
Hi, the first issue is that the !gotoff_operand path of legitimize_pic_address in large PIC model does not make use of REG when it is available, which breaks for thunks because new pseudo-registers can no longer be created. And the second issue is that the system compiler (LLVM) generates

[committed] libstdc++: Ensure std::span and std::string_view are trivially copyable (P2251R1)

2021-10-05 Thread Jonathan Wakely via Gcc-patches
The recently approved P2251R1 paper requires these types to be trivially copyable. They always have been in libstdc++, but add tests to check it. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc: New test. *

Re: [patch][middle-end/PR102359]Not add initialization for DECL_VALUE_EXPR variables with -ftrivial-auto-var-init

2021-10-05 Thread Qing Zhao via Gcc-patches
This is the updated patch, I will push it after done with testing. Let me know if you see any issue. Thanks. Qing. >From 1f07c20ecdc9a015369c8bb472ebbd3bcaabdf17 Mon Sep 17 00:00:00 2001 From: qing zhao Date: Tue, 5 Oct 2021 08:10:02 -0700 Subject: [PATCH]

Re: [PATCH] middle-end/102587 - avoid auto-init for VLA vectors

2021-10-05 Thread Qing Zhao via Gcc-patches
> On Oct 5, 2021, at 1:25 AM, Richard Biener wrote: > > On Mon, 4 Oct 2021, Qing Zhao wrote: > >> >> >>> On Oct 4, 2021, at 12:19 PM, Richard Biener wrote: >>> >>> On October 4, 2021 7:00:10 PM GMT+02:00, Qing Zhao >>> wrote: I have several questions on this fix: 1. This

[committed] Fix s390 test to have pointer type for computed goto

2021-10-05 Thread Jeff Law via Gcc-patches
More minor fallout from Andrew's work. Committed to the trunk. Jeff commit f9e6f20f280daf74763cf3fe21f3c211d3d04620 Author: Jeff Law Date: Tue Oct 5 11:15:02 2021 -0400 Fix s390 test to have pointer type for computed goto gcc/testsuite * gcc.target/s390/pr80725.c:

Re: [PATCH] c++: Implement C++23 P2334R1 - #elifdef/#elifndef

2021-10-05 Thread Marek Polacek via Gcc-patches
On Tue, Oct 05, 2021 at 10:35:12AM +0200, Jakub Jelinek wrote: > Hi! > > This patch implements C++23 P2334R1, which is easy because Joseph has done > all the hard work for C2X already. > Unlike the C N2645 paper, the C++ P2334R1 contains one important addition > (but not in the normative text): >

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 7:33 AM, Aldy Hernandez wrote: On Mon, Oct 4, 2021 at 6:29 PM Michael Matz wrote: Hello, On Mon, 4 Oct 2021, Jeff Law wrote: And just in case it got lost. Here's the analysis on 960218-1 on visium: We've got this going into ethread: int f (int x) { int D.1420; int

Re: [committed] libstdc++: Support printing volatile pointers (P1147R1)

2021-10-05 Thread Jonathan Wakely via Gcc-patches
On Tue, 5 Oct 2021 at 10:29, Daniel Krügler wrote: > > Am Di., 5. Okt. 2021 um 10:55 Uhr schrieb Jonathan Wakely via > Libstdc++ : > > > > To avoid needing to export a new symbol from the library (for now) the > > new member function uses __attribute__((always_inline)). > > > >

Re: PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 9:03 AM, Jan-Benedict Glaw wrote: Hi Jeff, On Tue, 2021-10-05 08:53:00 -0600, Jeff Law wrote: On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote: On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw wrote: gcc/ChangeLog: * common/config/avr/avr-common.c

Re: PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jan-Benedict Glaw
Hi Jeff, On Tue, 2021-10-05 08:53:00 -0600, Jeff Law wrote: > On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote: > > On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw > > wrote: > > > gcc/ChangeLog: > > > > > > * common/config/avr/avr-common.c (avr_handle_option): Mark > > > argument as

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/4/2021 10:52 AM, Luís Ferreira wrote: On Thu, 2021-09-23 at 09:50 -0600, Jeff Law wrote: On 9/23/2021 4:16 AM, ibuclaw--- via Gcc-patches wrote: On 22/09/2021 03:10 Luís Ferreira wrote: Currently a stack/heap overflow may happen if a crafted mangle is maliciously used to cause

[committed] libstdc++: Add test for std::cmp_greater

2021-10-05 Thread Jonathan Wakely via Gcc-patches
This was omitted from the commit that added these comparisons. libstdc++-v3/ChangeLog: * testsuite/20_util/integer_comparisons/greater.cc: New test. Tested powerpc64le-linux. Committed to trunk. commit 824e0855732c601e0866d0e8a9264a85f758213e Author: Jonathan Wakely Date: Tue Oct 5

[committed] libstdc++: Simplify constraints for std::any construction

2021-10-05 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/utility.h (__is_in_place_type_v): Define variable template to detect in_place_type_t specializations. (__is_in_place_type): Replace class template with alias template using __is_in_place_type_v. * include/std/any

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 5:22 AM, Richard Biener wrote: On Mon, Oct 4, 2021 at 6:29 PM Michael Matz wrote: Hello, On Mon, 4 Oct 2021, Jeff Law wrote: And just in case it got lost. Here's the analysis on 960218-1 on visium: We've got this going into ethread: int f (int x) { int D.1420; int

Re: PING: [LM32] Fix '"LINK_GCC_C_SEQUENCE_SPEC" redefined' warning

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote: Hi, On Thu, 2021-09-30 21:34:51 +0200, Jan-Benedict Glaw wrote: gcc/ChangeLog: * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Undefine before redefinition. diff --git a/gcc/config/lm32/uclinux-elf.h

Re: PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jeff Law via Gcc-patches
On 10/5/2021 8:46 AM, Jan-Benedict Glaw wrote: Hi, On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw wrote: gcc/ChangeLog: * common/config/avr/avr-common.c (avr_handle_option): Mark argument as ATTRIBUTE_UNUSED. diff --git a/gcc/common/config/avr/avr-common.c

PING: [LM32] Fix '"LINK_GCC_C_SEQUENCE_SPEC" redefined' warning

2021-10-05 Thread Jan-Benedict Glaw
Hi, On Thu, 2021-09-30 21:34:51 +0200, Jan-Benedict Glaw wrote: > gcc/ChangeLog: > > * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): > Undefine before redefinition. > > diff --git a/gcc/config/lm32/uclinux-elf.h b/gcc/config/lm32/uclinux-elf.h > index

PING: [AVR] Fix unused argument warning

2021-10-05 Thread Jan-Benedict Glaw
Hi, On Thu, 2021-09-30 21:27:23 +0200, Jan-Benedict Glaw wrote: > gcc/ChangeLog: > > * common/config/avr/avr-common.c (avr_handle_option): Mark > argument as ATTRIBUTE_UNUSED. > > diff --git a/gcc/common/config/avr/avr-common.c > b/gcc/common/config/avr/avr-common.c > index

[PATCH] Fix check C99 TR1 support

2021-10-05 Thread Petr Mikhalicin
From: Petr Mikhalicin Autotools tests for libstdc++ check only declaration of required symbols, but some symbols may not be defined. This patch adds trying to link "C99 TR1" tests, not only compile them. Signed-off-by: Petr Mikhalicin --- libstdc++-v3/acinclude.m4 | 16 1

Re: [patch][middle-end/PR102359]Not add initialization for DECL_VALUE_EXPR variables with -ftrivial-auto-var-init

2021-10-05 Thread Qing Zhao via Gcc-patches
> On Oct 5, 2021, at 3:19 AM, Richard Biener wrote: > > On Tue, 5 Oct 2021, Qing Zhao wrote: > >> Hi, >> >> This is the patch to fix this issue based on our discussion. >> >> I have tested it on aarch64 with bootstrap and regtests. X86 bootstrap was >> done, regtests is ongoing. >> >>

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Tuesday, October 5, 2021 2:52 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de > Subject: Re: [PATCH]middle-end convert negate + right shift into compare > greater. > > > > On 05/10/2021 14:49, Tamar

Re: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Richard Earnshaw via Gcc-patches
On 05/10/2021 14:49, Tamar Christina wrote: -Original Message- From: Richard Earnshaw Sent: Tuesday, October 5, 2021 2:34 PM To: Tamar Christina ; gcc-patches@gcc.gnu.org Cc: nd ; rguent...@suse.de Subject: Re: [PATCH]middle-end convert negate + right shift into compare greater.

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Tuesday, October 5, 2021 2:34 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de > Subject: Re: [PATCH]middle-end convert negate + right shift into compare > greater. > > > > On 05/10/2021 14:30, Tamar

[PATCH] loop: Fix profile updates after unrolling [PR102385]

2021-10-05 Thread Richard Sandiford via Gcc-patches
In g:62acc72a957b5614 I'd stopped the unroller from using an epilogue loop in cases where the iteration count was known to be a multiple of the unroll factor. The epilogue and non-epilogue cases still shared this (preexisting) code to update the edge frequencies: basic_block exit_bb =

Re: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Richard Earnshaw via Gcc-patches
On 05/10/2021 14:30, Tamar Christina wrote: -Original Message- From: Richard Earnshaw Sent: Tuesday, October 5, 2021 1:56 PM To: Tamar Christina ; gcc-patches@gcc.gnu.org Cc: nd ; rguent...@suse.de Subject: Re: [PATCH]middle-end convert negate + right shift into compare greater.

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Aldy Hernandez via Gcc-patches
On Mon, Oct 4, 2021 at 6:29 PM Michael Matz wrote: > > Hello, > > On Mon, 4 Oct 2021, Jeff Law wrote: > > > And just in case it got lost. Here's the analysis on 960218-1 on visium: > > > > We've got this going into ethread: > > > > int f (int x) > > { > > int D.1420; > > int a; > > > > ;;

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Tuesday, October 5, 2021 1:56 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; rguent...@suse.de > Subject: Re: [PATCH]middle-end convert negate + right shift into compare > greater. > > > > On 05/10/2021 13:50, Tamar

Re: [PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Richard Earnshaw via Gcc-patches
On 05/10/2021 13:50, Tamar Christina via Gcc-patches wrote: Hi All, This turns an inversion of the sign bit + arithmetic right shift into a comparison with 0. i.e. void fun1(int32_t *x, int n) { for (int i = 0; i < (n & -16); i++) x[i] = (-x[i]) >> 31; } Notwithstanding that I

RE: [PATCH 5/7]middle-end Convert bitclear + cmp #0 into cm

2021-10-05 Thread Tamar Christina via Gcc-patches
Hi All, Here's a new version of the patch handling both scalar and vector modes and non-uniform constant vectors. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no regressions. In order to not break IVopts and CSE I have added a requirement for the scalar version to

[PATCH] Allow more kinds of invariant addresses in GIMPLE FE

2021-10-05 Thread Richard Biener via Gcc-patches
The gimple FE is too restrictive in what it accepts as literals, the following makes it also accept [10] for example. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2021-10-05 Richard Biener PR c/102605 gcc/c/ * gimple-parser.c

[PATCH] More consistently dump GIMPLE FE consumable stmts

2021-10-05 Thread Richard Biener via Gcc-patches
The following makes more stmts consumable with the GIMPLE FE when dumping with -gimple. In particular addresses in GIMPLE operand position require wrapping with _Literal. The TDF_ flag space is now exhausted and I've removed overlaps and re-ordered things as to how it is supposed to work.

[PATCH]middle-end convert negate + right shift into compare greater.

2021-10-05 Thread Tamar Christina via Gcc-patches
Hi All, This turns an inversion of the sign bit + arithmetic right shift into a comparison with 0. i.e. void fun1(int32_t *x, int n) { for (int i = 0; i < (n & -16); i++) x[i] = (-x[i]) >> 31; } now generates: .L3: ldr q0, [x0] cmgtv0.4s, v0.4s, #0

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Michael Matz via Gcc-patches
Hello, On Tue, 5 Oct 2021, Richard Biener wrote: > > First notice that this doesn't have an empty latch block to start with > > (in fact, there is no separate latch block at all), so the loop > > optimizers haven't been initialized for simple latches at this point. > > Still, I would say

[PATCH] c++: Implement C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions

2021-10-05 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements C++23 P2242R3 - Non-literal variables (and labels and gotos) in constexpr functions. I think it is mostly straightforward, don't diagnose certain statements/declarations just because of their presence in constexpr/consteval functions, but (except for the

[committed] gfortran.dg/gomp/pr43711.f90: Change dg-* for XFAIL->PASS

2021-10-05 Thread Tobias Burnus
Adapt testcase to better catch the current message and expected follow-up messages + use the proper dg-*. — Result: XFAIL changed to PASS. Committed as r12-4185. Probably some other testcases could be checked as well. Maybe we also find some real & unfixed bugs that way. Tobias

Re: [PATCH 3/N] Come up with casm global state.

2021-10-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 4, 2021 at 1:13 PM Martin Liška wrote: > > On 9/22/21 11:59, Richard Biener wrote: > > On Thu, Sep 16, 2021 at 3:12 PM Martin Liška wrote: > >> > >> This patch comes up with asm_out_state and a new global variable casm. > >> > >> Tested on all cross compilers. > >> Patch can

Re: [gimple-isel] Remove redundant if condition

2021-10-05 Thread Richard Biener via Gcc-patches
On Tue, Oct 5, 2021 at 9:11 AM Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > In gimple_expand_vec_cond_expr: > > icode = get_vcond_icode (mode, cmp_op_mode, unsignedp); > if (icode == CODE_FOR_nothing) > { > if (tcode == LT_EXPR > && op0a == op0) > { >

Re: [PATCH RFA] vec: Fix --enable-gather-detailed-mem-stats

2021-10-05 Thread Richard Biener via Gcc-patches
On Tue, Oct 5, 2021 at 1:27 PM Richard Biener wrote: > > On Mon, Oct 4, 2021 at 8:28 PM Jason Merrill via Gcc-patches > wrote: > > > > When r12-4038 introduced the global auto_vec save_opt_decoded_options, > > it broke compilers configured with --enable-gather-detailed-mem-stats, > > due to the

Re: [PATCH RFA] vec: Fix --enable-gather-detailed-mem-stats

2021-10-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 4, 2021 at 8:28 PM Jason Merrill via Gcc-patches wrote: > > When r12-4038 introduced the global auto_vec save_opt_decoded_options, > it broke compilers configured with --enable-gather-detailed-mem-stats, > due to the memory descriptors getting discarded before the auto_vec was >

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 4, 2021 at 6:29 PM Michael Matz wrote: > > Hello, > > On Mon, 4 Oct 2021, Jeff Law wrote: > > > And just in case it got lost. Here's the analysis on 960218-1 on visium: > > > > We've got this going into ethread: > > > > int f (int x) > > { > > int D.1420; > > int a; > > > > ;;

[PATCH] Make flow of option processing more readily visible

2021-10-05 Thread Richard Biener via Gcc-patches
This moves calls to various option processing stages to one place, toplev::main. Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu. 2021-10-05 Richard Biener * toplev.c (no_backend): Remove global var. (process_options): Pass in no_backend, move post_options

[Aarch64] Do not define DONT_USE_BUILTIN_SETJMP

2021-10-05 Thread Eric Botcazou via Gcc-patches
Hi, we have been using an Ada compiler for the Aarch64 architecture configured with SJLJ exceptions as for the other architectures for some time, and have not run into any problems up to now so the setting looks obsolete. OK for the mainline? 2021-10-05 Eric Botcazou *

[PATCH] Amend function names with UID when dumping with TDF_UID

2021-10-05 Thread Richard Biener via Gcc-patches
The following makes sure to amend more function names with the associated DECL_UID when dumping with TDF_UID, in particular function names printed as part of calls and in the function header. That allows one to more easily follow the call flow of PR102528 where coroutines cause three clones of the

Re: [PATCH] Improve integer bit test on atomic builtin return

2021-10-05 Thread Richard Biener via Gcc-patches
On Mon, 4 Oct 2021, H.J. Lu wrote: > commit adedd5c173388ae505470df152b9cb3947339566 > Author: Jakub Jelinek > Date: Tue May 3 13:37:25 2016 +0200 > > re PR target/49244 (__sync or __atomic builtins will not emit 'lock > bts/btr/btc') > > optimized bit test on atomic builtin return with

Re: [PATCH] gcov: make profile merging smarter

2021-10-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 4, 2021 at 1:32 PM Martin Liška wrote: > > On 10/4/21 13:16, Richard Biener wrote: > > I meant in merge_one_data do not check ->stamp or ->checksum but instead > > rely > > on the counter merging code to detect mismatches (there's read_mismatch and > > read_error). There's multiple

Re: [committed] libstdc++: Support printing volatile pointers (P1147R1)

2021-10-05 Thread Daniel Krügler via Gcc-patches
Am Di., 5. Okt. 2021 um 10:55 Uhr schrieb Jonathan Wakely via Libstdc++ : > > To avoid needing to export a new symbol from the library (for now) the > new member function uses __attribute__((always_inline)). > > libstdc++-v3/ChangeLog: > > * include/std/ostream (operator<<(const volatile

[committed] libstdc++: Fix testcase for newly-implemented C++20 semantics [PR102535]

2021-10-05 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR c++/102535 * testsuite/20_util/is_trivially_constructible/value.cc: Adjust expected value for C++20. Tested powerpc64le-linux. Committed to trunk. commit 7646847df71e57edca5ec5b8c3c3dc4550dcb49d Author: Jonathan Wakely Date: Tue Oct 5

[committed] libstdc++: Add noexcept to some std::function internals

2021-10-05 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/std_function.h (_Any_data::_M_access): Add noexcept. (_Function_base::_Base_manager::_M_get_pointer): Likewise. (_Function_base::_Base_manager::_M_not_empty_function): Likewise. Tested powerpc64le-linux. Committed to

[committed] libstdc++: Support printing volatile pointers (P1147R1)

2021-10-05 Thread Jonathan Wakely via Gcc-patches
To avoid needing to export a new symbol from the library (for now) the new member function uses __attribute__((always_inline)). libstdc++-v3/ChangeLog: * include/std/ostream (operator<<(const volatile void*)): Add new overload, as per P1147R1. *

[committed] libstdc++: Update __cpp_lib_adaptor_iterator_pair_constructor value

2021-10-05 Thread Jonathan Wakely via Gcc-patches
On 01/10/21 20:43 +0100, Jonathan Wakely wrote: This adds a feature that was recently added to the C++23 working draft. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_queue.h (__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as

[Ada] Forbids use of Compile_Time_(Error|Warning) as configuration pragma

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
Before this commit, in case these pragmas were used inside adc file, gnat1 would fail with a `constraint_error` as it tries to get the context of the pragma. This commit induces a regression on dubious uses of these pragmas as configuration pragmas in ads/adb files. Review documentation on

Re: [PATCH] middle-end/102587 - avoid auto-init for VLA vectors

2021-10-05 Thread Richard Biener via Gcc-patches
On Tue, 5 Oct 2021, Richard Sandiford wrote: > Richard Biener via Gcc-patches writes: > > On Mon, 4 Oct 2021, Qing Zhao wrote: > > > >> > >> > >> > On Oct 4, 2021, at 12:19 PM, Richard Biener wrote: > >> > > >> > On October 4, 2021 7:00:10 PM GMT+02:00, Qing Zhao > >> > wrote: > >> >> I

[PATCH] c++: Implement C++23 P2334R1 - #elifdef/#elifndef

2021-10-05 Thread Jakub Jelinek via Gcc-patches
Hi! This patch implements C++23 P2334R1, which is easy because Joseph has done all the hard work for C2X already. Unlike the C N2645 paper, the C++ P2334R1 contains one important addition (but not in the normative text): "While this is a new preprocessor feature and cannot be treated as a defect

Re: [PATCH] middle-end/102587 - avoid auto-init for VLA vectors

2021-10-05 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Mon, 4 Oct 2021, Qing Zhao wrote: > >> >> >> > On Oct 4, 2021, at 12:19 PM, Richard Biener wrote: >> > >> > On October 4, 2021 7:00:10 PM GMT+02:00, Qing Zhao >> > wrote: >> >> I have several questions on this fix: >> >> >> >> 1. This fix avoided

[Ada] Do not unconditionally inline expression functions with -gnatd.8

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
This is necessary when expression functions are really too large. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.c (Subprogram_Body_to_gnu): Do not set the DECL_DISREGARD_INLINE_LIMITS flag if -gnatd.8 is specified.diff --git

[Ada] Add case to consider ENODEV a "file not found error"

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
Starting with VxWorks 21.03, a call to fopen() can now set errno to ENODEV if a prefix of the path does not match any known device. This led the runtime to raise the wrong exception type when trying to a file for which the parent directory did not exist and caused the acats testsuite to fail.

[Ada] Fix latent bug in set_end_locus_from_node

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
Avoid calling End_Label on the Empty node. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.c (set_end_locus_from_node): Check that Handled_Statement_Sequence is not Empty before calling End_Label, because the Empty node has no End_Label,

[Ada] introduce stack scrub (strub) feature

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
This is the GNAT part of the patch that adds the strub attribute for function and variable types, command-line options, passes and adjustments to implement it, documentation, and tests. Besides documentation, the bulk of the patch adds strub(callable) to subprograms that the compiler may call

[Ada] Mark private component renaming as coming from source

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
This marks the local renaming generated for private components of protected types as coming from source, so that the components are displayed when the 'info locals' command is used in GDB. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch9.adb

[Ada] Include errno.h in QNX specific part of the signal handling

2021-10-05 Thread Pierre-Marie de Rodat via Gcc-patches
To get access to the errno variable, we need to include errno.h. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * init.c (QNX): Add #include errno.h.diff --git a/gcc/ada/init.c b/gcc/ada/init.c --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -2551,6 +2551,7 @@

  1   2   >