- Oct 17, 2024
-
-
Christophe Lyon authored
This patch adds -Werror to LIBGCC2_CFLAGS so that aarch64 can catch warnings during bootstrap, while not impacting other targets. The patch also adds -Wno-prio-ctor-dtor to avoid a warning when compiling lse_init.c libgcc/ * config/aarch64/t-aarch64: Always use -Werror -Wno-prio-ctor-dtor.
-
Christophe Lyon authored
Add prototypes for __init_cpu_features_resolver and __init_cpu_features to avoid warnings due to -Wmissing-prototypes. libgcc/ * config/aarch64/cpuinfo.c (__init_cpu_features_resolver): Add prototype. (__init_cpu_features): Likewise.
-
Christophe Lyon authored
Since Commit c608ada2 Author: Zac Walker <zacwalker@microsoft.com> CommitDate: 2024-01-23 15:32:30 +0000 Ifdef `.hidden`, `.type`, and `.size` pseudo-ops for `aarch64-w64-mingw32` target lse.S includes aarch64-asm.h, leading to a conflicting definition of macro 'L': - in lse.S it expands to either '' or 'L' - in aarch64-asm.h it is used to generate .L ## label lse.S does not use the second, so this patch just undefines L after the inclusion of aarch64-asm.h. libgcc/ * config/aarch64/lse.S: Undefine L() macro.
-
Siddhesh Poyarekar authored
Don't bail out early if the offset to a pointer in __builtin_object_size is a variable, return the wholesize instead since that is a better fallback for maximum estimate. This should keep checks in place for fortified functions to constrain overflows to at lesat some extent. gcc/ChangeLog: PR middle-end/77608 * tree-object-size.cc (plus_stmt_object_size): Drop check for constant offset. gcc/testsuite/ChangeLog: * gcc.dg/builtin-object-size-1.c (test12): New test. (main): Call it. Signed-off-by:
Siddhesh Poyarekar <siddhesh@gotplt.org>
-
Georg-Johann Lay authored
PR rtl-optimization/PR117189 gcc/testsuite/ * gcc.target/avr/torture/lra-pr116550-2.c: Rename to... * gcc.target/avr/torture/pr117189.c: ...this.
-
Patrick Palka authored
This was added as part of the initial Concepts TS implementation and reflects an early version of the Concepts TS paper, which is very different from standard C++20 concepts (and even from more recent versions of the Concepts TS, support for which we deprecated in GCC 14 and removed for GCC 15). So there's not much to salvage from this section besides the __is_same trait documentation which we can conveniently move to the previous Type Traits section. gcc/ChangeLog: * doc/extend.texi (C++ Concepts): Remove section. Move __is_same documentation to the previous Type Traits section. Reviewed-by:
Jason Merrill <jason@redhat.com>
-
Oleg Endo authored
gcc/ChangeLog: PR target/113533 * config/sh/sh.cc (sh_rtx_costs): Delete wrong semicolon.
-
Georg-Johann Lay authored
PR rtl-optimization/116550 gcc/testsuite/ * gcc.target/avr/torture/lra-pr116550-1.c: New file. * gcc.target/avr/torture/lra-pr116550-2.c: New file.
-
Richard Biener authored
This kicks off removal of keying options used on testcase names as done in gcc.dg/vect as the appropriate way to do this is using dg-additional-options. Starting with two of the least used ones. This causes the moved tests to be covered by VECT_ADDITIONAL_FLAGS processing. * gcc.dg/vect/vect.exp: Process no-fast-math-* and no-math-errno-* in the main set. * gcc.dg/vect/no-fast-math-vect16.c: Add -fno-fast-math. * gcc.dg/vect/no-math-errno-slp-32.c: Add -fno-math-errno. * gcc.dg/vect/no-math-errno-vect-pow-1.c: Likewise.
-
Richard Biener authored
The following adds single-lane SLP support for vectorizing non-linear inductions. This fixes a bunch of i386 specific testcases with --param vect-force-slp=1. PR tree-optimization/117172 * tree-vect-loop.cc (vectorizable_nonlinear_induction): Add single-lane SLP support.
-
Haochen Jiang authored
testsuite: Add -march=x86-64-v3 to AVX10 testcases to slience warning for GCC built with AVX512 arch Currently, when build GCC with config --with-arch=native on AVX512 machines, if we run AVX10.2 testcases, we will get vector size warnings. It is expected but annoying. Simply add -march=x86-64-v3 to override --with-arch=native to slience all the warnings. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_1-25.c: Add -march=x86-64-v3. * gcc.target/i386/avx10_1-26.c: Ditto. * gcc.target/i386/avx10_2-512-bf-vector-cmpp-1.c: Ditto. * gcc.target/i386/avx10_2-512-bf-vector-fma-1.c: Ditto. * gcc.target/i386/avx10_2-512-bf-vector-operations-1.c: Ditto. * gcc.target/i386/avx10_2-512-bf-vector-smaxmin-1.c: Ditto. * gcc.target/i386/avx10_2-512-bf16-1.c: Ditto. * gcc.target/i386/avx10_2-512-convert-1.c: Ditto. * gcc.target/i386/avx10_2-512-media-1.c: Ditto. * gcc.target/i386/avx10_2-512-minmax-1.c: Ditto. * gcc.target/i386/avx10_2-512-satcvt-1.c: Ditto. * gcc.target/i386/avx10_2-512-vaddnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcmppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvthf82ph-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtne2ph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtne2ph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtne2ph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtne2ph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtneph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtneph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtneph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtneph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vdivnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vdpphps-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vgetexppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmaxpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxpd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxph-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminmaxps-2.c: Ditto. * gcc.target/i386/avx10_2-512-vminpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmpsadbw-2.c: Ditto. * gcc.target/i386/avx10_2-512-vmulnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbssd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbssds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbsud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbsuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbuud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpbuuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwsud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwsuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwusd-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwusds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwuud-2.c: Ditto. * gcc.target/i386/avx10_2-512-vpdpwuuds-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrcppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vreducenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vscalefpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-512-vsubnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-bf-vector-cmpp-1.c: Ditto. * gcc.target/i386/avx10_2-bf-vector-fma-1.c: Ditto. * gcc.target/i386/avx10_2-bf-vector-operations-1.c: Ditto. * gcc.target/i386/avx10_2-bf-vector-smaxmin-1.c: Ditto. * gcc.target/i386/avx10_2-bf16-1.c: Ditto. * gcc.target/i386/avx10_2-builtin-1.c: Ditto. * gcc.target/i386/avx10_2-builtin-2.c: Ditto. * gcc.target/i386/avx10_2-compare-1.c: Ditto. * gcc.target/i386/avx10_2-compare-1b.c: Ditto. * gcc.target/i386/avx10_2-convert-1.c: Ditto. * gcc.target/i386/avx10_2-media-1.c: Ditto. * gcc.target/i386/avx10_2-minmax-1.c: Ditto. * gcc.target/i386/avx10_2-partial-bf-vector-fast-math-1.c: Ditto. * gcc.target/i386/avx10_2-partial-bf-vector-fma-1.c: Ditto. * gcc.target/i386/avx10_2-partial-bf-vector-operations-1.c: Ditto. * gcc.target/i386/avx10_2-partial-bf-vector-smaxmin-1.c: Ditto. * gcc.target/i386/avx10_2-rounding-1.c: Ditto. * gcc.target/i386/avx10_2-rounding-2.c: Ditto. * gcc.target/i386/avx10_2-rounding-3.c: Ditto. * gcc.target/i386/avx10_2-satcvt-1.c: Ditto. * gcc.target/i386/avx10_2-vaddnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vcmppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vcomsbf16-1.c: Ditto. * gcc.target/i386/avx10_2-vcomsbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vcvt2ps2phx-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvthf82ph-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtne2ph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtne2ph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtne2ph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtne2ph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtneph2bf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtneph2bf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtneph2hf8-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtneph2hf8s-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvtps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttnebf162ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttnebf162iubs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttpd2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttpd2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttpd2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttps2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttsd2sis-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttsd2usis-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttss2sis-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttss2usis-2.c: Ditto. * gcc.target/i386/avx10_2-vdivnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vdpphps-2.c: Ditto. * gcc.target/i386/avx10_2-vfmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vfmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vfnmaddXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vfnmsubXXXnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vfpclasspbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vgetexppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vgetmantpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vmaxpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxpd-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxph-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxps-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxsd-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxsh-2.c: Ditto. * gcc.target/i386/avx10_2-vminmaxss-2.c: Ditto. * gcc.target/i386/avx10_2-vminpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vmovd-1.c: Ditto. * gcc.target/i386/avx10_2-vmovd-2.c: Ditto. * gcc.target/i386/avx10_2-vmovw-1.c: Ditto. * gcc.target/i386/avx10_2-vmovw-2.c: Ditto. * gcc.target/i386/avx10_2-vmpsadbw-2.c: Ditto. * gcc.target/i386/avx10_2-vmulnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbssd-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbssds-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbsud-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbsuds-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbuud-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpbuuds-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwsud-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwsuds-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwusd-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwusds-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwuud-2.c: Ditto. * gcc.target/i386/avx10_2-vpdpwuuds-2.c: Ditto. * gcc.target/i386/avx10_2-vrcppbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vreducenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vrndscalenepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vrsqrtpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vscalefpbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vsqrtnepbf16-2.c: Ditto. * gcc.target/i386/avx10_2-vsubnepbf16-2.c: Ditto.
-
Denis Chertykov authored
Test file: udivmoddi.c problem insn: 484 Before LRA pass we have: (insn 484 483 485 72 (parallel [ (set (reg/v:SI 143 [ __q1 ]) (plus:SI (reg/v:SI 143 [ __q1 ]) (const_int -2 [0xfffffffffffffffe]))) (clobber (scratch:QI)) ]) "udivmoddi.c":163:405 discrim 5 186 {addsi3} (nil)) LRA substitute all scratches with new pseudos, so we have: (insn 484 483 485 72 (parallel [ (set (reg/v:SI 143 [ __q1 ]) (plus:SI (reg/v:SI 143 [ __q1 ]) (const_int -2 [0xfffffffffffffffe]))) (clobber (reg:QI 619)) ]) "/mnt/d/avr-lra/udivmoddi.c":163:405 discrim 5 186 {addsi3} (expr_list:REG_UNUSED (reg:QI 619) (nil))) Pseudo 619 is a special scratch register generated by LRA which is marked in `scratch_bitmap' and can be tested by call `ira_former_scratch_p(regno)'. In dump file (udivmoddi.c.317r.reload) we have: Creating newreg=619 Removing SCRATCH to p619 in insn #484 (nop 3) rescanning insn with uid = 484. After that LRA tries to spill (reg:QI 619) It's a bug because (reg:QI 619) is an output scratch register which is already something like spill register. Fragment from udivmoddi.c.317r.reload: Choosing alt 2 in insn 484: (0) r (1) 0 (2) nYnn (3) &d {addsi3} Creating newreg=728 from oldreg=619, assigning class LD_REGS to r728 IMHO: the bug is in lra-constraints.cc in function `get_reload_reg' fragment of `get_reload_reg': if (type == OP_OUT) { /* Output reload registers tend to start out with a conservative choice of register class. Usually this is ALL_REGS, although a target might narrow it (for performance reasons) through targetm.preferred_reload_class. It's therefore quite common for a reload instruction to require a more restrictive class than the class that was originally assigned to the reload register. In these situations, it's more efficient to refine the choice of register class rather than create a second reload register. This also helps to avoid cycling for registers that are only used by reload instructions. */ if (REG_P (original) && (int) REGNO (original) >= new_regno_start && INSN_UID (curr_insn) >= new_insn_uid_start __________________________________^^ && in_class_p (original, rclass, &new_class, true)) { unsigned int regno = REGNO (original); if (lra_dump_file != NULL) { fprintf (lra_dump_file, " Reuse r%d for output ", regno); dump_value_slim (lra_dump_file, original, 1); } This condition incorrectly limits register reuse to ONLY newly generated instructions. i.e. LRA can reuse registers only from insns generated by himself. IMHO:It's wrong. Scratch registers generated by LRA also have to be reused. The patch is very simple. On x86_64, it bootstraps+regtests fine. gcc/ PR target/116550 * lra-constraints.cc (get_reload_reg): Reuse scratch registers generated by LRA.
-
Andre Vehreschild authored
Exposing a variable in a module and referencing it in a submodule made the compiler ICE, because the external variable was not sorted into the correct module. In fact the module name was not set where the variable got built. gcc/fortran/ChangeLog: PR fortran/80235 * trans-decl.cc (gfc_build_qualified_array): Make sure the array is associated to the correct module and being marked as extern. gcc/testsuite/ChangeLog: * gfortran.dg/coarray/add_sources/submodule_1_sub.f90: New test. * gfortran.dg/coarray/submodule_1.f90: New test.
-
Richard Biener authored
The testcases shows single-element interleaving of size three being exempted from permutation lowering via heuristics (see also PR116973). But it wasn't supposed to apply to non-power-of-two sizes so this amends the check to ensure the sub-group is aligned even when the number of lanes is one. * tree-vect-slp.cc (vect_lower_load_permutations): Avoid exempting non-power-of-two group sizes from lowering.
-
Jakub Jelinek authored
The following patch partially implements the N3353 paper. In particular, it adds support for the delimited escape sequences (\u{123}, \x{123}, \o{123}) which were added already for C++23, all I had to do is split the delimited escape sequence guarding from named universal character escape sequence guards (\N{LATIN CAPITAL LETTER C WITH CARON}), which C++23 has but C2Y doesn't and emit different diagnostics for C from C++ for the delimited escape sequences. And it adds support for the new style of octal literals, 0o137 or 0O1777. I have so far added that just for C and not C++, because I have no idea whether C++ will want to handle it similarly. What the patch doesn't do is any kind of diagnostics for obsoletion of \137 or 0137, as discussed in the PR, I think it is way too early for that. Perhaps some non-default warning later on. 2024-10-17 Jakub Jelinek <jakub@redhat.com> PR c/117028 libcpp/ * include/cpplib.h (struct cpp_options): Add named_uc_escape_seqs, octal_constants and cpp_warn_c23_c2y_compat members. (enum cpp_warning_reason): Add CPP_W_C23_C2Y_COMPAT enumerator. * init.cc (struct lang_flags): Add named_uc_escape_seqs and octal_constants bit-fields. (lang_defaults): Add initializers for them into the table. (cpp_set_lang): Initialize named_uc_escape_seqs and octal_constants. (cpp_create_reader): Initialize cpp_warn_c23_c2y_compat to -1. * charset.cc (_cpp_valid_ucn): Test CPP_OPTION (pfile, named_uc_escape_seqs) rather than CPP_OPTION (pfile, delimited_escape_seqs) in \N{} related tests. Change wording of C cpp_pedwarning for \u{} and emit -Wc23-c2y-compat warning for it too if needed. Formatting fixes. (convert_hex): Change wording of C cpp_pedwarning for \u{} and emit -Wc23-c2y-compat warning for it too if needed. (convert_oct): Likewise. * expr.cc (cpp_classify_number): Handle C2Y 0o or 0O prefixed octal constants. (cpp_interpret_integer): Likewise. gcc/c-family/ * c.opt (Wc23-c2y-compat): Add CPP and CppReason parameters. * c-opts.cc (set_std_c2y): Use CLK_STDC2Y or CLK_GNUC2Y rather than CLK_STDC23 and CLK_GNUC23. Formatting fix. * c-lex.cc (interpret_integer): Handle C2Y 0o or 0O prefixed and wb/WB/uwb/UWB suffixed octal constants. gcc/testsuite/ * gcc.dg/bitint-112.c: New test. * gcc.dg/c23-digit-separators-1.c: Add _Static_assert for valid binary constant with digit separator. * gcc.dg/c23-octal-constants-1.c: New test. * gcc.dg/c23-octal-constants-2.c: New test. * gcc.dg/c2y-digit-separators-1.c: New test. * gcc.dg/c2y-digit-separators-2.c: New test. * gcc.dg/c2y-octal-constants-1.c: New test. * gcc.dg/c2y-octal-constants-2.c: New test. * gcc.dg/c2y-octal-constants-3.c: New test. * gcc.dg/cpp/c23-delimited-escape-seq-1.c: New test. * gcc.dg/cpp/c23-delimited-escape-seq-2.c: New test. * gcc.dg/cpp/c2y-delimited-escape-seq-1.c: New test. * gcc.dg/cpp/c2y-delimited-escape-seq-2.c: New test. * gcc.dg/cpp/c2y-delimited-escape-seq-3.c: New test. * gcc.dg/cpp/c2y-delimited-escape-seq-4.c: New test. * gcc.dg/octal-constants-1.c: New test. * gcc.dg/octal-constants-2.c: New test. * gcc.dg/octal-constants-3.c: New test. * gcc.dg/octal-constants-4.c: New test. * gcc.dg/system-octal-constants-1.c: New test. * gcc.dg/system-octal-constants-1.h: New file.
-
Jakub Jelinek authored
Apparently my c: Speed up compilation of large char array initializers when not using #embed patch broke building glibc. The issue is that when using CPP_EMBED, we are guaranteed by the preprocessor that there is CPP_NUMBER CPP_COMMA before it and CPP_COMMA CPP_NUMBER after it (or CPP_COMMA CPP_EMBED), so RAW_DATA_CST never ends up at the end of arrays of unknown length. Now, the c_parser_initval optimization attempted to preserve that property rather than changing everything that e.g. inferes array number of elements from the initializer etc. to deal with RAW_DATA_CST at the end, but it didn't take into account the possibility that there could be CPP_COMMA followed by CPP_CLOSE_BRACE (where the CPP_COMMA is redundant). As we are peaking already at 4 tokens in that code, peeking more would require using raw tokens and that seems to be expensive doing it for every pair of tokens due to vec_free done when we are out of raw tokens. So, the following patch instead determines the case where we want another INTEGER_CST element after it after consuming the tokens, and just arranges for another process_init_element. 2024-10-17 Jakub Jelinek <jakub@redhat.com> PR c/117177 gcc/c/ * c-parser.cc (c_parser_initval): Instead of doing orig_len == INT_MAX checks before consuming tokens to set last = 1, check it after consuming it and if not followed by CPP_COMMA CPP_NUMBER, call process_init_element once more with the last CPP_NUMBER. gcc/testsuite/ * c-c++-common/init-4.c: New test.
-
Lingling Kong authored
gcc/ChangeLog: * config/i386/sse.md(avx10_2_comsbf16_v8bf): Fixed scalar operands.
-
liuhongt authored
r15-1737-gb06a108f0fbffe lower AVX512 kmask comparison to AVX2 ones, but wrong lowered unsigned comparison to signed ones, for unsigned comparison, only EQ/NEQ can be lowered. The commit fix that. gcc/ChangeLog: PR target/116940 * config/i386/sse.md (*avx2_pcmp<mode>3_7): Change UNSPEC_PCMP_ITER to UNSPEC_PCMP. (*avx2_pcmp<mode>3_8): New pre_reload define_insn_and_splitter. gcc/testsuite/ChangeLog: * gcc.target/i386/pr116940.c: New test.
-
liuhongt authored
Canonicalize (vec_merge (fma: op2 op1 op3) (match_dup 1)) mask) to (vec_merge (fma: op1 op2 op3) (match_dup 1)) mask) For masked FMA, there're 2 forms of RTL representation 1) (vec_merge (fma: op2 op1 op3) op1) mask) 2) (vec_merge (fma: op1 op2 op3) op1) mask) It's because op1 op2 are communatative in RTL(the second op1 is written as (match_dup 1)) we once tried to replace (match_dup 1) with (match_operand:VFH_AVX512VL 5 "nonimmediate_operand" "0,0")), but trigger an ICE in reload(reload can handle at most one operand with "0" constraint). So the patch do the canonicalizaton for the backend part. gcc/ChangeLog: PR target/117072 * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>): Relax predicates of fma operands from register_operand to nonimmediate_operand. (<avx512>_fmadd_<mode>_mask3<round_name>): Ditto. (<avx512>_fmsub_<mode>_mask<round_name>): Ditto. (<avx512>_fmsub_<mode>_mask3<round_name>): Ditto. (<avx512>_fnmadd_<mode>_mask<round_name>): Ditto. (<avx512>_fnmadd_<mode>_mask3<round_name>): Ditto. (<avx512>_fnmsub_<mode>_mask<round_name>): Ditto. (<avx512>_fnmsub_<mode>_mask3<round_name>): Ditto. (<avx512>_fmaddsub_<mode>_mask3<round_name>): Ditto. (<avx512>_fmsubadd_<mode>_mask<round_name>): Ditto. (<avx512>_fmsubadd_<mode>_mask3<round_name>): Ditto. (avx512f_vmfmadd_<mode>_mask<round_name>): Ditto. (avx512f_vmfmadd_<mode>_mask3<round_name>): Ditto. (avx512f_vmfmadd_<mode>_maskz_1<round_name>): Ditto. (*avx512f_vmfmsub_<mode>_mask<round_name>): Ditto. (avx512f_vmfmsub_<mode>_mask3<round_name>): Ditto. (*avx512f_vmfmsub_<mode>_maskz_1<round_name>): Ditto. (avx512f_vmfnmadd_<mode>_mask<round_name>): Ditto. (avx512f_vmfnmadd_<mode>_mask3<round_name>): Ditto. (avx512f_vmfnmadd_<mode>_maskz_1<round_name>): Ditto. (*avx512f_vmfnmsub_<mode>_mask<round_name>): Ditto. (*avx512f_vmfnmsub_<mode>_mask3<round_name>): Ditto. (*avx512f_vmfnmsub_<mode>_maskz_1<round_name>): Ditto. (avx10_2_fmaddnepbf16_<mode>_mask3): Ditto. (avx10_2_fnmaddnepbf16_<mode>_mask3): Ditto. (avx10_2_fmsubnepbf16_<mode>_mask3): Ditto. (avx10_2_fnmsubnepbf16_<mode>_mask3): Ditto. (fmai_vmfmadd_<mode><round_name>): Swap operands[1] and operands[2]. (fmai_vmfmsub_<mode><round_name>): Ditto. (fmai_vmfnmadd_<mode><round_name>): Ditto. (fmai_vmfnmsub_<mode><round_name>): Ditto. (*fmai_fmadd_<mode>): Swap operands[1] and operands[2] adjust operands[1] predicates from register_operand to nonimmediate_operand. (*fmai_fmsub_<mode>): Ditto. (*fmai_fnmadd_<mode><round_name>): Ditto. (*fmai_fnmsub_<mode><round_name>): Ditto.
-
liuhongt authored
For x86 masked fma, there're 2 rtl representations 1) (vec_merge (fma op2 op1 op3) op1 mask) 2) (vec_merge (fma op1 op2 op3) op1 mask). 5894(define_insn "<avx512>_fmadd_<mode>_mask<round_name>" 5895 [(set (match_operand:VFH_AVX512VL 0 "register_operand" "=v,v") 5896 (vec_merge:VFH_AVX512VL 5897 (fma:VFH_AVX512VL 5898 (match_operand:VFH_AVX512VL 1 "nonimmediate_operand" "0,0") 5899 (match_operand:VFH_AVX512VL 2 "<round_nimm_predicate>" "<round_constraint>,v") 5900 (match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>")) 5901 (match_dup 1) 5902 (match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))] 5903 "TARGET_AVX512F && <round_mode_condition>" 5904 "@ 5905 vfmadd132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>} 5906 vfmadd213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}" 5907 [(set_attr "type" "ssemuladd") 5908 (set_attr "prefix" "evex") 5909 (set_attr "mode" "<MODE>")]) Here op1 has constraint "0", and the scecond op1 is (match_dup 1), we once tried to replace it with (match_operand:M 5 "nonimmediate_operand" "0")) to enable more flexibility for pattern match and recog, but it triggered an ICE in reload(reload can handle at most one perand with "0" constraint). So we need either add 2 patterns in the backend or just do the canonicalization in the middle-end. gcc/ChangeLog: PR middle-end/117072 * combine.cc (maybe_swap_commutative_operands): Canonicalize (vec_merge (fma op2 op1 op3) op1 mask) to (vec_merge (fma op1 op2 op3) op1 mask).
-
Cui, Lili authored
Add new andn pattern to match the new optab added by r15-1890-gf379596e0ba99d. Only enable 64bit, 128bit and 256bit vector ANDN, X86-64 has mask mov instruction when avx512 is enabled. gcc/ChangeLog: * config/i386/sse.md (andn<mode>3): New. * config/i386/mmx.md (andn<mode>3): New. gcc/testsuite/ChangeLog: * g++.target/i386/vect-cmp.C: New test.
-
- Oct 16, 2024
-
-
Siddhesh Poyarekar authored
When wholesize != size, there is a reasonable opportunity for static object sizes also to be computed using size_for_offset, so use that. gcc/ChangeLog: * tree-object-size.cc (plus_stmt_object_size): Call SIZE_FOR_OFFSET for some negative offset cases. gcc/testsuite/ChangeLog: * gcc.dg/builtin-object-size-3.c (test9): Adjust test. * gcc.dg/builtin-object-size-4.c (test8): Likewise. Signed-off-by:
Siddhesh Poyarekar <siddhesh@gotplt.org>
-
Christophe Lyon authored
This patch makes the non-predicated vdupq_n MVE intrinsics use vec_duplicate rather than an unspec. This enables the compiler to generate better code sequences (for instance using vmov when possible). The patch renames the existing mve_vdup<mode> pattern into @mve_vdupq_n<mode>, and removes the now useless @mve_<mve_insn>q_n_f<mode> and @mve_<mve_insn>q_n_<supf><mode> ones. As a side-effect, it needs to update the mve_unpredicated_insn predicates in @mve_<mve_insn>q_m_n_<supf><mode> and @mve_<mve_insn>q_m_n_f<mode>. Using vec_duplicates means the compiler is now able to use vmov in the tests with an immediate argument in vdupq_n_[su]{8,16,32}.c: vmov.i8 q0,#0x1 However, this is only possible when the immediate has a suitable value (MVE encoding constraints, see imm_for_neon_mov_operand predicate). Provided we adjust the cost computations in arm_rtx_costs_internal(), when the immediate does not meet the vmov constraints, we now generate: mov r0, #imm vdup.xx q0,r0 or ldr r0, .L4 vdup.32 q0,r0 in the f32 case (with 1.1 as immediate). Without the cost adjustment, we would generate: vldr.64 d0, .L4 vldr.64 d1, .L4+8 and an associated literal pool entry. Regarding the testsuite updates: -------------------------------- * The signed versions of vdupq_* tests lack a version with an immediate argument. This patch adds them, similar to what we already have for vdupq_n_u*.c tests. * Code generation for different immediate values is checked with the new tests this patch introduces. Note there's no need for s8/u8 tests because 8-bit immediates always comply wth imm_for_neon_mov_operand. * We can remove xfail from vcmp*f tests since we now generate: movw r3, #15462 vcmp.f16 eq, q0, r3 instead of the previous: vldr.64 d6, .L5 vldr.64 d7, .L5+8 vcmp.f16 eq, q0, q3 Tested on arm-linux-gnueabihf and arm-none-eabi with no regression. 2024-07-02 Jolen Li <jolen.li@arm.com> Christophe Lyon <christophe.lyon@arm.com> gcc/ * config/arm/arm-mve-builtins-base.cc (vdupq_impl): New class. (vdupq): Use new implementation. * config/arm/arm.cc (arm_rtx_costs_internal): Handle HFmode for COST_DOUBLE. Update costing for CONST_VECTOR. * config/arm/arm_mve_builtins.def: Merge vdupq_n_f, vdupq_n_s and vdupq_n_u into vdupq_n. * config/arm/mve.md (mve_vdup<mode>): Rename into ... (@mve_vdup_n<mode>): ... this. (@mve_<mve_insn>q_n_f<mode>): Delete. (@mve_<mve_insn>q_n_<supf><mode>): Delete.. (@mve_<mve_insn>q_m_n_<supf><mode>): Update mve_unpredicated_insn attribute. (@mve_<mve_insn>q_m_n_f<mode>): Likewise. gcc/testsuite/ * gcc.target/arm/mve/intrinsics/vdupq_n_u8.c (foo1): Update expected code. * gcc.target/arm/mve/intrinsics/vdupq_n_u16.c (foo1): Likewise. * gcc.target/arm/mve/intrinsics/vdupq_n_u32.c (foo1): Likewise. * gcc.target/arm/mve/intrinsics/vdupq_n_s8.c: Add test with immediate argument. * gcc.target/arm/mve/intrinsics/vdupq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_n_f16.c (foo1): Update expected code. * gcc.target/arm/mve/intrinsics/vdupq_n_f32.c (foo1): Likewise. * gcc.target/arm/mve/intrinsics/vdupq_m_n_s16.c: Add test with immediate argument. * gcc.target/arm/mve/intrinsics/vdupq_m_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_m_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_x_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_x_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_x_n_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vdupq_n_f32-2.c: New test. * gcc.target/arm/mve/intrinsics/vdupq_n_s16-2.c: New test. * gcc.target/arm/mve/intrinsics/vdupq_n_s32-2.c: New test. * gcc.target/arm/mve/intrinsics/vdupq_n_u16-2.c: New test. * gcc.target/arm/mve/intrinsics/vdupq_n_u32-2.c: New test. * gcc.target/arm/mve/intrinsics/vcmpeqq_n_f16.c: Remove xfail. * gcc.target/arm/mve/intrinsics/vcmpeqq_n_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpgeq_n_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpgeq_n_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpgtq_n_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpgtq_n_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpleq_n_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpleq_n_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpltq_n_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpltq_n_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpneq_n_f16.c: Likewise. * gcc.target/arm/mve/intrinsics/vcmpneq_n_f32.c: Likewise.
-
Christophe Lyon authored
This patch fixes a bug where the mode iterator for mve_vdup<mode> should be MVE_VLD_ST instead of MVE_vecs: V2DI and V2DF (thus vdup.64) are not supported by MVE. 2024-07-02 Jolen Li <jolen.li@arm.com> Christophe Lyon <christophe.lyon@arm.com> gcc/ * config/arm/mve.md (mve_vdup<mode>): Fix mode iterator.
-
David Malcolm authored
This patch makes the SARIF output's crash handler attempt to capture a backtrace in JSON form within the notification's property bag. The precise format of the property is subject to change, but, for example, in one of the test cases I got output like this: "properties": {"gcc/backtrace": {"frames": [{"pc": "0x7f39c610a32d", "function": "pass_crash_test::execute(function*)", "filename": "/home/david/gcc-newgit/src/gcc/testsuite/gcc.dg/plugin/crash_test_plugin.c", "lineno": 98}]}}}], The backtrace code is based on that in diagnostic.cc. gcc/ChangeLog: PR other/116602 * diagnostic-format-sarif.cc: Include "demangle.h" and "backtrace.h". (sarif_invocation::add_notification_for_ice): Add "backtrace" param and pass it to ctor. (sarif_ice_notification::sarif_ice_notification): Add "backtrace" param and add it to property bag. (bt_stop): New, taken from diagnostic.cc. (struct bt_closure): New. (bt_callback): New, adapted from diagnostic.cc. (sarif_builder::make_stack_from_backtrace): New. (sarif_builder::on_report_diagnostic): Attempt to get backtrace and pass it to add_notification_for_ice. gcc/testsuite/ChangeLog: PR other/116602 * gcc.dg/plugin/crash-test-ice-in-header-sarif-2_1.py: Add check for backtrace. * gcc.dg/plugin/crash-test-ice-in-header-sarif-2_2.py: Likewise. Signed-off-by:
David Malcolm <dmalcolm@redhat.com>
-
David Malcolm authored
No functional change intended. gcc/ChangeLog: PR other/116613 * diagnostic-format-sarif.cc (sarif_builder::on_report_diagnostic): Move the fnotice here from sarif_ice_handler. (sarif_ice_handler): Delete. (diagnostic_output_format_init_sarif): Drop setting of ice handler callback. * diagnostic.cc (diagnostic_context::initialize): Likewise. (diagnostic_context::action_after_output): Rather than call m_ice_handler_cb, instead call finish on this context. * diagnostic.h (ice_handler_callback_t): Delete typedef. (diagnostic_context::set_ice_handler_callback): Delete. (diagnostic_context::m_ice_handler_cb): Delete. gcc/testsuite/ChangeLog: PR other/116613 * gcc.dg/plugin/diagnostic_plugin_xhtml_format.c: Update for removal of ICE callback. Signed-off-by:
David Malcolm <dmalcolm@redhat.com>
-
Joseph Myers authored
Now that C23 support is essentially feature-complete, I'd like to switch the default language version for C compilation to -std=gnu23. This requires updating a large number of testcases that fail with the new language version if left unchanged. In this patch, update most of the tests for which there is a safe change that works both before and after the update to default language version - typically adding the option -std=gnu17 or -Wno-old-style-definition to the tests. (There are also a few tests where I'd like to investigate further why they fail with -std=gnu23, or where I think such failures show an actual bug to fix before changing the default language version, or where it seems more appropriate to make a testcase change that would result in failures in the absence of the language version change rather than just adding an option that does nothing with the gnu17 default.) The libffi test fixes have also been submitted upstream: <https://github.com/libffi/libffi/pull/861>. Most of the failures requiring such changes are for one of two reasons: * Unprototyped function declarations with () (meaning the same as (void) in C23 mode) for a function then called with arguments. * Old-style function definitions, which warn by default in C23 mode, so resulting in test failures for the unexpected warnings. Other reasons for failures include: * Tests with their own definitions of bool, true and false. * Tests of diagnostics (often with -pedantic) in cases where C23 has changed semantics, such as: - tag compatibility for structs; - enum values out of range of int; - handing of qualified array types; - decimal floating types formerly needing -pedantic diagnostics, but being standard in C23. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/testsuite/ * c-c++-common/Wcast-function-type.c: Add -std=gnu17 for C. * c-c++-common/Wformat-pr84258.c: Add -std=gnu17 for C. * c-c++-common/Wvarargs.c: Add -std=gnu17 for C. * c-c++-common/analyzer/data-model-12.c: Add -std=gnu17 for C. * c-c++-common/builtins.c: Add -std=gnu17 for C. * c-c++-common/pointer-to-fn1.c: Add -std=gnu17 for C. * c-c++-common/pragma-diag-17.c: Add -std=gnu17 for C. * c-c++-common/sizeof-array-argument.c: Add -Wno-old-style-definition for C. * g++.dg/lto/pr54625-1_0.c: Add -std=gnu17. * g++.dg/lto/pr54625-2_0.c: Add -std=gnu17. * gcc.c-torture/compile/20040214-2.c: Add -std=gnu17. * gcc.c-torture/compile/921011-2.c: Add -std=gnu17. * gcc.c-torture/compile/931102-1.c: Add -std=gnu17. * gcc.c-torture/compile/990801-1.c: Add -std=gnu17. * gcc.c-torture/compile/nested-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr100241-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr106101.c: Add -std=gnu17. * gcc.c-torture/compile/pr113616.c: Add -std=gnu17. * gcc.c-torture/compile/pr47967.c: Add -std=gnu17. * gcc.c-torture/compile/pr51694.c: Add -std=gnu17. * gcc.c-torture/compile/pr71109.c: Add -std=gnu17. * gcc.c-torture/compile/pr83051-2.c: Add -std=gnu17. * gcc.c-torture/compile/pr89663-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr94238.c: Add -std=gnu17. * gcc.c-torture/compile/pr96796.c: Add -std=gnu17. * gcc.c-torture/compile/pr97576.c: Add -std=gnu17. * gcc.c-torture/compile/udivmod4.c: Add -std=gnu17. * gcc.c-torture/execute/20010605-2.c: Add -std=gnu17. * gcc.c-torture/execute/20020404-1.c: Add -std=gnu17. * gcc.c-torture/execute/20030714-1.c: Add -std=gnu17. * gcc.c-torture/execute/20051012-1.c: Add -std=gnu17. * gcc.c-torture/execute/20190820-1.c: Add -std=gnu17. * gcc.c-torture/execute/920612-1.c: Add -Wno-old-style-definition. * gcc.c-torture/execute/930608-1.c: Add -std=gnu17. * gcc.c-torture/execute/comp-goto-1.c: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-1.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-2.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-3.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-4.x: New file. * gcc.c-torture/execute/ieee/fp-cmp-4f.x: New file. * gcc.c-torture/execute/ieee/fp-cmp-4l.x: New file. * gcc.c-torture/execute/loop-9.c: Add -std=gnu17. * gcc.c-torture/execute/pr103209.c: Add -std=gnu17. * gcc.c-torture/execute/pr28289.c: Add -std=gnu17. * gcc.c-torture/execute/pr34982.c: Add -std=gnu17. * gcc.c-torture/execute/pr67037.c: Add -std=gnu17. * gcc.c-torture/execute/va-arg-2.c: Add -std=gnu17. * gcc.dg/20010202-1.c: Add -std=gnu17. * gcc.dg/20020430-1.c: Add -std=gnu17. * gcc.dg/20031218-3.c: Add -std=gnu17. * gcc.dg/20040127-1.c: Add -std=gnu17. * gcc.dg/20041014-1.c: Add -Wno-old-style-definition. * gcc.dg/20041122-1.c: Add -std=gnu17. * gcc.dg/20050309-1.c: Add -std=gnu17. * gcc.dg/20061026.c: Add -std=gnu17. * gcc.dg/20101010-1.c: Add -std=gnu17. * gcc.dg/Warray-parameter-10.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-2.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-3.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-4.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-5.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch.c: Add -std=gnu17. * gcc.dg/Wcxx-compat-2.c: Add -std=gnu17. * gcc.dg/Wdouble-promotion.c: Add -std=gnu17. * gcc.dg/Wfree-nonheap-object-7.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-1.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-1a.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-2.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-3.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-4.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-4a.c: Add -std=gnu17. * gcc.dg/Wincompatible-pointer-types-1.c: Add -std=gnu17. * gcc.dg/Wrestrict-19.c: Add -std=gnu17. * gcc.dg/Wrestrict-4.c: Add -std=gnu17. * gcc.dg/Wrestrict-5.c: Add -std=gnu17. * gcc.dg/Wstrict-overflow-20.c: Add -std=gnu17. * gcc.dg/Wstringop-overflow-13.c: Add -std=gnu17. * gcc.dg/analyzer/doom-d_main-IdentifyVersion.c: Add -std=gnu17. * gcc.dg/analyzer/doom-s_sound-pr108867.c: Add -std=gnu17. * gcc.dg/analyzer/pr93032-mztools-signed-char.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93355-localealias.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93375.c: Add -std=gnu17. * gcc.dg/analyzer/pr94688.c: Add -std=gnu17. * gcc.dg/analyzer/sensitive-1.c: Add -std=gnu17. * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c: Add -std=gnu17. * gcc.dg/analyzer/torture/pr104863.c: Add -std=gnu17. * gcc.dg/analyzer/torture/pr93379.c: Add -std=gnu17. * gcc.dg/array-quals-2.c: Add -std=gnu17. * gcc.dg/attr-invalid.c: Add -Wno-old-style-definition. * gcc.dg/auto-init-uninit-A.c: Add -Wno-old-style-definition. * gcc.dg/builtin-choose-expr.c: Declare exit with (int) prototype. * gcc.dg/builtin-tgmath-err-1.c: Add -std=gnu17. * gcc.dg/builtins-30.c: Add -std=gnu17. * gcc.dg/cast-function-1.c: Add -std=gnu17. * gcc.dg/cleanup-1.c: Add -std=gnu17. * gcc.dg/compat/struct-complex-1_x.c: Add -std=gnu17. * gcc.dg/compat/struct-complex-2_x.c: Add -std=gnu17. * gcc.dg/compat/union-m128-1_x.c: Add -std=gnu17. * gcc.dg/debug/dwarf2/pr66482.c: Add -std=gnu17. * gcc.dg/dfp/composite-type-2.c: Add -std=gnu17. * gcc.dg/dfp/composite-type.c: Add -std=gnu17. * gcc.dg/dfp/keywords-pedantic.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-1.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-2.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-3.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-4.c: Add -std=gnu17. * gcc.dg/enum-compat-1.c: Add -std=gnu17. * gcc.dg/enum-compat-2.c: Add -std=gnu17. * gcc.dg/floatn-errs.c: Add -std=gnu17. * gcc.dg/fltconst-pedantic-dfp.c: Add -std=gnu17. * gcc.dg/format/proto.c: Add -std=gnu17. * gcc.dg/format/sentinel-1.c: Add -std=gnu17. * gcc.dg/gomp/declare-simd-1.c: Add -Wno-old-style-definition. * gcc.dg/ifelse-1.c: Add -Wno-old-style-definition. * gcc.dg/inline-33.c: Add -std=gnu17. * gcc.dg/ipa/inline-5.c: Add -std=gnu17. * gcc.dg/ipa/ipa-sra-21.c: Add -std=gnu17. * gcc.dg/ipa/pr102714.c: Add -std=gnu17. * gcc.dg/ipa/pr104813.c: Add -std=gnu17. * gcc.dg/ipa/pr108679.c: Add -std=gnu17. * gcc.dg/ipa/pr42706.c: Add -std=gnu17. * gcc.dg/ipa/pr88214.c: Add -Wno-old-style-definition. * gcc.dg/ipa/pr91853.c: Add -Wno-old-style-definition. * gcc.dg/ipa/pr93763.c: Add -std=gnu17. * gcc.dg/ipa/pr96482-2.c: Add -std=gnu17. * gcc.dg/lto/20091013-1_2.c: Add -std=gnu17. * gcc.dg/lto/20091015-1_2.c: Add -std=gnu17. * gcc.dg/lto/pr113197_1.c: Add -std=gnu17. * gcc.dg/lto/pr54702_1.c: Add -std=gnu17. * gcc.dg/lto/pr99849_0.c: Add -std=gnu17. * gcc.dg/noncompile/920923-1.c: Add -std=gnu17. * gcc.dg/noncompile/old-style-parm-1.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/old-style-parm-3.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr30552-2.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr30552-3.c: Add -std=gnu17. * gcc.dg/noncompile/pr71265.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr79758-2.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr79758.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/va-arg-1.c: Add -std=gnu17. * gcc.dg/old-style-prom-1.c: Add -std=gnu17. * gcc.dg/old-style-prom-2.c: Add -std=gnu17. * gcc.dg/old-style-prom-3.c: Add -std=gnu17. * gcc.dg/old-style-then-proto-1.c: Add -std=gnu17. * gcc.dg/parm-incomplete-1.c: Add -std=gnu17. * gcc.dg/parm-mismatch-1.c: Add -std=gnu17. * gcc.dg/permerror-default.c: Add -std=gnu17. * gcc.dg/permerror-fpermissive-nowarning.c: Add -std=gnu17. * gcc.dg/permerror-fpermissive.c: Add -std=gnu17. * gcc.dg/permerror-noerror.c: Add -std=gnu17. * gcc.dg/permerror-nowarning.c: Add -std=gnu17. * gcc.dg/permerror-pedantic.c: Add -std=gnu17. * gcc.dg/plugin/infoleak-net-ethtool-ioctl.c: Add -std=gnu17. * gcc.dg/pointer-array-quals-1.c: Add -std=gnu17. * gcc.dg/pointer-array-quals-2.c: Add -std=gnu17. * gcc.dg/pr100791.c: Add -std=gnu17. * gcc.dg/pr100843.c: Add -std=gnu17. * gcc.dg/pr102273.c: Add -std=gnu17. * gcc.dg/pr102385.c: Add -std=gnu17. * gcc.dg/pr103222.c: Add -std=gnu17. * gcc.dg/pr105140.c: Add -std=gnu17. * gcc.dg/pr105150.c: Add -std=gnu17. * gcc.dg/pr105250.c: Add -std=gnu17. * gcc.dg/pr105972.c: Add -Wno-old-style-definition. * gcc.dg/pr111039.c: Add -std=gnu17. * gcc.dg/pr111407.c: Add -std=gnu17. * gcc.dg/pr111922.c: Add -Wno-old-style-definition. * gcc.dg/pr15236.c: Add -std=gnu17. * gcc.dg/pr17188-1.c: Add -std=gnu17. * gcc.dg/pr20368-1.c: Add -std=gnu17. * gcc.dg/pr20368-2.c: Add -std=gnu17. * gcc.dg/pr20368-3.c: Add -std=gnu17. * gcc.dg/pr27331.c: Add -Wno-old-style-definition. * gcc.dg/pr27861-1.c: Add -std=gnu17. * gcc.dg/pr28121.c: Add -std=gnu17. * gcc.dg/pr28243.c: Add -std=gnu17. * gcc.dg/pr28888.c: Add -std=gnu17. * gcc.dg/pr29254.c: Add -std=gnu17. * gcc.dg/pr34457-1.c: Add -std=gnu17. * gcc.dg/pr36015.c: Add -std=gnu17. * gcc.dg/pr38245-3.c: Add -std=gnu17. * gcc.dg/pr38245-4.c: Add -std=gnu17. * gcc.dg/pr41241.c: Add -std=gnu17. * gcc.dg/pr43058.c: Add -std=gnu17. * gcc.dg/pr44539.c: Add -std=gnu17. * gcc.dg/pr45055.c: Add -std=gnu17. * gcc.dg/pr50908.c: Add -Wno-old-style-definition. * gcc.dg/pr60647-1.c: Add -Wno-old-style-definition. * gcc.dg/pr63762.c: Add -std=gnu17. * gcc.dg/pr63804.c: Add -std=gnu17. * gcc.dg/pr68306-3.c: Add -std=gnu17. * gcc.dg/pr68533.c: Add -std=gnu17. * gcc.dg/pr69156.c: Add -std=gnu17. * gcc.dg/pr7356-2.c: Add -Wno-old-style-definition. * gcc.dg/pr79983.c: Add -std=gnu17. * gcc.dg/pr83463.c: Add -std=gnu17. * gcc.dg/pr87347.c: Add -std=gnu17. * gcc.dg/pr89521-1.c: Add -std=gnu17. * gcc.dg/pr89521-2.c: Add -std=gnu17. * gcc.dg/pr90648.c: Add -std=gnu17. * gcc.dg/pr93573-1.c: Add -std=gnu17. * gcc.dg/pr94167.c: Add -std=gnu17. * gcc.dg/pr94705.c: Add -std=gnu17. * gcc.dg/pr95118.c: Add -std=gnu17. * gcc.dg/pr96335.c: Add -std=gnu17. * gcc.dg/pr97830.c: Add -std=gnu17. * gcc.dg/pr97882.c: Add -std=gnu17. * gcc.dg/pr99122-2.c: Add -std=gnu17. * gcc.dg/pr99122-3.c: Add -std=gnu17. * gcc.dg/qual-component-1.c: Add -std=gnu17. * gcc.dg/sibcall-6.c: Add -Wno-old-style-definition. * gcc.dg/sms-2.c: Add -Wno-old-style-definition. * gcc.dg/tm/20091221.c: Add -std=gnu17. * gcc.dg/torture/bfloat16-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float128-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float128x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float16-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float32-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float32x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float64-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float64x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr102762.c: Add -std=gnu17. * gcc.dg/torture/pr103987.c: Add -std=gnu17. * gcc.dg/torture/pr104825.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr105166.c: Add -std=gnu17. * gcc.dg/torture/pr105185.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr109652.c: Add -std=gnu17. * gcc.dg/torture/pr112444.c: Add -std=gnu17. * gcc.dg/torture/pr113895-3.c: Add -std=gnu17. * gcc.dg/torture/pr24626-2.c: Add -std=gnu17. * gcc.dg/torture/pr25183.c: Add -std=gnu17. * gcc.dg/torture/pr38948.c: Add -std=gnu17. * gcc.dg/torture/pr44807.c: Add -std=gnu17. * gcc.dg/torture/pr47281.c: Add -std=gnu17. * gcc.dg/torture/pr47958-1.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr48063.c: Add -std=gnu17. * gcc.dg/torture/pr57036-1.c: Add -std=gnu17. * gcc.dg/torture/pr57330.c: Add -std=gnu17. * gcc.dg/torture/pr57584.c: Add -std=gnu17. * gcc.dg/torture/pr67741.c: Add -std=gnu17. * gcc.dg/torture/pr68104.c: Add -std=gnu17. * gcc.dg/torture/pr69242.c: Add -std=gnu17. * gcc.dg/torture/pr70457.c: Add -std=gnu17. * gcc.dg/torture/pr70985.c: Add -std=gnu17. * gcc.dg/torture/pr71606.c: Add -std=gnu17. * gcc.dg/torture/pr71816.c: Add -std=gnu17. * gcc.dg/torture/pr77286.c: Add -std=gnu17. * gcc.dg/torture/pr77646.c: Add -std=gnu17. * gcc.dg/torture/pr77677-2.c: Add -std=gnu17. * gcc.dg/torture/pr78365.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr79732.c: Add -std=gnu17. * gcc.dg/torture/pr80612.c: Add -std=gnu17. * gcc.dg/torture/pr80764.c: Add -std=gnu17. * gcc.dg/torture/pr80842.c: Add -std=gnu17. * gcc.dg/torture/pr81900.c: Add -std=gnu17. * gcc.dg/torture/pr82276.c: Add -std=gnu17. * gcc.dg/torture/pr84803.c: Add -std=gnu17. * gcc.dg/torture/pr93124.c: Add -std=gnu17. * gcc.dg/torture/pr97330-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-prof/comp-goto-1.c: Add -std=gnu17. * gcc.dg/tree-ssa/20030703-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030708-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030709-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030709-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030710-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030714-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030714-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030728-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-10.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-11.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-6.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-7.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-4.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-5.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-6.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030918-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20040514-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/loadpre7.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/pr111003.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr115128.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr115191.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr24840.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr69666.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr70232.c: Add -std=gnu17. * gcc.dg/ubsan/pr79757-1.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr79757-2.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr79757-3.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr81223.c: Add -std=gnu17. * gcc.dg/uninit-10-O0.c: Add -Wno-old-style-definition. * gcc.dg/uninit-10.c: Add -Wno-old-style-definition. * gcc.dg/uninit-32.c: Add -std=gnu17. * gcc.dg/uninit-41.c: Add -std=gnu17. * gcc.dg/uninit-A-O0.c: Add -Wno-old-style-definition. * gcc.dg/uninit-A.c: Add -Wno-old-style-definition. * gcc.dg/unused-1.c: Add -Wno-old-style-definition. * gcc.dg/vect/bb-slp-pr114249.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-pr97486.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-1.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-2.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-3.c: Add -std=gnu17. * gcc.dg/vect/vect-early-break_111-pr113731.c: Add -std=gnu17. * gcc.dg/vect/vect-early-break_122-pr114239.c: Add -std=gnu17. * gcc.dg/vect/vect-multi-peel-gaps.c: Add -std=gnu17. * gcc.dg/vla-stexp-2.c: Add -std=gnu17. * gcc.dg/warn-1.c: Add -Wno-old-style-definition. * gcc.dg/winline-10.c: Add -Wno-old-style-definition. * gcc.dg/wtr-label-1.c: Add -Wno-old-style-definition. * gcc.dg/wtr-switch-1.c: Add -Wno-old-style-definition. * gcc.target/i386/excess-precision-3.c: Add -Wno-old-style-definition. * gcc.target/i386/fma4-256-nmsubXX.c: Add -std=gnu17. * gcc.target/i386/fma4-nmsubXX.c: Add -std=gnu17. * gcc.target/i386/nop-mcount.c: Add -Wno-old-style-definition. * gcc.target/i386/pr102627.c: Add -std=gnu17. * gcc.target/i386/pr106994.c: Add -std=gnu17. * gcc.target/i386/pr68349.c: Add -std=gnu17. * gcc.target/i386/pr97313.c: Add -std=gnu17. * gcc.target/i386/pr99454.c: Add -std=gnu17. * gcc.target/i386/record-mcount.c: Add -Wno-old-style-definition. libffi/ * testsuite/libffi.call/va_struct2.c (test_fn): Cast n to void. * testsuite/libffi.call/va_struct3.c (test_fn): Likewise. Backported from <https://github.com/libffi/libffi/pull/861>.
-
Jakub Jelinek authored
Jonathan mentioned an unnamed static analyzer reported issue in c_finish_bc_name. It is actually a false positive, because the construction of the loop_names vector guarantees that the last element of the vector (if the vector is non-empty) always has either C_DECL_LOOP_NAME (l) or C_DECL_SWITCH_NAME (l) (or both) flags set, so c will be always non-NULL after the if at the start of the loops. The following patch is an attempt to help those static analyzers (though dunno if it actually helps), by adding a checking assert. 2024-10-16 Jakub Jelinek <jakub@redhat.com> * c-decl.cc (c_get_loop_names): Add checking assert that c is non-NULL in the loop. (c_finish_bc_name): Likewise.
-
Jakub Jelinek authored
Jonathan pointed me at a diagnostic from an unnamed static analyzer which found that next.original_type isn't initialized for the CPP_EMBED case when it is parsed in a comma expression, yet expr.original_type = next.original_type; is done a few lines later and the expr is returned. 2024-10-16 Jakub Jelinek <jakub@redhat.com> * c-parser.cc (c_parser_expression): Initialize next.original_type to integer_type_node for the CPP_EMBED case.
-
Tobias Burnus authored
Kind of undoes r15-4315-g9f549d216c9716 by adding the original testcase back; namely, adding acc_on_device-1-3.f as acc_on_device-1-4.f with -fno-builtin-acc_on_device removed. libgomp/ChangeLog: * testsuite/libgomp.oacc-fortran/acc_on_device-1-4.f: New test; same as acc_on_device-1-3.f but using the builtin function.
-
Andi Kleen authored
Passes test suite. Ok to commit? gcc/ChangeLog: PR middle-end/116510 * tree-if-conv.cc (predicate_bbs): Add missing fold_converts. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-switch-ifcvt-3.c: New test.
-
Jakub Jelinek authored
While working on PR117028 C2Y changes, I've noticed weird ternary operator formatting (operand1 ? operand2: operand3). The usual formatting is operand1 ? operand2 : operand3 where we have around 18000+ cases of that (counting only what fits on one line) and indent -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj \ -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob documented in https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting does the same. Some code was even trying to save space as much as possible and used operand1?operand2:operand3 or operand1 ? operand2:operand3 Today I've grepped for such cases (the grep was '?.*[^ ]:' and I had to skim through various false positives with that where the : matched e.g. stuff inside of strings, or *.md pattern macros or :: scope) and the following patch is a fix for what I found. 2024-10-16 Jakub Jelinek <jakub@redhat.com> gcc/ * attribs.cc (lookup_scoped_attribute_spec): ?: operator formatting fixes. * basic-block.h (FOR_BB_INSNS_SAFE): Likewise. * cfgcleanup.cc (outgoing_edges_match): Likewise. * cgraph.cc (cgraph_node::dump): Likewise. * config/arc/arc.cc (gen_acc1, gen_acc2): Likewise. * config/arc/arc.h (CLASS_MAX_NREGS, CONSTANT_ADDRESS_P): Likewise. * config/arm/arm.cc (arm_print_operand): Likewise. * config/cris/cris.md (*b<rnzcond:code><mode>): Likewise. * config/darwin.cc (darwin_asm_declare_object_name, darwin_emit_common): Likewise. * config/darwin-driver.cc (darwin_driver_init): Likewise. * config/epiphany/epiphany.md (call, sibcall, call_value, sibcall_value): Likewise. * config/i386/i386.cc (gen_push2): Likewise. * config/i386/i386.h (ix86_cur_cost): Likewise. * config/i386/openbsdelf.h (FUNCTION_PROFILER): Likewise. * config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins): Likewise. * config/loongarch/loongarch-cpu.cc (fill_native_cpu_config): Likewise. * config/riscv/riscv.cc (riscv_union_memmodels): Likewise. * config/riscv/zc.md (*mva01s<X:mode>, *mvsa01<X:mode>): Likewise. * config/rs6000/mmintrin.h (_mm_cmpeq_pi8, _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32, _mm_cmpgt_pi32): Likewise. * config/v850/predicates.md (pattern_is_ok_for_prologue): Likewise. * config/xtensa/constraints.md (d, C, W): Likewise. * coverage.cc (coverage_begin_function, build_init_ctor, build_gcov_exit_decl): Likewise. * df-problems.cc (df_create_unused_note): Likewise. * diagnostic.cc (diagnostic_set_caret_max_width): Likewise. * diagnostic-path.cc (path_summary::path_summary): Likewise. * expr.cc (expand_expr_divmod): Likewise. * gcov.cc (format_gcov): Likewise. * gcov-dump.cc (dump_gcov_file): Likewise. * genmatch.cc (main): Likewise. * incpath.cc (remove_duplicates, register_include_chains): Likewise. * ipa-devirt.cc (dump_odr_type): Likewise. * ipa-icf.cc (sem_item_optimizer::merge_classes): Likewise. * ipa-inline.cc (inline_small_functions): Likewise. * ipa-polymorphic-call.cc (ipa_polymorphic_call_context::dump): Likewise. * ipa-sra.cc (create_parameter_descriptors): Likewise. * ipa-utils.cc (find_always_executed_bbs): Likewise. * predict.cc (predict_loops): Likewise. * selftest.cc (read_file): Likewise. * sreal.h (SREAL_SIGN, SREAL_ABS): Likewise. * tree-dump.cc (dequeue_and_dump): Likewise. * tree-ssa-ccp.cc (bit_value_binop): Likewise. gcc/c-family/ * c-opts.cc (c_common_init_options, c_common_handle_option, c_common_finish, set_std_c89, set_std_c99, set_std_c11, set_std_c17, set_std_c23, set_std_cxx98, set_std_cxx11, set_std_cxx14, set_std_cxx17, set_std_cxx20, set_std_cxx23, set_std_cxx26): ?: operator formatting fixes. gcc/cp/ * search.cc (lookup_member): ?: operator formatting fixes. * typeck.cc (cp_build_modify_expr): Likewise. libcpp/ * expr.cc (interpret_float_suffix): ?: operator formatting fixes.
-
Eric Botcazou authored
The 'U' constraint cannot be used with LRA. gcc/ PR target/113952 PR target/117168 * config/sparc/constraints.md ('U'): Delete. * config/sparc/sparc.md (*movdi_insn_sp32): Remove U alternatives. (*movdf_insn_sp32): Likewise. (*mov<VM64:mode>_insn_sp32): Likewise. * doc/md.texi (SPARC constraints): Remove entry for 'U'.
-
GCC Administrator authored
-
Richard Biener authored
With SLP forced we fail to use gather for PR65518 on RISC-V as expected because we're failing due to not effective peeling for gaps. The following appropriately moves the memory_access_type adjustment before doing all the overrun checking since using VMAT_ELEMENTWISE means there's no overrun. * tree-vect-stmts.cc (get_group_load_store_type): Move VMAT_ELEMENTWISE fallback for single-element interleaving of too large groups before overrun checking. * gcc.dg/vect/pr65518.c: Adjust.
-
Richard Biener authored
The following is a more complete fix for PR117050, restoring the ability to permute non-grouped .MASK_LOAD with. PR tree-optimization/117050 * tree-vect-slp.cc (vect_build_slp_tree_2): Properly handle non-grouped masked loads when handling permutations.
-
Richard Biener authored
The following prepares us for SLP instances with a non-uniform number of lanes. We already have this with load permutation lowering, but we managed to keep that within the constraints of the per SLP instance computed VF based on its max_nunits (with a vector type fixed for each node) and the instance group size which is the number of lanes in the SLP instance root. But in the case where arbitrary splitting and merging SLP nodes at non-power-of-two lane boundaries is allowed this simple calculation based on the outgoing group size falls apart. The following, instead of computing a VF during SLP instance discovery, computes it at vect_make_slp_decision time by walking the SLP graph and looking at each SLP node in isolation. We do track max_nunits per node which could be a VF per node instead or forgo with both completely (though for BB vectorization we need to communicate a VF > 1 requirement upward, or compute that after the fact). In the end we'd like to delay vector type assignment and only compute a minimum VF here, allowing vector types to grow when the actual VF is bigger. There's slight complication with permutes of externs / constants as those get their vector type (and thus max_nunits) assigned late. While we force them to have the same vector type as the result at the moment their number of lanes can differ. So those get handled explicitly there right now to up the VF as needed - the alternative is to fail vectorization, I have an addition to vect_maybe_update_slp_op_vectype that would FAIL if the set vector type isn't within the constraints of the VF. * tree-vectorizer.h (SLP_INSTANCE_UNROLLING_FACTOR): Remove. (slp_instance::unrolling_factor): Likewise. * tree-vect-slp.cc (vect_build_slp_instance): Do not set SLP_INSTANCE_UNROLLING_FACTOR. Remove then dead code. Compute and set max_nunits from the RHS nodes merged. (vect_update_slp_vf_for_node): New function. (vect_make_slp_decision): Use vect_update_slp_vf_for_node to compute VF recursively. (vect_build_slp_store_interleaving): Get max_nunits and properly set that on the permute nodes built. (vect_analyze_slp): Do not set SLP_INSTANCE_UNROLLING_FACTOR.
-
Joseph Myers authored
Add some tests for the value of __STDC_VERSION__ in C23 mode. Bootstrapped with no regressions for x86_64-pc-linux-gnu. * gcc.dg/c23-version-1.c, gcc.dg/c23-version-2.c, gcc.dg/gnu23-version-1.c: New tests.
-
Jonathan Wakely authored
python/libstdcxx/v6/printers.py:1355: DeprecationWarning: 'count' is passed as positional argument The Python docs say: Deprecated since version 3.13: Passing count and flags as positional arguments is deprecated. In future Python versions they will be keyword-only parameters. Using a keyword argument for count only became possible with Python 3.1 so introduce a new function to do the substitution. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (strip_fundts_namespace): New. (StdExpAnyPrinter, StdExpOptionalPrinter): Use it.
-
Robin Dapp authored
In compute_nregs_for_mode we expect that the current variable's mode is at most as large as the biggest mode to be used for vectorization. This might not be true for constants as they don't actually have a mode. In that case, just use the biggest mode so max_number_of_live_regs returns 1. This fixes several test cases in the test suite. gcc/ChangeLog: PR target/116655 * config/riscv/riscv-vector-costs.cc (max_number_of_live_regs): Use biggest mode instead of constant's saved mode. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr116655.c: New test.
-