[pushed] c++: constexpr, empty base after non-empty [PR106369]

2022-07-30 Thread Jason Merrill via Gcc-patches
Here the CONSTRUCTOR we were providing for D{} had an entry for the B base subobject at offset 0 following the entry for the C base, causing output_constructor_regular_field to ICE due to going backwards. It might be nice for that function to be more tolerant of empty fields, but it also seems rea

Re: [PATCH] tree-optimization/106365 - DSE of LEN_STORE and MASK_STORE

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/21/2022 3:05 AM, Richard Biener via Gcc-patches wrote: The following enhances DSE to handle LEN_STORE (optimally) and MASK_STORE (conservatively). Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Kewen is testing on powerpc. Handling MASK_STORE_LANES in a similar way to MA

Re: [PATCH] c: Fix location for _Pragma tokens [PR97498]

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/17/2022 9:24 AM, Lewis Hyatt wrote: On Sat, Jul 9, 2022 at 11:59 PM Jeff Law via Gcc-patches wrote: On 7/9/2022 2:52 PM, Lewis Hyatt via Gcc-patches wrote: Hello- PR97498 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97498) is another PR related to the fact that imprecise locations

Re: [PATCH] PR bootstrap/106472: Add libgo depends on libbacktrace to Makefile.def

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Sat, Jul 30, 2022 at 2:38 PM Roger Sayle wrote: > > > This patch fixes PR bootstrap/106472 by adding a missing dependency > to Makefile.def to allow make bootstrap when configured using > "--enable-languages=go" (and not using make with multiple threads). > > Tested on x86-64-pc-linux-gnu. Ok

Re: [PATCH 1/3] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-07-30 Thread Tom Honermann via Gcc-patches
On 7/27/22 7:20 PM, Joseph Myers wrote: On Mon, 25 Jul 2022, Tom Honermann via Gcc-patches wrote: diff --git a/gcc/ginclude/stdatomic.h b/gcc/ginclude/stdatomic.h index bfcfdf664c7..75ed7965689 100644 --- a/gcc/ginclude/stdatomic.h +++ b/gcc/ginclude/stdatomic.h @@ -49,6 +49,10 @@ typedef _Atom

Re: [PATCH 1/1] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-07-30 Thread Tom Honermann via Gcc-patches
On 7/27/22 7:09 PM, Joseph Myers wrote: On Sun, 24 Jul 2022, Tom Honermann via Gcc-patches wrote: Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option be enabled

[Ada PATCH] Update configure to check for a recent gnat Ada compiler.

2022-07-30 Thread Roger Sayle
GCC fails to bootstrap when configured with --enable-languages=all on machines that have older versions of GNAT installed as the system Ada compiler. In configure, it's not sufficient to check whether gnat is available, but whether a sufficiently recent version of GNAT is installed. This patch t

[PATCH] PR bootstrap/106472: Add libgo depends on libbacktrace to Makefile.def

2022-07-30 Thread Roger Sayle
This patch fixes PR bootstrap/106472 by adding a missing dependency to Makefile.def to allow make bootstrap when configured using "--enable-languages=go" (and not using make with multiple threads). Tested on x86-64-pc-linux-gnu. Ok for mainline? 2022-07-30 Roger Sayle ChangeLog PR

[committed] wwwdocs: cxx-status: Move www.open-std.org to https

2022-07-30 Thread Gerald Pfeifer
This is a trivial change which fixes several dozen links. Marek, Jason, Jonathan - I noticed that (in other places) we have both links to www.open-std.org and open-std.org, both of which seem to work. What is the preferred spelling of that site? With or without www? (The latter would be shorter

Re: [PATCH] stack-protector: Check stack canary for noreturn function

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/14/2022 3:55 PM, H.J. Lu via Gcc-patches wrote: Check stack canary for noreturn function to catch stack corruption before calling noreturn function. For C++, check stack canary when throwing exception or resuming stack unwind to avoid corrupted stack. gcc/ PR middle-end/58245

Re: [PATCH] c++: Fix location for -Wunused-macros [PR66290]

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/28/2022 8:01 AM, Lewis Hyatt via Gcc-patches wrote: In C++, since all tokens are lexed from libcpp up front, diagnostics generated by libcpp after lexing has completed do not get a valid location from libcpp (rather, libcpp thinks they all pertain to the end of the file.) This has long be

Re: [PATCH v2] cselib: add function to check if SET is redundant [PR106187]

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/29/2022 7:52 AM, Richard Earnshaw via Gcc-patches wrote: A SET operation that writes memory may have the same value as an earlier store but if the alias sets of the new and earlier store do not conflict then the set is not truly redundant.  This can happen, for example, if objects of di

[PATCH, v4] Fortran: detect blanks within literal constants in free-form mode [PR92805]

2022-07-30 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 30.07.22 um 10:28 schrieb Mikael Morin: Meh! We killed one check for gfc_current_form but the other one is still there. OK, match_kind_param calls two functions that also gobble space, so there is work remaining here. So please make match_small_literal_constant and gfc_match_name s

Re: [PATCH, v3] Fortran: detect blanks within literal constants in free-form mode [PR92805]

2022-07-30 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 30.07.22 um 09:46 schrieb Thomas Koenig via Fortran: Hi Harald, This introduces the helper function gfc_match_next_char, which is your second option. I would be a little bit concerned about compilation times with the additional function call overhead. the function it replace

Re: [PATCH] libgo: Explicitly define SYS_timer_settime for 32-bit musl targets

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 28, 2022 at 11:15 AM wrote: > > From: Sören Tempel > > On 32-bit systems, musl only defines SYS_timer_settime32 not > SYS_timer_settime. This causes the following compilation error: > > os_linux.go:251:30: error: reference to undefined name > '_SYS_timer_settime' >

Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/29/2022 2:54 AM, Richard Biener via Gcc-patches wrote: The following makes the backward threader reject threads whose entry edge is probably never executed according to the profile. That in particular, for the testcase, avoids threading the irq == 1 check on the path where irq > 31, ther

Re: [PATCH] tree-optimization/106422 - verify block copying in forward threading

2022-07-30 Thread Jeff Law via Gcc-patches
On 7/29/2022 2:47 AM, Richard Biener via Gcc-patches wrote: The forward threader failed to check whether it can actually duplicate blocks. The following adds this in a similar place the backwards threader performs this check. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

Re: [PATCH] libgccjit.h: Make the macro definition for testing gcc_jit_context_new_bitcast correctly available.

2022-07-30 Thread Vibhav Pant via Gcc-patches
I don't have push rights to the repo, so this would need to be applied manually. Thanks, Vibhav On Tue, Jul 26, 2022 at 4:48 AM David Malcolm wrote: > > On Sat, 2022-07-23 at 13:31 +0530, Vibhav Pant via Jit wrote: > > The macro definition for LIBGCCJIT_HAVE_gcc-jit_context_new_bitcast > > was

Re: [PATCH] Mips: Fix the ASAN shadow offset hook for the n32 ABI

2022-07-30 Thread Maciej W. Rozycki
On Mon, 6 Jun 2022, Dimitrije Milosevic wrote: > * config/mips/mips.cc (mips_asan_shadow_offset): Reformat > to handle the N32 ABI. That's not what the change does. > * config/mips/mips.h (SUBTARGET_SHADOW_OFFSET): Remove > the macro, as it is not needed anymore.

[PATCH] libfortran: Fix up boz_15.f90 on powerpc64le with -mabi=ieeelongdouble [PR106079]

2022-07-30 Thread Jakub Jelinek via Gcc-patches
Hi! The boz_15.f90 test FAILs on powerpc64le-linux when -mabi=ieeelongdouble is used (either default through --with-long-double-format=ieee or when used explicitly). The problem is that the read/write transfer routines are called with BT_REAL (or BT_COMPLEX) type and kind 17 which is magic we use

[x86_64 PATCH take #2] PR target/106450: Tweak timode_remove_non_convertible_regs.

2022-07-30 Thread Roger Sayle
Many thanks to H.J. for pointing out a better idiom for traversing the USEs (and also DEFs) of TImode registers in an instruction. This revised patched has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without --target_board=unix{-m32}, with no new failur

Re: [PATCH, v3] Fortran: detect blanks within literal constants in free-form mode [PR92805]

2022-07-30 Thread Mikael Morin
Le 29/07/2022 à 23:09, Harald Anlauf via Fortran a écrit : Hi Mikael, Am 29.07.22 um 22:36 schrieb Mikael Morin: Indeed, I overlooked that, but my opinion remains that we shouldn’t play with fixed vs free form considerations here. So the options I can see are:   - handle the locus in get_kind;

Re: [PATCH, v3] Fortran: detect blanks within literal constants in free-form mode [PR92805]

2022-07-30 Thread Thomas Koenig via Gcc-patches
Hi Harald, This introduces the helper function gfc_match_next_char, which is your second option. I would be a little bit concerned about compilation times with the additional function call overhead. The function is used only in one place; would it make sense to put it into primary.cc and de