Re: [PATCH] c-family: Introduce the -Winvalid-noreturn flag from clang with extra tuneability

2024-07-20 Thread Julian Waters
HI Jason, I was hoping to have -Wno-invalid-noreturn=explicit directly disable explicit noreturn warnings for instance, following the style of the -Wno-attributes=vendor:: option, while the pattern in -fstrong-eval-order seems to be that of using RejectNegative and handling each specified positive

[SH, committed]: Fix outage caused by secondary combine pass (was: Re: [RFC/PATCH] libgcc: sh: Use soft-fp for non-hosted SH3/SH4)

2024-07-20 Thread Oleg Endo
Hi, I've committed the attached patch to fix the full gcc + libstdc++ build on sh-elf. Best regards, Oleg Endo On Sat, 2024-07-06 at 07:35 -0600, Jeff Law wrote: > > On 7/5/24 1:28 AM, Sébastien Michelland wrote: > > Hi Oleg! > > > > > I don't understand why this is being limited to SH3 and

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 14:54, Jakub Jelinek wrote: On Sat, Jul 20, 2024 at 12:57:39PM -0400, Andrew MacLeod wrote: perhaps easier to just do That works as well, sure. Committed. Andrew commit 15571d2d54c705f22aced5e972cb463d0593aa3c Author: Andrew MacLeod Date: Sat Jul 20 12:49:39 2024 -0400 R

Re: [patch,avr] Support new built-in for faster mask computation

2024-07-20 Thread Jeff Law
On 7/20/24 11:27 AM, Georg-Johann Lay wrote: Hi Jeff, at least combiner patterns won't work.  For something like var |= 1 << (off & 7) insn combine is just getting lost; it tries expressions with MEM, IOR, even PARALLELs, but nothing that's close to a rotation. Also it doesn't break out m

[PATCH v3 07/12] OpenMP: Fortran front-end support for metadirectives.

2024-07-20 Thread Sandra Loosemore
This patch adds support for metadirectives to the Fortran front end. gcc/fortran/ChangeLog * decl.cc (gfc_match_end): Handle metadirectives. * dump-parse-tree.cc (show_omp_node): Likewise. (show_code_node): Likewise. * gfortran.h (enum gfc_statement): Add ST_OMP_MET

[PATCH v3 11/12] OpenMP: Update "declare target"/OpenMP context interaction

2024-07-20 Thread Sandra Loosemore
The code and test case previously implemented the OpenMP 5.0 spec, which said in section 2.3.1: "For functions within a declare target block, the target trait is added to the beginning of the set..." In OpenMP 5.1, this was changed to "For device routines, the target trait is added to the beginni

[PATCH v3 09/12] OpenMP: Extend dynamic selector support to declare variant

2024-07-20 Thread Sandra Loosemore
This patch extends the mechanisms previously added to support dynamic selectors in metavariant constructs to also apply to "declare variant". The front-end mechanisms used to handle "declare variant" via attributes attached to the function decls remain the same, but the gimplifier now uses the sam

[PATCH v3 10/12] OpenMP: Remove dead code from declare variant reimplementation

2024-07-20 Thread Sandra Loosemore
After reimplementing late resolution of "declare variant" to use the same mechanisms as metadirective, the declare_variant_alt and calls_declare_variant_alt flags on struct cgraph_node are no longer used by anything. For the purposes of marking functions that need late resolution, the has_metadire

[PATCH v3 06/12] OpenMP: common c/c++ testcases for metadirectives

2024-07-20 Thread Sandra Loosemore
gcc/testsuite/ChangeLog * c-c++-common/gomp/attrs-metadirective-1.c: New. * c-c++-common/gomp/attrs-metadirective-2.c: New. * c-c++-common/gomp/attrs-metadirective-3.c: New. * c-c++-common/gomp/attrs-metadirective-4.c: New. * c-c++-common/gomp/attrs-metadirec

[PATCH v3 05/12] OpenMP: C++ front-end support for metadirectives

2024-07-20 Thread Sandra Loosemore
This patch adds C++ support for metadirectives. It uses the c-family support committed with the corresponding C front end patch to do early parse-time metadirective resolution when possible. Additional C/C++ common testcases are provided in a subsequent patch in the series. gcc/cp/ChangeLog

[PATCH v3 12/12] OpenMP: Update documentation of metadirective implementation status.

2024-07-20 Thread Sandra Loosemore
libgomp/ChangeLog * libgomp.texi (OpenMP 5.0): Mark metadirective and declare variant as implemented. (OpenMP 5.1): Mark target_device as supported. Add changed interaction between declare target and OpenMP context and dynamic selector support. (OpenM

[PATCH v3 04/12] OpenMP: C front end support for metadirectives

2024-07-20 Thread Sandra Loosemore
This patch adds support to the C front end to parse OpenMP metadirective constructs. It includes support for early parse-time resolution of metadirectives (when possible) that will also be used by the C++ front end. Additional common C/C++ testcases are in a later patch in the series. gcc/c-fami

[PATCH v3 08/12] OpenMP: Reject other properties with kind(any)

2024-07-20 Thread Sandra Loosemore
The OpenMP spec says: "If trait-property any is specified in the kind trait-selector of the device selector set or the target_device selector sets, no other trait-property may be specified in the same selector set." GCC was not previously enforcing this restriction and several testcases included

[PATCH v3 02/12] OpenMP: middle-end support for metadirectives

2024-07-20 Thread Sandra Loosemore
This patch adds middle-end support for OpenMP metadirectives. Some context selectors can be resolved during gimplification, but others need to be deferred until the omp_device_lower pass, which requires that cgraph, LTO streaming, inlining, etc all know about this construct as well. gcc/ChangeLog

[PATCH v3 03/12] libgomp: runtime support for target_device selector

2024-07-20 Thread Sandra Loosemore
This patch implements the libgomp runtime support for the dynamic target_device selector via the GOMP_evaluate_target_device function. include/ChangeLog * cuda/cuda.h (CUdevice_attribute): Add definitions for CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR and CU_DEVICE_ATTRIB

[PATCH v3 01/12] OpenMP: metadirective tree data structures and front-end interfaces

2024-07-20 Thread Sandra Loosemore
This patch adds the OMP_METADIRECTIVE tree node and shared tree-level support for manipulating metadirectives. It defines/exposes interfaces that will be used in subsequent patches that add front-end and middle-end support, but nothing generates these nodes yet. This patch also adds compile-time

[PATCH v3 00/12] Metadirective support + "declare variant" improvements

2024-07-20 Thread Sandra Loosemore
This is a revised version of the patch set I last posted in late May: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/653066.html Aside from rebasing the patch set so it applies cleanly to mainline head again, I incorporated a few small code cleanups and testsuite fixes I'd collected, plus a f

[PATCH 2/2] Output CodeView type information for rvalue references

2024-07-20 Thread Mark Harmstone
Translates DW_TAG_rvalue_reference_type DIEs into LF_POINTER types. gcc/ * dwarf2codeview.cc (get_type_num_reference_type): Handle rvalue refs. (get_type_num_array_type): Add DW_TAG_rvalue_reference_type to switch. (get_type_num): Handle DW_TAG_rvalue_reference_type DIEs.

[PATCH 1/2] Output CodeView type information for references

2024-07-20 Thread Mark Harmstone
Translates DW_TAG_reference_type DIEs into LF_POINTER types. gcc/ * dwarf2codeview.cc (get_type_num_reference_type): New function. (get_type_num_array_type): Add DW_TAG_reference_type to switch. (get_type_num): Handle DW_TAG_reference_type DIEs. * dwarf2codeview.h (

[PATCH] i386: Add _MM_FROUND_TIES_TO_EVEN to smmintrin.h

2024-07-20 Thread Paul Caprioli
Intrinsics such as `_mm512_add_round_ps` take a rounding mode argument to specify the floating point rounding mode. This and similar instructions do NOT round their result to an integer. Thus it is inappropriate for user code to specify the existing `_MM_FROUND_TO_NEAREST_INT` when desiring to r

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Jakub Jelinek
On Sat, Jul 20, 2024 at 12:57:39PM -0400, Andrew MacLeod wrote: > perhaps easier to just do That works as well, sure. > diff --git a/gcc/testsuite/gcc.dg/pr116003.c > b/gcc/testsuite/gcc.dg/pr116003.c > index 970b1539c48..44e625015b0 100644 > --- a/gcc/testsuite/gcc.dg/pr116003.c > +++ b/gcc/test

[PATCH] c++: fix wrong ambiguity resolution [PR29834]

2024-07-20 Thread Marek Polacek
[ Entering the contest to fix the oldest PR in this cycle. ] Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This 18-year-old PR reports that we parse certain comma expressions as a declaration rather than statement when the statement begins with a functional-style cast expr

Re: [patch,avr] Support new built-in for faster mask computation

2024-07-20 Thread Georg-Johann Lay
Am 19.07.24 um 16:56 schrieb Jeff Law: On 7/18/24 3:12 PM, Georg-Johann Lay wrote: This new builtin provides a faster way to compute expressions like  1 << x  or ~(1 << x) that are sometimes used as masks for setting bits in the I/O region, and when x is not known at compile-time. The open code

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 12:54, Jakub Jelinek wrote: This isn't enough. The bitint effective target just means that the target supports at least some _BitInt precisions (the standard in that case mandates support for at least bits in long long, so 64), but this testcase uses _BitInt(129), for that one needs

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Jakub Jelinek
On Sat, Jul 20, 2024 at 12:31:34PM -0400, Andrew MacLeod wrote: > > On 7/20/24 12:00, Jakub Jelinek wrote: > > On Sat, Jul 20, 2024 at 11:48:36AM -0400, Andrew MacLeod wrote: > > > On 7/20/24 01:58, Sam James wrote: > > > > FAIL: gcc.dg/pr116003.c (test for excess errors) > > > > Excess errors: >

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 12:00, Jakub Jelinek wrote: On Sat, Jul 20, 2024 at 11:48:36AM -0400, Andrew MacLeod wrote: On 7/20/24 01:58, Sam James wrote: FAIL: gcc.dg/pr116003.c (test for excess errors) Excess errors: /home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.d

Re: [COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Jakub Jelinek
On Sat, Jul 20, 2024 at 11:48:36AM -0400, Andrew MacLeod wrote: > On 7/20/24 01:58, Sam James wrote: > > FAIL: gcc.dg/pr116003.c (test for excess errors) > > Excess errors: > > /home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/pr116003.c:4:1: > > sorry, u

[COMMITTED] Tweak pr116003.c to target bitint.

2024-07-20 Thread Andrew MacLeod
On 7/20/24 01:58, Sam James wrote: FAIL: gcc.dg/pr116003.c (test for excess errors) Excess errors: /home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/pr116003.c:4:1: sorry, unimplemented: '_BitInt(5)' is not supported on this target /home/tcwg-buildslave

Re: [PATCH] Spec Files: remove documentation about obsolete spec strings

2024-07-20 Thread Gerald Pfeifer
On Tue, 16 Jan 2024, André Maroneze wrote: > Remove from documentation spec strings that no longer exist in the code: > - predefines: removed in 2003 (From-SVN: r66917) > - signed_char: removed in 2002 (From-SVN: r49444) > > gcc/ >     * doc/invoke.texi (Spec Files): Remove obsolete spec strin

Re: [PATCH] s390: Fix unresolved iterators bhfgq and xdee

2024-07-20 Thread Andreas Krebbel
On 7/20/24 08:39, Stefan Schulze Frielinghaus wrote: I'm pinging this early since I would like to make sure that it gets into 14.2 RC which is about to be done on Tuesday 23rd July. On Tue, Jul 16, 2024 at 04:50:29PM +0200, Stefan Schulze Frielinghaus wrote: Code attribute bhfgq is missing a

[r13-8926 Regression] FAIL: gfortran.dg/pr113363.f90 -Os (test for excess errors) on Linux/x86_64

2024-07-20 Thread haochen.jiang
On Linux/x86_64, 7c81ff02a943cda82cc1a82b36ae8ab14470b00a is the first bad commit commit 7c81ff02a943cda82cc1a82b36ae8ab14470b00a Author: Paul Thomas Date: Mon May 13 07:27:20 2024 +0100 Fortran: Fix wrong code in unlimited polymorphic assignment [PR113363] caused FAIL: gfortran.dg/pr113

Re: [PATCH] testsuite: fix pr115929-1.c with -Wformat-security

2024-07-20 Thread Xi Ruoyao
On Sat, 2024-07-20 at 07:16 +0100, Sam James wrote: > Xi Ruoyao writes: > > > On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: > > > Some distributions like Gentoo make -Wformat and -Wformat-security > > > enabled by default. Pass -Wno-format to the test to avoid a spurious > > > fail in such