Re: [committed] Fix gnu23-builtins-no-dfp

2023-12-02 Thread Florian Weimer
* Jeff Law: > Anyway, this test was the one I was most concerned about. Basically > we're testing that on a !dfp target that the builtins are not available. > It expects a warning, but gets an error by default now. I just > changed the test to use -fpermissive, so that the test behaves as

[committed] Fix gnu23-builtins-no-dfp

2023-12-02 Thread Jeff Law
Last patch for the night. There's still a bit of minor fallout left in GCC (loongarch testsuite for example). But things are looking good on the targets I test. The plan is to start submitting the various newlib/libgloss fixes tomorrow. Anyway, this test was the one I was most concerned

[committed] Fix build of libgcc on ports using FDPIC

2023-12-02 Thread Jeff Law
read_encoded_value_with_base has an ifdef'd code path conditional on __FDPIC__ which was calling _Unwind_gnu_Find_got without a prototype. This naturally caused various build failures. This adds a suitable prototype. Pushed to the trunk. commit 4cef6daf40f4aefd748245a720955d4e52d1a81e

[committed] Fix pr65369.c

2023-12-02 Thread Jeff Law
There's a caller/callee type mismatch in this test that shows up on targets where ints are something other than 32 bit types. Based on reviewing the original bug report, the fix and the part of the test this fixes, I'm reasonably confident this hasn't compromised the test. Pushed to the

[committed] Fix comp-goto-1.c on 16 bit targets

2023-12-02 Thread Jeff Law
I don't remember what port triggered this, but it's obviously that comp-goto-1.c needs to be fixed. Basically the test has two implementations. One is just a dummy with no return value on main() triggering the new errors. Pushed to the trunk. Jeffcommit

[committed] Fix a few arc tests

2023-12-02 Thread Jeff Law
Similar to others. Where it's easy to fix the implicit types or add prototypes I did. One was just ugly and I didn't want to think too hard, so I just added -fpermissive. Pushed to the trunk. Jeff commit 595c695216e72c8491bf20d30e5298e2064caa73 Author: Jeff Law Date: Sat Dec 2

[committed] Fix nios2 tests

2023-12-02 Thread Jeff Law
The nios2 port has two tests that are affected by the recent changes. In cdx-ldstwm-1.c it was easiest to just add -fpermissive. for cdx-ldstwm-2.c adding an prototype for exit and abort is all that's needed. Pushed to the trunk, Jeff commit 2280317c3771a28e9288b7f4c4c23aa4b0ac31dd Author:

[committed] Fix rx build failure in libgcc

2023-12-02 Thread Jeff Law
The rx port has a bunch of what I presume are ABI compatibility functions in libgcc. Those compatibility functions routines such as __eqdf2 from libgcc, but without a prototype. This patch adds the missing prototypes. Pushed to the trunk, Jeff commit

[committed] Fix minor testsuite problems on H8 after C99 changes

2023-12-02 Thread Jeff Law
Two minor regressions on the H8 were triggered by the C99 changes. First pr58400.c has several functions without prototypes. I just added -fpermissive to that test. Second pr17306-2.c has a single call to an unprototyped function for which I added the prototype. These are both H8 specific

[committed] Fix frv build after C99 changes

2023-12-02 Thread Jeff Law
Two issues prevent the frv-elf port from building after the C99 changes. First the trampoline code emitted into libgcc has calls to exit, but no prototype. Adding a trivial prototype for exit() into the macro fixes that little goof. Second, frvbegin.c has a call to atexit, so a quick

Re: [PATCH] gcc/doc: spelling mistakes and example

2023-12-02 Thread Xi Ruoyao
On Sun, 2023-12-03 at 00:17 +, Jonny Grant wrote: > @@ -733,7 +733,7 @@ To configure GCC: >  @smallexample >  % mkdir @var{objdir} >  % cd @var{objdir} > -% @var{srcdir}/configure [@var{options}] [@var{target}] > +% ../@var{srcdir}/configure [@var{options}] [@var{target}] >  @end smallexample

[PATCH v3 3/3] amdgcn, libgomp: low-latency allocator

2023-12-02 Thread Andrew Stubbs
This implements the OpenMP low-latency memory allocator for AMD GCN using the small per-team LDS memory (Local Data Store). Since addresses can now refer to LDS space, the "Global" address space is no-longer compatible. This patch therefore switches the backend to use entirely "Flat" addressing

[PATCH v3 1/3] libgomp, nvptx: low-latency memory allocator

2023-12-02 Thread Andrew Stubbs
This patch adds support for allocating low-latency ".shared" memory on NVPTX GPU device, via the omp_low_lat_mem_space and omp_alloc. The memory can be allocated, reallocated, and freed using a basic but fast algorithm, is thread safe and the size of the low-latency heap can be configured using

[PATCH v3 0/3] libgomp: OpenMP low-latency omp_alloc

2023-12-02 Thread Andrew Stubbs
This patch series is a rework of the patch series posted in August. https://patchwork.sourceware.org/project/gcc/list/?series=23045=%2A=both The series implements device-specific allocators and adds a low-latency allocator for both GPUs architectures. This time the omp_low_lat_mem_alloc does

[PATCH v3 2/3] openmp, nvptx: low-lat memory access traits

2023-12-02 Thread Andrew Stubbs
The NVPTX low latency memory is not accessible outside the team that allocates it, and therefore should be unavailable for allocators with the access trait "all". This change means that the omp_low_lat_mem_alloc predefined allocator no longer works (but omp_cgroup_mem_alloc still does).

[PATCH] wwwdocs: spelling mistakes

2023-12-02 Thread Jonny Grant
2023-12-03 Jonathan Grant htdocs/ * bugs/management.html: adition spelling. * codingrationale.html: suprises spelling. * contribute.html: elipsis leter spelling. * gcc-14/changes.html: modifed spelling. * gccmission.html: groundrules spelling. *

[PATCH] gcc/doc: spelling mistakes and example

2023-12-02 Thread Jonny Grant
2023-12-03 Jonathan Grant gcc/doc * install.texi: show ../ back from the objdir in the example invoking configure correct spelling support, arithmetics This page is what is generated from install.texi https://gcc.gnu.org/install/configure.html >From

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Jakub Jelinek
On Sat, Dec 02, 2023 at 11:04:04AM +, Richard Sandiford wrote: > I still maintain that so much stuff relies on the lack of false-positive > REG_UNUSED notes that (whatever the intention might have been) we need > to prevent the false positive. Like Andrew says, any use of single_set > is

[PATCH] driver: Fix memory leak.

2023-12-02 Thread Costas Argyris
Use std::vector instead of malloc'd pointer to get automatic freeing of memory. Result was verified by valgrind, which showed one less loss record. I think Jonathan is/was working on this transition but on a larger scale. 0001-driver-Fix-memory-leak.patch Description: Binary data

[PATCH] RISC-V: Document optimization parameter riscv-strcmp-inline-limit

2023-12-02 Thread Christoph Müllner
This patch documents the optimization parameter riscv-strcmp-inline-limit, which can be used to tweak the behaviour of -minline-strcmp and -minline-strncmp. gcc/ChangeLog: PR target/112650 * doc/invoke.texi: Document riscv-strcmp-inline-limit. Signed-off-by: Christoph Müllner

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Richard Biener
> Am 02.12.2023 um 14:15 schrieb Richard Sandiford : > > Eric Botcazou writes: >>> So sorry to be awkward, but I don't think this is the way to go. I think >>> we'll just end up playing whack-a-mole and adding df_note_add_problem to >>> lots of passes. >> >> We have doing that for the past

Re: [PATCH v2 3/7] aarch64: Add eh_return compile tests

2023-12-02 Thread Andrew Pinski
On Fri, Nov 3, 2023 at 8:37 AM Szabolcs Nagy wrote: > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/eh_return-2.c: New test. > * gcc.target/aarch64/eh_return-3.c: New test. gcc.target/aarch64/eh_return-3.c fails when running the testsuite with `-march=armv9-a+sve` . I

[PATCH] driver: Call finalize method from main.

2023-12-02 Thread Costas Argyris
Calling the driver::finalize() method before returning from main seems to be reducing some memory leaks of the driver (PR93019). $ head -n20 before_patch.txt ==385521== Memcheck, a memory error detector ==385521== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==385521== Using

[PATCH] download_prerequisites: add --only-gettext

2023-12-02 Thread Arsen Arsenović
contrib/ChangeLog: * download_prerequisites : Parse --only-gettext. (echo_archives): Check only_gettext and stop early if true. (helptext): Document --only-gettext. --- Afternoon, This patch adds a --only-gettext option to download_prerequisites for when the only

Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors

2023-12-02 Thread Jeff Law
On 12/1/23 22:47, Sam James wrote: Jeff Law writes: On 12/1/23 18:13, Sam James wrote: 钟居哲 writes: Hi, This patch cause error on building newlib/glibc/musl on RISC-V port:

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-12-02 Thread Jason Merrill
On 12/1/23 20:31, waffl3x wrote: On Friday, December 1st, 2023 at 9:52 AM, Jason Merrill wrote: On 12/1/23 01:02, waffl3x wrote: I ran into another issue while devising tests for redeclarations of xobj member functions as static member functions and vice versa. I am pretty sure by the

[PATCH] gettext: disable install, docs targets, libasprintf, threads

2023-12-02 Thread Arsen Arsenović
This fixes issues reported by David Edelsohn , and by Eric Gallager . ChangeLog: * Makefile.def (gettext): Disable (via missing) {install-,}{pdf,html,info,dvi} and TAGS targets. Set no_install to true. Add --disable-threads --disable-libasprintf. Drop the

Re: [PATCH] Tweak language choice in config-list.mk

2023-12-02 Thread Richard Sandiford
Richard Biener writes: > On Thu, Sep 7, 2023 at 11:30 AM Richard Sandiford via Gcc-patches > wrote: >> >> When I tried to use config-list.mk, the build for every triple except >> the build machine's failed for m2. This is because, unlike other >> languages, m2 builds target objects during

Re: [PATCH] Tweak language choice in config-list.mk

2023-12-02 Thread Richard Sandiford
Christophe Lyon writes: > Hi! > > > On Thu, 7 Sept 2023 at 11:30, Richard Sandiford via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > >> When I tried to use config-list.mk, the build for every triple except >> the build machine's failed for m2. This is because, unlike other >> languages, m2

Re: [PATCH v1 1/2] LoongArch: Switch loongarch-def from C to C++ to make it possible.

2023-12-02 Thread Xi Ruoyao
On Sat, 2023-12-02 at 20:44 +0800, chenglulu wrote: > > > @@ -657,12 +658,18 @@ abi_str (struct loongarch_abi abi) > > >     strlen (loongarch_abi_base_strings[abi.base])); > > >      else > > >   { > > > +  /* This situation has not yet occurred, so in order to avoid >

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Richard Sandiford
Eric Botcazou writes: >> So sorry to be awkward, but I don't think this is the way to go. I think >> we'll just end up playing whack-a-mole and adding df_note_add_problem to >> lots of passes. > > We have doing that for the past 15 years though, so what has changed? Off-hand, I couldn't

Re: [PATCH v1 1/2] LoongArch: Switch loongarch-def from C to C++ to make it possible.

2023-12-02 Thread chenglulu
在 2023/12/2 下午6:15, Xi Ruoyao 写道: On Sat, 2023-12-02 at 16:14 +0800, Lulu Cheng wrote: /* snip */ diff --git a/gcc/config/loongarch/loongarch-opts.cc b/gcc/config/loongarch/loongarch-opts.cc index b5836f198c0..6861642a98d 100644 --- a/gcc/config/loongarch/loongarch-opts.cc +++

[PATCH] libgcov: Call __builtin_fork instead of fork

2023-12-02 Thread Florian Weimer
Some targets do not provide a prototype for fork, and compilation now fails with an implicit-function-declaration error. libgcc/ * libgcov-interface.c (__gcov_fork): Generated code is the same on x86_64-linux-gnu. Okay for trunk? Thanks, Florian --- libgcc/libgcov-interface.c | 2 +-

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Eric Botcazou
> So sorry to be awkward, but I don't think this is the way to go. I think > we'll just end up playing whack-a-mole and adding df_note_add_problem to > lots of passes. We have doing that for the past 15 years though, so what has changed? > (FTR, I'm not saying passes have to avoid false

[PATCH] htdocs/contribute.html: correct disctinct->distinct spelling

2023-12-02 Thread Jonny Grant
Correct a spelling mistake this page: https://gcc.gnu.org/contribute.html >From 5bfcc97cafb195c68d3110247dabeaf464b8d367 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Sat, 2 Dec 2023 11:55:40 + Subject: [PATCH] htdocs/contribute.html: correct disctinct->distinct spelling ---

Re: [PATCH] lower-bitint: Fix up lower_addsub_overflow [PR112807]

2023-12-02 Thread Richard Biener
> Am 02.12.2023 um 12:05 schrieb Jakub Jelinek : > > Hi! > > lower_addsub_overflow uses handle_cast or handle_operand to extract current > limb from the operands. Both of those functions heavily assume that they > return a large or huge BITINT_TYPE. The problem in the testcase is that >

[PATCH] lower-bitint: Fix up lower_addsub_overflow [PR112807]

2023-12-02 Thread Jakub Jelinek
Hi! lower_addsub_overflow uses handle_cast or handle_operand to extract current limb from the operands. Both of those functions heavily assume that they return a large or huge BITINT_TYPE. The problem in the testcase is that this is violated. Normally, lower_addsub_overflow isn't even called

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > The following testcase ICEs on x86_64-linux since df_note_add_problem () > call has been added to mode switching. > The problem is that the pro_and_epilogue pass in > prepare_shrink_wrap -> copyprop_hardreg_forward_bb_without_debug_insn > uses regcprop.cc

[PATCH] c++: #pragma GCC unroll C++ fixes [PR112795]

2023-12-02 Thread Jakub Jelinek
Hi! foo in the unroll-5.C testcase ICEs because cp_parser_pragma_unroll during parsing calls maybe_constant_value unconditionally, which is fine if !processing_template_decl, but can ICE otherwise. While just calling fold_non_dependent_expr there instead could be enough to fix the ICE (and I

[PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Jakub Jelinek
Hi! The following testcase ICEs on x86_64-linux since df_note_add_problem () call has been added to mode switching. The problem is that the pro_and_epilogue pass in prepare_shrink_wrap -> copyprop_hardreg_forward_bb_without_debug_insn uses regcprop.cc infrastructure which relies on accurate

Re: [PATCH] gcc: Disallow trampolines when -fhardened

2023-12-02 Thread Iain Sandoe
> On 2 Dec 2023, at 09:42, Martin Uecker wrote: > > >> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? >> >> -- >8 -- >> It came up that a good hardening strategy is to disable trampolines >> which may require executable stack. Therefore the following patch >> adds

Re: [PATCH v1 1/2] LoongArch: Switch loongarch-def from C to C++ to make it possible.

2023-12-02 Thread Xi Ruoyao
On Sat, 2023-12-02 at 16:14 +0800, Lulu Cheng wrote: /* snip */ > diff --git a/gcc/config/loongarch/loongarch-opts.cc > b/gcc/config/loongarch/loongarch-opts.cc > index b5836f198c0..6861642a98d 100644 > --- a/gcc/config/loongarch/loongarch-opts.cc > +++ b/gcc/config/loongarch/loongarch-opts.cc >

Re: [PATCH, v3] Fortran: deferred-length character optional dummy arguments [PR93762,PR100651]

2023-12-02 Thread FX Coudert
Hi, > this patch extends the previous version by adding further code testing > the presence of an optional deferred-length character argument also > in the function initialization code. This allows to re-enable a > commented-out test in v2. Nice, that sounds logical. > Regtested on

Re: [PATCH] gcc: Disallow trampolines when -fhardened

2023-12-02 Thread Martin Uecker
> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > -- >8 -- > It came up that a good hardening strategy is to disable trampolines > which may require executable stack. Therefore the following patch > adds -Werror=trampolines to -fhardened. This would add a warning about

Re: [11 PATCH] libiberty, Darwin: Fix a build warning. [PR112823]

2023-12-02 Thread FX Coudert
> Thanks. I can't push it myself - could you do that for me? Pushed. FX

Re: [r14-5930 Regression] FAIL: gcc.c-torture/compile/libcall-2.c -Os (test for excess errors) on Linux/x86_64

2023-12-02 Thread FX Coudert
> mcmodel=large s not supported (yet) on any Darwin arch [PR90698], so the test > needs skipping or xfailing, I think (either way with a reference to the PR). Pushed as https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b74981b5cf32ebf4bfffd25e7174b5c80243447a FX

Re: [pushed][PATCH v1 1/2] LoongArch: Accelerate optimization of scalar signed/unsigned popcount.

2023-12-02 Thread chenglulu
Pushed to r14-6072. 在 2023/11/28 下午3:38, Li Wei 写道: In LoongArch, the vector popcount has corresponding instructions, while the scalar does not. Currently, the scalar popcount is calculated through a loop, and the value of a non-power of two needs to be iterated several times, so the vector

Re: [pushed][PATCH v1 2/2] LoongArch: Optimize vector constant extract-{even/odd} permutation.

2023-12-02 Thread chenglulu
在 2023/11/29 下午5:44, Xi Ruoyao 写道: On Tue, 2023-11-28 at 15:39 +0800, Li Wei wrote: For vector constant extract-{even/odd} permutation replace the default [x]vshuf instruction combination with [x]vilv{l/h} instruction, which can reduce instructions and improves performance. gcc/ChangeLog:

Re:[pushed] [PATCH v1] LoongArch: Remove duplicate definition of CLZ_DEFINED_VALUE_AT_ZERO.

2023-12-02 Thread chenglulu
Pushed to r14-6070. 在 2023/11/29 上午9:53, Xi Ruoyao 写道: On Tue, 2023-11-28 at 15:56 +0800, Li Wei wrote: In the r14-5547 commit, C[LT]Z_DEFINED_VALUE_AT_ZERO were defined at the same time, but in fact, CLZ_DEFINED_VALUE_AT_ZERO has already been defined, so remove the duplicate definition.

[PATCH v1 1/2] LoongArch: Switch loongarch-def from C to C++ to make it possible.

2023-12-02 Thread Lulu Cheng
From: Xi Ruoyao We'll use HOST_WIDE_INT in LoongArch static properties in following patches. Switch loongarch-def from C to C++ to make it possible. To keep the same readability as C99 designated initializers, create a std::array like data structure with position setter function, and add field

[PATCH v1 0/2] Delete ISA_BASE_LA64V110 related definitions.

2023-12-02 Thread Lulu Cheng
1. Rebase Xi Ruoyao's patch to the latest commit. https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636798.html 2. Described in LoongArch Reference Manual v1.1: The new functional subsets in each new version have independent identification bits in the return value of the CPUCFG instruction.

[PATCH v1 2/2] LoongArch: Remove the definition of ISA_BASE_LA64V110 from the code.

2023-12-02 Thread Lulu Cheng
The instructions defined in LoongArch Reference Manual v1.1 are not the instruction set v1.1 version. The CPU defined later may only support some instructions in LoongArch Reference Manual v1.1. Therefore, the macro ISA_BASE_LA64V110 and related definitions are removed here. gcc/ChangeLog: