aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-04 12:04:54 +0200
committerMartin Liska <mliska@suse.cz>2022-10-04 12:04:54 +0200
commitda0970e441345f8349522ff1abac5c223044ebb1 (patch)
tree17c2091a83c584a1eae4f8e219a460f85c5d3fd8 /gcc/testsuite
parent54f3cfaf3a6f50958c71d79c85206a6c722e1a22 (diff)
parente886ebd17965d78f609b62479f4f48085108389c (diff)
downloadgcc-da0970e441345f8349522ff1abac5c223044ebb1.zip
gcc-da0970e441345f8349522ff1abac5c223044ebb1.tar.gz
gcc-da0970e441345f8349522ff1abac5c223044ebb1.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog233
-rw-r--r--gcc/testsuite/c-c++-common/goacc/struct-component-kind-1.c72
-rw-r--r--gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c25
-rw-r--r--gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c18
-rw-r--r--gcc/testsuite/c-c++-common/gomp/begin-declare-target-3.c19
-rw-r--r--gcc/testsuite/c-c++-common/gomp/begin-declare-target-4.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/declare-target-4.c6
-rw-r--r--gcc/testsuite/c-c++-common/gomp/declare-target-6.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/declare-target-7.c8
-rw-r--r--gcc/testsuite/c-c++-common/patchable_function_entry-default.c3
-rw-r--r--gcc/testsuite/c-c++-common/pr69543-3.c8
-rw-r--r--gcc/testsuite/c-c++-common/pr69543-4.c8
-rw-r--r--gcc/testsuite/c-c++-common/pr91669.c28
-rw-r--r--gcc/testsuite/c-c++-common/pragma-diag-16.c63
-rw-r--r--gcc/testsuite/c-c++-common/torture/attr-noinit-1.c3
-rw-r--r--gcc/testsuite/c-c++-common/torture/attr-noinit-2.c3
-rw-r--r--gcc/testsuite/c-c++-common/torture/attr-noinit-3.c3
-rw-r--r--gcc/testsuite/c-c++-common/torture/attr-persistent-1.c3
-rw-r--r--gcc/testsuite/c-c++-common/torture/attr-persistent-3.c3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/constexpr-local4.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp23/ext-floating11.C79
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/cond-triv3.C44
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/inline-asm3.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/cond4.C17
-rw-r--r--gcc/testsuite/g++.dg/ext/has-builtin-1.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/remove_cv.C32
-rw-r--r--gcc/testsuite/g++.dg/ext/remove_cvref.C32
-rw-r--r--gcc/testsuite/g++.dg/ext/remove_reference.C32
-rw-r--r--gcc/testsuite/g++.dg/ext/stmtexpr24.C27
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type13.C7
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type14.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type7.C2
-rw-r--r--gcc/testsuite/g++.dg/goacc/pr107028-1.C14
-rw-r--r--gcc/testsuite/g++.dg/goacc/pr107028-2.C27
-rw-r--r--gcc/testsuite/g++.dg/gomp/attrs-18.C41
-rw-r--r--gcc/testsuite/g++.dg/gomp/attrs-9.C15
-rw-r--r--gcc/testsuite/g++.dg/modules/100616_a.H5
-rw-r--r--gcc/testsuite/g++.dg/modules/100616_b.C7
-rw-r--r--gcc/testsuite/g++.dg/modules/100616_c.C7
-rw-r--r--gcc/testsuite/g++.dg/modules/100616_d.C10
-rw-r--r--gcc/testsuite/g++.dg/modules/ben-1.map2
-rw-r--r--gcc/testsuite/g++.dg/modules/ben-1_a.C2
-rw-r--r--gcc/testsuite/g++.dg/modules/pr102576_a.H5
-rw-r--r--gcc/testsuite/g++.dg/modules/pr102576_b.C9
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/cond-temp1.C16
-rw-r--r--gcc/testsuite/g++.target/aarch64/pr107080.C19
-rw-r--r--gcc/testsuite/g++.target/arm/pr107080.C19
-rw-r--r--gcc/testsuite/gcc.dg/c11-float-7.c24
-rw-r--r--gcc/testsuite/gcc.dg/c2x-attr-noreturn-1.c56
-rw-r--r--gcc/testsuite/gcc.dg/c2x-attr-noreturn-2.c72
-rw-r--r--gcc/testsuite/gcc.dg/c2x-attr-noreturn-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/c2x-float-12.c19
-rw-r--r--gcc/testsuite/gcc.dg/c2x-has-c-attribute-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c7
-rw-r--r--gcc/testsuite/gcc.dg/infinite-loop.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr102892-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr104992.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr107109.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr25521.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr107130.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr79095.c6
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/info_152
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/info_162
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/info_172
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/info_82
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/info_92
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/options_set_2.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/options_set_3.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/options_set_4.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/options_set_6.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_4.c47
-rw-r--r--gcc/testsuite/gcc.target/aarch64/target_attr_15.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/cmse/cmse-15.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/intrinsics/vrev64q_m_s16-clobber.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c58
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c58
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-1.c43
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-2.c43
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-3.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-4.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-5.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr99888-6.c14
-rw-r--r--gcc/testsuite/gfortran.dg/PR100029.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/PR100040.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/goacc/mapping-tests-5.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f908
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/fma_1.f904
-rw-r--r--gcc/testsuite/gfortran.dg/ieee/modes_1.f906
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp2
-rw-r--r--gcc/testsuite/lib/target-supports.exp67
103 files changed, 1690 insertions, 138 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9007c43..0c6e5d4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,236 @@
+2022-10-03 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
+ Yvan ROUX <yvan.roux@foss.st.com>
+
+ * gcc.target/arm/cmse/cmse-15.c: Align with -Os improvements.
+
+2022-10-03 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/ext/stmtexpr24.C: New test.
+
+2022-10-03 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/pr107109.c: New.
+
+2022-10-03 Christophe Lyon <christophe.lyon@arm.com>
+
+ * gcc.target/arm/mve/intrinsics/vrev64q_m_s16-clobber.c: New test.
+
+2022-10-03 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c11-float-7.c, gcc.dg/c2x-float-12.c: New tests.
+
+2022-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/107062
+ * gfortran.dg/ieee/fma_1.f90: Fix test.
+ * gfortran.dg/ieee/modes_1.f90: Fix test.
+
+2022-10-01 José Rui Faustino de Sousa <jrfsousa@gmail.com>
+
+ PR fortran/100029
+ PR fortran/100040
+ * gfortran.dg/PR100029.f90: New test.
+ * gfortran.dg/PR100040.f90: New test.
+
+2022-09-30 Jeff Law <jeffreyalaw@gmail.com>
+
+ * gcc.dg/infinite-loop.c: New test.
+
+2022-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/107080
+ * g++.target/arm/pr107080.C: New test.
+
+2022-09-30 Lewis Hyatt <lhyatt@gmail.com>
+
+ PR preprocessor/69543
+ * c-c++-common/pr69543-3.c: Remove xfail.
+ * c-c++-common/pr69543-4.c: Likewise.
+ * gcc.dg/cpp/pragma-diagnostic-2.c: Adjust test for new behavior.
+ * c-c++-common/pragma-diag-16.c: New test.
+
+2022-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/107080
+ * g++.target/aarch64/pr107080.C: New test.
+
+2022-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/107080
+ * g++.dg/cpp23/ext-floating11.C: New test.
+
+2022-09-30 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
+ Yvan ROUX <yvan.roux@foss.st.com>
+
+ * lib/target-supports.exp (check_effective_target_vma_equals_lma): New.
+ * c-c++-common/torture/attr-noinit-1.c: Requre VMA == LMA to run.
+ * c-c++-common/torture/attr-noinit-2.c: Likewise.
+ * c-c++-common/torture/attr-noinit-3.c: Likewise.
+ * c-c++-common/torture/attr-persistent-1.c: Likewise.
+ * c-c++-common/torture/attr-persistent-3.c: Likewise.
+
+2022-09-30 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
+
+ * lib/gcc-defs.exp: Do not prefix linker script with "-Wl,".
+
+2022-09-30 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
+ Yvan ROUX <yvan.roux@foss.st.com>
+
+ * g++.dg/modules/ben-1.map: Replace the colon with dash.
+ * g++.dg/modules/ben-1_a.C: Likewise
+
+2022-09-30 Kewen Lin <linkw@linux.ibm.com>
+
+ PR target/99888
+ PR target/105649
+ * gcc.target/powerpc/pr99888-1.c: New test.
+ * gcc.target/powerpc/pr99888-2.c: New test.
+ * gcc.target/powerpc/pr99888-3.c: New test.
+ * gcc.target/powerpc/pr99888-4.c: New test.
+ * gcc.target/powerpc/pr99888-5.c: New test.
+ * gcc.target/powerpc/pr99888-6.c: New test.
+ * c-c++-common/patchable_function_entry-default.c: Adjust for
+ powerpc_elfv2 to avoid compilation error.
+
+2022-09-30 Kewen Lin <linkw@linux.ibm.com>
+
+ PR testsuite/106516
+ * gcc.dg/pr104992.c: Adjust with vect_int_mod.
+ * lib/target-supports.exp (check_effective_target_vect_int_mod): New
+ effective target.
+
+2022-09-30 Christophe Lyon <christophe.lyon@arm.com>
+
+ * gcc.target/arm/mve/mve_load_memory_modes.c: Update expected
+ registers.
+ * gcc.target/arm/mve/mve_store_memory_modes.c: Likewise.
+
+2022-09-30 Tobias Burnus <tobias@codesourcery.com>
+
+ PR fortran/105318
+ * gfortran.dg/gomp/is_device_ptr-1.f90: Remove dg-error.
+ * gfortran.dg/gomp/is_device_ptr-2.f90: Likewise.
+ * gfortran.dg/gomp/is_device_ptr-3.f90: Update tree-scan-dump.
+
+2022-09-29 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c2x-attr-noreturn-1.c, gcc.dg/c2x-attr-noreturn-2.c,
+ gcc.dg/c2x-attr-noreturn-3.c: New tests.
+ * gcc.dg/c2x-has-c-attribute-2.c: Also test __has_c_attribute for
+ noreturn attribute.
+
+2022-09-29 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/tree-ssa/pr79095.c: Test evrp pass rather than vrp1.
+
+2022-09-29 Andrew MacLeod <amacleod@redhat.com>
+
+ PR tree-optimization/102892
+ * gcc.dg/pr102892-1.c: Remove undefined behaviour.
+
+2022-09-29 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/102576
+ * g++.dg/modules/pr102576_a.H: New test.
+ * g++.dg/modules/pr102576_b.C: New test.
+
+2022-09-29 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp2a/cond-triv3.C: New test.
+
+2022-09-29 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp1y/constexpr-local4.C: Expect error sooner.
+ * g++.dg/cpp2a/consteval24.C: Likewise.
+ * g++.dg/cpp2a/consteval7.C: Likewise.
+ * g++.dg/cpp2a/inline-asm3.C: Likewise.
+
+2022-09-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/93046
+ * g++.dg/ext/cond4.C: Add runtime test.
+
+2022-09-29 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/tree-ssa/cond-temp1.C: New test.
+
+2022-09-29 Julian Brown <julian@codesourcery.com>
+
+ PR middle-end/107028
+ * c-c++-common/goacc/struct-component-kind-1.c: New test.
+ * g++.dg/goacc/pr107028-1.C: New test.
+ * g++.dg/goacc/pr107028-2.C: New test.
+ * gfortran.dg/goacc/mapping-tests-5.f90: New test.
+
+2022-09-29 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/ext/has-builtin-1.C: Test existence of __remove_cv,
+ __remove_reference and __remove_cvref.
+ * g++.dg/ext/remove_cv.C: New test.
+ * g++.dg/ext/remove_reference.C: New test.
+ * g++.dg/ext/remove_cvref.C: New test.
+
+2022-09-29 Patrick Palka <ppalka@redhat.com>
+
+ * g++.dg/cpp0x/alias-decl-59.C: Adjust expected error message.
+ * g++.dg/ext/underlying_type7.C: Likewise.
+ * g++.dg/ext/underlying_type13.C: New test.
+ * g++.dg/ext/underlying_type14.C: New test.
+
+2022-09-29 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/100616
+ * g++.dg/modules/100616_a.H: New.
+ * g++.dg/modules/100616_b.C: New.
+ * g++.dg/modules/100616_c.C: New.
+ * g++.dg/modules/100616_d.C: New.
+
+2022-09-29 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ PR middle-end/25521
+ * lib/target-supports.exp (check_effective_target_elf): Define.
+ * gcc.dg/pr25521.c: New test.
+
+2022-09-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/cpunative/info_8: Add all dependencies of sve.
+ * gcc.target/aarch64/cpunative/info_9: Likewise svesm4.
+ * gcc.target/aarch64/cpunative/info_15: Likewise.
+ * gcc.target/aarch64/cpunative/info_16: Likewise sve2.
+ * gcc.target/aarch64/cpunative/info_17: Likewise.
+ * gcc.target/aarch64/cpunative/native_cpu_2.c: Expect just +nofp
+ rather than +nofp+nosimd.
+ * gcc.target/aarch64/cpunative/native_cpu_10.c: Likewise.
+ * gcc.target/aarch64/target_attr_15.c: Likewise.
+
+2022-09-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/cpunative/native_cpu_0.c: Expect +crypto
+ to come after +crc.
+ * gcc.target/aarch64/cpunative/native_cpu_13.c: Likewise.
+ * gcc.target/aarch64/cpunative/native_cpu_16.c: Likewise.
+ * gcc.target/aarch64/cpunative/native_cpu_17.c: Likewise.
+ * gcc.target/aarch64/cpunative/native_cpu_6.c: Likewise.
+ * gcc.target/aarch64/cpunative/native_cpu_7.c: Likewise.
+ * gcc.target/aarch64/options_set_2.c: Likewise.
+ * gcc.target/aarch64/options_set_3.c: Likewise.
+ * gcc.target/aarch64/options_set_4.c: Likewise.
+
+2022-09-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/aarch64/options_set_6.c: Expect +crypto+nosha2 to
+ disable crypto but keep aes.
+ * gcc.target/aarch64/pragma_cpp_predefs_4.c: New test.
+
+2022-09-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/105646
+ * g++.dg/uninit-pr105646.C: New testcase.
+
+2022-09-29 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr107055.c: New test.
+
2022-09-28 Eugene Rozenfeld <erozen@microsoft.com>
* c-c++-common/ubsan/pr85213.c: Pass -gno-statement-frontiers.
diff --git a/gcc/testsuite/c-c++-common/goacc/struct-component-kind-1.c b/gcc/testsuite/c-c++-common/goacc/struct-component-kind-1.c
new file mode 100644
index 0000000..8d2f5ea
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/struct-component-kind-1.c
@@ -0,0 +1,72 @@
+/* { dg-do compile } */
+
+#include <stdlib.h>
+
+#define N 20
+
+struct s {
+ int base[N];
+};
+
+int main (void)
+{
+ struct s v;
+
+#pragma acc parallel copy(v, v.base[0:N])
+{ }
+
+#pragma acc parallel copyin(v, v.base[0:N])
+{ }
+
+#pragma acc parallel copyout(v, v.base[0:N])
+{ }
+
+#pragma acc parallel copy(v) copyin(v.base[0:N])
+{ }
+
+#pragma acc parallel copy(v) copyout(v.base[0:N])
+{ }
+
+#pragma acc parallel copy(v) present(v.base[0:N])
+{ }
+
+#pragma acc parallel copyin(v) present(v.base[0:N])
+{ }
+
+#pragma acc parallel copyout(v) present(v.base[0:N])
+{ }
+
+#pragma acc enter data copyin(v, v.base[0:N])
+#pragma acc update device(v, v.base[0:N])
+#pragma acc exit data delete(v, v.base[0:N])
+
+#pragma acc parallel copyin(v) copy(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel copyout(v) copy(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel present(v) copy(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel present(v) copyin(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel present(v) copyout(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel present(v) no_create(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+#pragma acc parallel no_create(v) present(v.base[0:N])
+/* { dg-error "data movement for component 'v\\.(s::)?base\\\[0\\\]' is not compatible with movement for struct 'v'" "" { target *-*-* } .-1 } */
+{ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c
new file mode 100644
index 0000000..fd8caba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+extern int a;
+#pragma omp begin declare target device_type (host)
+int b;
+#pragma omp begin declare target device_type (any)
+char d;
+#pragma omp end declare target
+#pragma omp end declare target
+#pragma omp begin declare target
+long c;
+#pragma omp end declare target
+#pragma omp declare target
+int foo (void) { return 0; }
+#pragma omp begin declare target device_type (any)
+int bar (void) { return 0; }
+#pragma omp end declare target
+#pragma omp end declare target
+#pragma omp begin declare target device_type (any)
+int baz (void) { return 0; }
+#pragma omp declare target
+int qux (void) { return 0; }
+#pragma omp end declare target
+#pragma omp end declare target
diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c
new file mode 100644
index 0000000..2bc72cf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+extern int a;
+#pragma omp begin declare target
+#pragma omp declare target to (a)
+#pragma omp end declare target
+int b;
+#pragma omp begin declare target to (b) /* { dg-error "'to' is not valid for '#pragma omp begin declare target'" } */
+#pragma omp end declare target
+int c;
+#pragma omp begin declare target link (c) /* { dg-error "'link' is not valid for '#pragma omp begin declare target'" } */
+#pragma omp end declare target
+int m;
+#pragma omp begin declare target device_type (host) device_type (any) /* { dg-error "too many 'device_type' clauses" } */
+#pragma omp end declare target
+#pragma omp begin declare target
+#pragma omp end declare target to (p) /* { dg-error "expected end of line before .to." } */
diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-3.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-3.c
new file mode 100644
index 0000000..ac4d4d9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-3.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp begin declare target
+int a[] = { 1, 2, 3 };
+extern int b[]; /* { dg-error "'b' in declare target directive does not have mappable type" } */
+extern int c[]; /* { dg-error "'c' in declare target directive does not have mappable type" } */
+extern int d[]; /* { dg-error "'d' in declare target directive does not have mappable type" } */
+int d[3];
+#pragma omp end declare target
+int c[3];
+#pragma omp begin declare target device_type (host)
+int e[] = { 1, 2, 3 };
+extern int f[]; /* { dg-error "'f' in declare target directive does not have mappable type" } */
+extern int g[]; /* { dg-error "'g' in declare target directive does not have mappable type" } */
+extern int h[]; /* { dg-error "'h' in declare target directive does not have mappable type" } */
+int h[3];
+#pragma omp end declare target
+int g[3];
diff --git a/gcc/testsuite/c-c++-common/gomp/begin-declare-target-4.c b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-4.c
new file mode 100644
index 0000000..d275f73
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/begin-declare-target-4.c
@@ -0,0 +1,2 @@
+#pragma omp begin declare target
+void foo (void); /* { dg-error "'#pragma omp begin declare target' without corresponding '#pragma omp end declare target'" } */
diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-4.c b/gcc/testsuite/c-c++-common/gomp/declare-target-4.c
index 887a815..a6bd128 100644
--- a/gcc/testsuite/c-c++-common/gomp/declare-target-4.c
+++ b/gcc/testsuite/c-c++-common/gomp/declare-target-4.c
@@ -1,8 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
-#pragma omp declare target device_type (any) /* { dg-warning "directive with only 'device_type' clauses ignored" } */
-
void f1 (void) {}
void f2 (void);
#pragma omp declare target to (f1) device_type (any) to (f2)
@@ -38,7 +36,3 @@ void f13 (void) {}
void f14 (void) {}
#pragma omp declare target device_type (nohost) to (f14)
#pragma omp declare target device_type (any) to (f14)
-void f15 (void) {}
-#pragma omp declare target device_type (host) to (f15) device_type (nohost)
-void f16 (void) {}
-#pragma omp declare target device_type (any) to (f15) device_type (any)
diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-6.c b/gcc/testsuite/c-c++-common/gomp/declare-target-6.c
index 586eb50..ba323e2 100644
--- a/gcc/testsuite/c-c++-common/gomp/declare-target-6.c
+++ b/gcc/testsuite/c-c++-common/gomp/declare-target-6.c
@@ -1,2 +1,2 @@
-#pragma omp end declare target /* { dg-error "'#pragma omp end declare target' without corresponding '#pragma omp declare target'" } */
+#pragma omp end declare target /* { dg-error "'#pragma omp end declare target' without corresponding '#pragma omp declare target' or '#pragma omp begin declare target'" } */
void foo (void);
diff --git a/gcc/testsuite/c-c++-common/gomp/declare-target-7.c b/gcc/testsuite/c-c++-common/gomp/declare-target-7.c
new file mode 100644
index 0000000..747000a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/declare-target-7.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare target device_type (any) /* { dg-error "directive with only 'device_type' clause" } */
+
+void f1 (void) {}
+#pragma omp declare target device_type (host) to (f1) device_type (nohost) /* { dg-error "too many 'device_type' clauses" } */
+#pragma omp declare target device_type (any) to (f1) device_type (any) /* { dg-error "too many 'device_type' clauses" } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 7036f7b..a501efc 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,6 +1,9 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
+/* See PR99888, one single preceding nop isn't allowed on powerpc_elfv2,
+ so overriding with two preceding nops to make it pass there. */
+/* { dg-additional-options "-fpatchable-function-entry=3,2" { target powerpc_elfv2 } } */
/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 3 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/pr69543-3.c b/gcc/testsuite/c-c++-common/pr69543-3.c
index fcf750c..6d4224f 100644
--- a/gcc/testsuite/c-c++-common/pr69543-3.c
+++ b/gcc/testsuite/c-c++-common/pr69543-3.c
@@ -3,15 +3,11 @@
/* Verify disabling a warning, where the _Pragma is in regular code,
but the affected code is within a macro. */
-/* TODO: XFAIL: both C and C++ erroneously fail to suppress the warning
- The warning is reported at the macro definition location, rather than
- the macro expansion location. */
-
-#define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" "" { xfail *-*-* } } */
+#define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" } */
void test (char yylval)
{
- char *yyvsp; /* { dg-bogus "declared here" "" { xfail *-*-* } } */
+ char *yyvsp; /* { dg-bogus "declared here" } */
_Pragma ("GCC diagnostic push")
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
diff --git a/gcc/testsuite/c-c++-common/pr69543-4.c b/gcc/testsuite/c-c++-common/pr69543-4.c
index cd71e7e..3db2eeb 100644
--- a/gcc/testsuite/c-c++-common/pr69543-4.c
+++ b/gcc/testsuite/c-c++-common/pr69543-4.c
@@ -3,10 +3,6 @@
/* Verify disabling a warning, where both the _Pragma and the
affected code are within (different) macros. */
-/* TODO: XFAIL: both C and C++ erroneously fail to suppress the warning
- The warning is reported at the macro definition location, rather than
- the macro expansion location. */
-
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
@@ -14,11 +10,11 @@
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
-#define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" "" { xfail *-*-* } } */
+#define WARNABLE_CODE *++yyvsp = yylval; /* { dg-bogus "used uninitialized" } */
void test (char yylval)
{
- char *yyvsp; /* { dg-bogus "declared here" "" { xfail *-*-* } } */
+ char *yyvsp; /* { dg-bogus "declared here" } */
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
WARNABLE_CODE
YY_IGNORE_MAYBE_UNINITIALIZED_END
diff --git a/gcc/testsuite/c-c++-common/pr91669.c b/gcc/testsuite/c-c++-common/pr91669.c
new file mode 100644
index 0000000..1070751e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr91669.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wreturn-type" } */
+
+/* The location of the right brace within the macro expansion can be an adhoc
+ location, because the frontend attached custom data to it. In order for the
+ diagnostic pragma to correctly understand that the diagnostic pop occurs
+ after the function and not before, linemap_location_before_p needs to handle
+ adhoc locations within a macro map, which was broken until fixed by r10-325.
+ Verify that we get it right, both when the brace is a macro token and when it
+ is part of the macro expansion. */
+
+#define ENDFUNC1 \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
+ } /* { dg-bogus {-Wreturn-type} } */ \
+ _Pragma("GCC diagnostic pop")
+
+int f1 () {
+ENDFUNC1 /* { dg-bogus {in expansion of macro 'ENDFUNC1' } } */
+
+#define ENDFUNC2(term) \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
+ term /* { dg-bogus {in definition of macro 'ENDFUNC2'} } */ \
+ _Pragma("GCC diagnostic pop")
+
+int f2 () {
+ENDFUNC2(}) /* { dg-bogus {-Wreturn-type} } */
diff --git a/gcc/testsuite/c-c++-common/pragma-diag-16.c b/gcc/testsuite/c-c++-common/pragma-diag-16.c
new file mode 100644
index 0000000..8cacd87
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pragma-diag-16.c
@@ -0,0 +1,63 @@
+/* Make sure that the 3 types of warnings generated from tree-ssa-uninit.cc have
+ proper virtual locations and so can be controlled by pragmas when they appear
+ in macros. */
+
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -Wmaybe-uninitialized" } */
+
+/* 1. Check maybe_warn_read_write_only(). */
+#define DEREF1(p) (*p) /* { dg-warning {may be used uninitialized} } */
+__attribute__ ((access (write_only, 1)))
+int f1 (int* x) /* { dg-note {accessing argument 1} } */
+{
+ return DEREF1 (x); /* { dg-note {in expansion of macro 'DEREF1'} } */
+}
+
+#define DEREF2(p) (*p) /* { dg-bogus {may be used uninitialized} } */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+__attribute__ ((access (write_only, 1)))
+int f2 (int* x) /* { dg-bogus {accessing argument 1} } */
+{
+ return DEREF2 (x); /* { dg-bogus {in expansion of macro 'DEREF1'} } */
+}
+#pragma GCC diagnostic pop
+
+/* 2. Check warn_uninit(). */
+int g;
+#define SET3(a, b) ((a) = (b)) /* { dg-warning {'x' is used uninitialized} } */
+void f3 ()
+{
+ int x; /* { dg-note {'x' was declared here} } */
+ SET3 (g, x); /* { dg-note {in expansion of macro 'SET3'} } */
+}
+
+#define SET4(a, b) ((a) = (b)) /* { dg-bogus {'x' is used uninitialized} } */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+void f4 ()
+{
+ int x; /* { dg-bogus {'x' was declared here} } */
+ SET4 (g, x); /* { dg-bogus {in expansion of macro 'SET3'} } */
+}
+#pragma GCC diagnostic pop
+
+/* 3. Check maybe_warn_operand(). */
+#define CALL5(func, arg) ((func) (arg)) /* { dg-warning {'c' may be used uninitialized} } */
+void f5a (const char *); /* { dg-note {by argument 1} } */
+void f5b ()
+{
+ char c; /* { dg-note {'c' declared here} } */
+ CALL5 (f5a, &c); /* { dg-note {in expansion of macro 'CALL5'} } */
+}
+
+#define CALL6(func, arg) ((func) (arg)) /* { dg-bogus {'c' may be used uninitialized} } */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+void f6a (const char *); /* { dg-bogus {by argument 1} } */
+void f6b ()
+{
+ char c; /* { dg-bogus {'c' declared here} } */
+ CALL6 (f6a, &c); /* { dg-bogus {in expansion of macro 'CALL6'} } */
+}
+#pragma GCC diagnostic pop
diff --git a/gcc/testsuite/c-c++-common/torture/attr-noinit-1.c b/gcc/testsuite/c-c++-common/torture/attr-noinit-1.c
index 877e764..f84eba0 100644
--- a/gcc/testsuite/c-c++-common/torture/attr-noinit-1.c
+++ b/gcc/testsuite/c-c++-common/torture/attr-noinit-1.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do link } */
+/* { dg-do run { target { vma_equals_lma } } } */
/* { dg-require-effective-target noinit } */
/* { dg-skip-if "data LMA != VMA" { msp430-*-* } { "-mlarge" } } */
/* { dg-options "-save-temps" } */
diff --git a/gcc/testsuite/c-c++-common/torture/attr-noinit-2.c b/gcc/testsuite/c-c++-common/torture/attr-noinit-2.c
index befa2a0..4528b9e 100644
--- a/gcc/testsuite/c-c++-common/torture/attr-noinit-2.c
+++ b/gcc/testsuite/c-c++-common/torture/attr-noinit-2.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do link } */
+/* { dg-do run { target { vma_equals_lma } } } */
/* { dg-require-effective-target noinit } */
/* { dg-options "-fdata-sections -save-temps" } */
/* { dg-skip-if "data LMA != VMA" { msp430-*-* } { "-mlarge" } } */
diff --git a/gcc/testsuite/c-c++-common/torture/attr-noinit-3.c b/gcc/testsuite/c-c++-common/torture/attr-noinit-3.c
index 519e88a..2f17456 100644
--- a/gcc/testsuite/c-c++-common/torture/attr-noinit-3.c
+++ b/gcc/testsuite/c-c++-common/torture/attr-noinit-3.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do link } */
+/* { dg-do run { target { vma_equals_lma } } } */
/* { dg-require-effective-target noinit } */
/* { dg-options "-flto -save-temps" } */
/* { dg-skip-if "data LMA != VMA" { msp430-*-* } { "-mlarge" } } */
diff --git a/gcc/testsuite/c-c++-common/torture/attr-persistent-1.c b/gcc/testsuite/c-c++-common/torture/attr-persistent-1.c
index 72dc3c2..b11a515 100644
--- a/gcc/testsuite/c-c++-common/torture/attr-persistent-1.c
+++ b/gcc/testsuite/c-c++-common/torture/attr-persistent-1.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do link } */
+/* { dg-do run { target { vma_equals_lma } } } */
/* { dg-require-effective-target persistent } */
/* { dg-skip-if "data LMA != VMA" { msp430-*-* } { "-mlarge" } } */
/* { dg-options "-save-temps" } */
diff --git a/gcc/testsuite/c-c++-common/torture/attr-persistent-3.c b/gcc/testsuite/c-c++-common/torture/attr-persistent-3.c
index 3e4fd28..068a72a 100644
--- a/gcc/testsuite/c-c++-common/torture/attr-persistent-3.c
+++ b/gcc/testsuite/c-c++-common/torture/attr-persistent-3.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do link } */
+/* { dg-do run { target { vma_equals_lma } } } */
/* { dg-require-effective-target persistent } */
/* { dg-options "-flto -save-temps" } */
/* { dg-skip-if "data LMA != VMA" { msp430-*-* } { "-mlarge" } } */
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
index 1f5e94f..5094657 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
@@ -5,7 +5,7 @@ template<typename>
struct A {};
template<typename T>
-using B = A<__underlying_type(T) [[gnu::aligned(4)]]>; // { dg-warning "ignoring attributes on template argument" }
+using B = A<__underlying_type(T) [[gnu::aligned(4)]]>; // { dg-warning "ignoring attributes applied to dependent type" }
template<typename T>
-using B = A<__underlying_type(T) [[gnu::packed]]>; // { dg-warning "ignoring attributes on template argument" }
+using B = A<__underlying_type(T) [[gnu::packed]]>; // { dg-warning "ignoring attributes applied to dependent type" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-local4.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-local4.C
index bef6248..647b5dc 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-local4.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-local4.C
@@ -10,8 +10,8 @@ const A a = 42;
constexpr int f()
{
- const int j = a.i; // { dg-message "'a'" }
+ const int j = a.i; // { dg-error "'a'" }
return j;
}
-static_assert (f() == 42,""); // { dg-error "non-constant" }
+static_assert (f() == 42,""); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp23/ext-floating11.C b/gcc/testsuite/g++.dg/cpp23/ext-floating11.C
new file mode 100644
index 0000000..2a52c94
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/ext-floating11.C
@@ -0,0 +1,79 @@
+// P1467R9 - Extended floating-point types and standard names.
+// { dg-do compile { target c++23 } }
+// { dg-options "" }
+
+#include "ext-floating.h"
+
+#ifdef __STRICT_ANSI__
+#undef __SIZEOF_FLOAT128__
+#endif
+
+extern "C" void abort ();
+
+using namespace std;
+
+template <typename T, typename U>
+int
+foo (T x, U y) noexcept
+{
+ return 3;
+}
+
+int
+main ()
+{
+ if (foo (0.0f, 0.0f) != 3)
+ abort ();
+ if (foo (0.0, 0.0) != 3)
+ abort ();
+ if (foo (0.0L, 0.0L) != 3)
+ abort ();
+#ifdef __STDCPP_FLOAT16_T__
+ if (foo (0.0f16, 0.0f16) != 3)
+ abort ();
+ if (foo (0.0f, 0.0f16) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT32_T__
+ if (foo (0.0f32, 0.0f32) != 3)
+ abort ();
+ if (foo (0.0f, 0.0f32) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT64_T__
+ if (foo (0.0f64, 0.0f64) != 3)
+ abort ();
+ if (foo (0.0, 0.0f64) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_FLOAT128_T__
+ if (foo (0.0f128, 0.0f128) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f128) != 3)
+ abort ();
+#endif
+#ifdef __STDCPP_BFLOAT16_T__
+ if (foo (0.0bf16, 0.0bf16) != 3)
+ abort ();
+ if (foo (0.0f, 0.0bf16) != 3)
+ abort ();
+#endif
+#ifdef __FLT32X_MANT_DIG__
+ if (foo (0.0f32x, 0.0f32x) != 3)
+ abort ();
+ if (foo (0.0, 0.0f32x) != 3)
+ abort ();
+#endif
+#ifdef __FLT64X_MANT_DIG__
+ if (foo (0.0f64x, 0.0f64x) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f64x) != 3)
+ abort ();
+#endif
+#ifdef __FLT128X_MANT_DIG__
+ if (foo (0.0f128x, 0.0f128x) != 3)
+ abort ();
+ if (foo (0.0L, 0.0f128x) != 3)
+ abort ();
+#endif
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/cond-triv3.C b/gcc/testsuite/g++.dg/cpp2a/cond-triv3.C
new file mode 100644
index 0000000..d0711cf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/cond-triv3.C
@@ -0,0 +1,44 @@
+// { dg-do compile { target c++20 } }
+
+template<class T>
+struct X
+{
+ T first{};
+
+ X& operator=(const X&) = delete;
+ X& operator=(const X&) requires requires (T& t) { t = t; } { return *this; }
+};
+
+// C++20 std::pair<const int, int>:
+using cxx20_pair = X<const int>;
+static_assert( __is_trivially_constructible(cxx20_pair, const cxx20_pair&), "" );
+static_assert( !__is_assignable(cxx20_pair&, const cxx20_pair&), "" );
+static_assert( __is_trivially_copyable(cxx20_pair), "" );
+
+template<bool, typename, typename F> struct conditional { using type = F; };
+template<typename T, typename F> struct conditional<true, T, F> { using type = T; };
+
+struct base
+{
+ base() = default;
+ ~base() = default;
+ base(const base&) = default;
+ base& operator=(const base&) = delete;
+};
+
+struct nope;
+
+template<class T>
+struct Y : base
+{
+ T first{};
+
+ Y& operator=(typename conditional<__is_assignable(T&, const T&), const Y&, const nope&>::type)
+ { return *this; }
+};
+
+// C++17 std::pair<const int, int>:
+using cxx17_pair = Y<const int>;
+static_assert( __is_trivially_constructible(cxx17_pair, const cxx17_pair&), "" );
+static_assert( ! __is_assignable(cxx17_pair&, const cxx17_pair&), "" );
+static_assert( __is_trivially_copyable(cxx17_pair), "???" );
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval24.C b/gcc/testsuite/g++.dg/cpp2a/consteval24.C
index 6d0c63c..6d7034c 100644
--- a/gcc/testsuite/g++.dg/cpp2a/consteval24.C
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval24.C
@@ -27,4 +27,4 @@ bar ()
return fn1 () + fn2 () + (s.*fn3) () + (s.*fn4) () + fn5 () + (s.*fn6) () + (s.*fn7) ();
}
-auto a = bar ();
+auto a = bar (); // { dg-error "bar" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval7.C b/gcc/testsuite/g++.dg/cpp2a/consteval7.C
index 23f3d25..74996d3 100644
--- a/gcc/testsuite/g++.dg/cpp2a/consteval7.C
+++ b/gcc/testsuite/g++.dg/cpp2a/consteval7.C
@@ -10,4 +10,4 @@ consteval int qux () { S s = baz (); return s.b + s.c (); }
consteval int quux () { constexpr S s = baz (); return s.b + s.c (); } // { dg-error "immediate evaluation returns address of immediate function 'consteval int foo\\(\\)'" }
constexpr auto d = baz (); // { dg-error "immediate evaluation returns address of immediate function 'consteval int foo\\(\\)'" }
constexpr auto e = qux ();
-constexpr auto f = quux ();
+constexpr auto f = quux (); // { dg-error "quux" }
diff --git a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C
index a7476b1..a6f612e 100644
--- a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C
+++ b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C
@@ -9,4 +9,4 @@ foo ()
return i;
}
-constexpr int i = foo ();
+constexpr int i = foo (); // { dg-error "foo" }
diff --git a/gcc/testsuite/g++.dg/ext/cond4.C b/gcc/testsuite/g++.dg/ext/cond4.C
index d2853f4..8699330 100644
--- a/gcc/testsuite/g++.dg/ext/cond4.C
+++ b/gcc/testsuite/g++.dg/ext/cond4.C
@@ -1,10 +1,14 @@
// PR c++/93046
-// { dg-do compile }
+// { dg-do run }
// { dg-options "" }
+int c;
+
struct S {
- S (int);
- operator bool ();
+ int i;
+ S (int i) : i(i) { ++c; }
+ S (const S &s): i(s.i) { ++c; }
+ operator bool () { return i; }
};
S
@@ -12,3 +16,10 @@ foo ()
{
return S (1) ? : S (2);
}
+
+int main()
+{
+ S s = foo();
+ if (s.i != 1 || c != 2)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/ext/has-builtin-1.C b/gcc/testsuite/g++.dg/ext/has-builtin-1.C
index 17dabf6..f343e15 100644
--- a/gcc/testsuite/g++.dg/ext/has-builtin-1.C
+++ b/gcc/testsuite/g++.dg/ext/has-builtin-1.C
@@ -137,3 +137,12 @@
#if !__has_builtin (__is_nothrow_convertible)
# error "__has_builtin (__is_nothrow_convertible) failed"
#endif
+#if !__has_builtin (__remove_cv)
+# error "__has_builtin (__remove_cv) failed"
+#endif
+#if !__has_builtin (__remove_reference)
+# error "__has_builtin (__remove_reference) failed"
+#endif
+#if !__has_builtin (__remove_cvref)
+# error "__has_builtin (__remove_cvref) failed"
+#endif
diff --git a/gcc/testsuite/g++.dg/ext/remove_cv.C b/gcc/testsuite/g++.dg/ext/remove_cv.C
new file mode 100644
index 0000000..cff7050
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/remove_cv.C
@@ -0,0 +1,32 @@
+// { dg-do compile { target c++11 } }
+
+#define SA(X) static_assert((X),#X)
+
+SA(__is_same(__remove_cv(void), void));
+SA(__is_same(__remove_cv(int*), int*));
+
+SA(__is_same(__remove_cv(int&), int&));
+SA(__is_same(__remove_cv(const int&), const int&));
+SA(__is_same(__remove_cv(volatile int&), volatile int&));
+SA(__is_same(__remove_cv(const volatile int&), const volatile int&));
+
+SA(__is_same(__remove_cv(int&&), int&&));
+SA(__is_same(__remove_cv(const int&&), const int&&));
+SA(__is_same(__remove_cv(volatile int&&), volatile int&&));
+SA(__is_same(__remove_cv(const volatile int&&), const volatile int&&));
+
+SA(__is_same(__remove_cv(int[3]), int[3]));
+SA(__is_same(__remove_cv(const int[3]), int[3]));
+SA(__is_same(__remove_cv(volatile int[3]), int[3]));
+SA(__is_same(__remove_cv(const volatile int[3]), int[3]));
+
+SA(__is_same(__remove_cv(int(int)), int(int)));
+SA(__is_same(__remove_cv(int(*const)(int)), int(*)(int)));
+SA(__is_same(__remove_cv(int(*volatile)(int)), int(*)(int)));
+SA(__is_same(__remove_cv(int(*const volatile)(int)), int(*)(int)));
+
+template<class T> using const_non_volatile_t = const __remove_cv(T);
+SA(__is_same(const_non_volatile_t<int>, const int));
+SA(__is_same(const_non_volatile_t<volatile int>, const int));
+SA(__is_same(const_non_volatile_t<int&>, int&));
+SA(__is_same(const_non_volatile_t<const int&>, const int&));
diff --git a/gcc/testsuite/g++.dg/ext/remove_cvref.C b/gcc/testsuite/g++.dg/ext/remove_cvref.C
new file mode 100644
index 0000000..109d54f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/remove_cvref.C
@@ -0,0 +1,32 @@
+// { dg-do compile { target c++11 } }
+
+#define SA(X) static_assert((X),#X)
+
+SA(__is_same(__remove_cvref(void), void));
+SA(__is_same(__remove_cvref(int*), int*));
+
+SA(__is_same(__remove_cvref(int&), int));
+SA(__is_same(__remove_cvref(const int&), int));
+SA(__is_same(__remove_cvref(volatile int&), int));
+SA(__is_same(__remove_cvref(const volatile int&), int));
+
+SA(__is_same(__remove_cvref(int&&), int));
+SA(__is_same(__remove_cvref(const int&&), int));
+SA(__is_same(__remove_cvref(volatile int&&), int));
+SA(__is_same(__remove_cvref(const volatile int&&), int));
+
+SA(__is_same(__remove_cvref(int[3]), int[3]));
+SA(__is_same(__remove_cvref(const int[3]), int[3]));
+SA(__is_same(__remove_cvref(volatile int[3]), int[3]));
+SA(__is_same(__remove_cvref(const volatile int[3]), int[3]));
+
+SA(__is_same(__remove_cvref(int(int)), int(int)));
+SA(__is_same(__remove_cvref(int(*const)(int)), int(*)(int)));
+SA(__is_same(__remove_cvref(int(*volatile)(int)), int(*)(int)));
+SA(__is_same(__remove_cvref(int(*const volatile)(int)), int(*)(int)));
+
+template<class T> using const_non_volatile_non_ref_t = const __remove_cvref(T);
+SA(__is_same(const_non_volatile_non_ref_t<int>, const int));
+SA(__is_same(const_non_volatile_non_ref_t<volatile int&>, const int));
+SA(__is_same(const_non_volatile_non_ref_t<int&>, const int));
+SA(__is_same(const_non_volatile_non_ref_t<const int&>, const int));
diff --git a/gcc/testsuite/g++.dg/ext/remove_reference.C b/gcc/testsuite/g++.dg/ext/remove_reference.C
new file mode 100644
index 0000000..1a2580b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/remove_reference.C
@@ -0,0 +1,32 @@
+// { dg-do compile { target c++11 } }
+
+#define SA(X) static_assert((X),#X)
+
+SA(__is_same(__remove_reference(void), void));
+SA(__is_same(__remove_reference(int*), int*));
+
+SA(__is_same(__remove_reference(int&), int));
+SA(__is_same(__remove_reference(const int&), const int));
+SA(__is_same(__remove_reference(volatile int&), volatile int));
+SA(__is_same(__remove_reference(const volatile int&), const volatile int));
+
+SA(__is_same(__remove_reference(int&&), int));
+SA(__is_same(__remove_reference(const int&&), const int));
+SA(__is_same(__remove_reference(volatile int&&), volatile int));
+SA(__is_same(__remove_reference(const volatile int&&), const volatile int));
+
+SA(__is_same(__remove_reference(int[3]), int[3]));
+SA(__is_same(__remove_reference(const int[3]), const int[3]));
+SA(__is_same(__remove_reference(volatile int[3]), volatile int[3]));
+SA(__is_same(__remove_reference(const volatile int[3]), const volatile int[3]));
+
+SA(__is_same(__remove_reference(int(int)), int(int)));
+SA(__is_same(__remove_reference(int(*const)(int)), int(*const)(int)));
+SA(__is_same(__remove_reference(int(*volatile)(int)), int(*volatile)(int)));
+SA(__is_same(__remove_reference(int(*const volatile)(int)), int(*const volatile)(int)));
+
+template<class T> using const_non_ref_t = const __remove_reference(T);
+SA(__is_same(const_non_ref_t<int>, const int));
+SA(__is_same(const_non_ref_t<volatile int&>, const volatile int));
+SA(__is_same(const_non_ref_t<int&>, const int));
+SA(__is_same(const_non_ref_t<const int&>, const int));
diff --git a/gcc/testsuite/g++.dg/ext/stmtexpr24.C b/gcc/testsuite/g++.dg/ext/stmtexpr24.C
new file mode 100644
index 0000000..907d027
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/stmtexpr24.C
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "" }
+
+void
+foo (int x)
+{
+ bool a = false;
+ if (x == 1)
+ goto l1; // { dg-message "from here" }
+ a = ({ l0:; if (x == 0) goto l0; true; });
+ a = ({ if (x == 0) throw 1; true; });
+ a = ({ l1:; true; }); // { dg-error "jump to label 'l1'" }
+ // { dg-message "enters statement expression" "" { target *-*-* } .-1 }
+ a = ({ l2:; true; }); // { dg-error "jump to label 'l2'" }
+ switch (x)
+ {
+ case 2:
+ a = ({ case 3:; true; }); // { dg-error "jump to case label" }
+ // { dg-message "enters statement expression" "" { target *-*-* } .-1 }
+ a = ({ default:; true; }); // { dg-error "jump to case label" }
+ // { dg-message "enters statement expression" "" { target *-*-* } .-1 }
+ break;
+ }
+ if (x == 4)
+ goto l2; // { dg-message "from here" }
+ // { dg-message "enters statement expression" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type13.C b/gcc/testsuite/g++.dg/ext/underlying_type13.C
new file mode 100644
index 0000000..c53da11
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/underlying_type13.C
@@ -0,0 +1,7 @@
+// Verify when substituting __underlying_type its cv-quals are carried over.
+// { dg-do compile { target c++11 } }
+
+template<class T> using const_underlying_type_t = const __underlying_type(T);
+enum A { a };
+using type = const_underlying_type_t<A>;
+using type = const __underlying_type(A);
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type14.C b/gcc/testsuite/g++.dg/ext/underlying_type14.C
new file mode 100644
index 0000000..91840b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/underlying_type14.C
@@ -0,0 +1,8 @@
+// Verify pretty-printing when nesting a builtin trait.
+
+template<class T> void f(__underlying_type(__underlying_type(T))); // { dg-error "" }
+// { dg-message "__underlying_type\\(__underlying_type\\(T\\)\\)\\)" "" { target *-*-* } .-1 }
+
+int main() {
+ f<int>(0); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type7.C b/gcc/testsuite/g++.dg/ext/underlying_type7.C
index 2d6ec51..137a0f0 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type7.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type7.C
@@ -9,7 +9,7 @@ enum class E6 : long { c = __LONG_MAX__ };
template<typename T>
void
- test(T, __underlying_type(T)) // { dg-message "sorry, unimplemented: mangling" }
+ test(T, __underlying_type(T)) // { dg-error "built-in trait '__underlying_type\\(T\\)'" }
{ }
int main()
diff --git a/gcc/testsuite/g++.dg/goacc/pr107028-1.C b/gcc/testsuite/g++.dg/goacc/pr107028-1.C
new file mode 100644
index 0000000..93b8743
--- /dev/null
+++ b/gcc/testsuite/g++.dg/goacc/pr107028-1.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+// { dg-additional-options "-fdump-tree-gimple" }
+
+class data_container {
+ public:
+ int data;
+};
+
+void test2() {
+ data_container a;
+#pragma acc data copyin(a, a.data)
+// { dg-final { scan-tree-dump {map\(to:a \[len: [0-9]+\]\)} "gimple" } }
+{ }
+}
diff --git a/gcc/testsuite/g++.dg/goacc/pr107028-2.C b/gcc/testsuite/g++.dg/goacc/pr107028-2.C
new file mode 100644
index 0000000..cf741bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/goacc/pr107028-2.C
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-additional-options "-fdump-tree-gimple" }
+
+#include <cstdlib>
+
+typedef float real_t;
+
+struct foo {
+ real_t *data;
+};
+
+#define n 1024
+
+int test3() {
+ real_t *a = (real_t *)malloc(n * sizeof(real_t));
+ struct foo b;
+ b.data = (real_t *)malloc(n * sizeof(real_t));
+
+ #pragma acc data copyin(a[0:n], b, b.data[0:n])
+// { dg-final { scan-tree-dump {map\(to:\*_[0-9]+ \[len: [0-9]+\]\) map\(attach:b.data \[bias: 0\]\) map\(to:b \[len: [0-9]+\]\) map\(to:\*a \[len: [0-9]+\]\)} "gimple" } }
+ { }
+
+ free (b.data);
+ free (a);
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/attrs-18.C b/gcc/testsuite/g++.dg/gomp/attrs-18.C
new file mode 100644
index 0000000..6858f3f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/attrs-18.C
@@ -0,0 +1,41 @@
+// { dg-do compile { target c++11 } }
+
+#pragma omp begin declare target
+#pragma omp begin declare target device_type (any)
+[[omp::directive (begin declare target, device_type (host))]];
+int a;
+[[omp::directive (end declare target)]];
+#pragma omp end declare target
+#pragma omp end declare target
+[[omp::directive (begin declare target device_type (nohost))]];
+int b;
+#pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
+#pragma omp begin declare target
+int c;
+[[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
+#pragma omp begin declare target device_type (host)
+[[omp::directive (begin declare target)]];
+int d;
+#pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
+#pragma omp begin declare target
+int e;
+[[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
+#pragma omp end declare target
+[[omp::directive (begin declare target device_type (any))]];
+[[omp::directive (begin declare target)]];
+int f;
+#pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
+#pragma omp begin declare target
+int g;
+[[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
+[[omp::directive (end declare target)]];
+[[omp::directive (begin declare target)]];
+#pragma omp begin declare target
+int h;
+#pragma omp end declare target
+#pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
+#pragma omp begin declare target
+[[omp::directive (begin declare target)]];
+int i;
+[[omp::directive (end declare target)]];
+[[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
diff --git a/gcc/testsuite/g++.dg/gomp/attrs-9.C b/gcc/testsuite/g++.dg/gomp/attrs-9.C
index fa02299..cf7cef4 100644
--- a/gcc/testsuite/g++.dg/gomp/attrs-9.C
+++ b/gcc/testsuite/g++.dg/gomp/attrs-9.C
@@ -14,6 +14,21 @@ int b, c, e;
int d;
[[omp::directive (end declare target)]];
[[omp::directive (end declare target)]];
+[[omp::directive (begin declare target, device_type (any))]];
+[[omp::directive (begin declare target)]];
+int f;
+[[omp::directive (end declare target)]];
+[[omp::directive (end declare target)]];
+[[omp::directive (begin declare target device_type (host))]];
+[[omp::directive (declare target)]];
+int g;
+[[omp::directive (end declare target)]];
+[[omp::directive (end declare target)]];
+[[omp::directive (declare target)]];
+[[omp::directive (begin declare target, device_type (nohost))]];
+int h;
+[[omp::directive (end declare target)]];
+[[omp::directive (end declare target)]];
[[omp::directive (nothing)]];
[[omp::directive (begin assumes no_openmp no_openmp_routines no_parallelism
absent (atomic, barrier, cancel, cancellation point)
diff --git a/gcc/testsuite/g++.dg/modules/100616_a.H b/gcc/testsuite/g++.dg/modules/100616_a.H
new file mode 100644
index 0000000..9bc42bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/100616_a.H
@@ -0,0 +1,5 @@
+// { dg-additional-options {-std=c++20 -fmodule-header} }
+// { dg-module-cmi {} }
+
+template<auto> struct C { };
+struct A { };
diff --git a/gcc/testsuite/g++.dg/modules/100616_b.C b/gcc/testsuite/g++.dg/modules/100616_b.C
new file mode 100644
index 0000000..416fd52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/100616_b.C
@@ -0,0 +1,7 @@
+// { dg-additional-options {-std=c++20 -fmodules-ts} }
+
+export module pr100616_b;
+// { dg-module-cmi pr100616_b }
+
+import "100616_a.H";
+export C<A{}> c1;
diff --git a/gcc/testsuite/g++.dg/modules/100616_c.C b/gcc/testsuite/g++.dg/modules/100616_c.C
new file mode 100644
index 0000000..5c79f5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/100616_c.C
@@ -0,0 +1,7 @@
+// { dg-additional-options {-std=c++20 -fmodules-ts} }
+
+export module pr100616_c;
+// { dg-module-cmi pr100616_c }
+
+import "100616_a.H";
+export C<A{}> c2;
diff --git a/gcc/testsuite/g++.dg/modules/100616_d.C b/gcc/testsuite/g++.dg/modules/100616_d.C
new file mode 100644
index 0000000..d9515db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/100616_d.C
@@ -0,0 +1,10 @@
+// { dg-additional-options {-std=c++20 -fmodules-ts} }
+
+import "100616_a.H";
+import pr100616_b;
+import pr100616_c;
+
+C<A{}> c0;
+using type = decltype(c0);
+using type = decltype(c1);
+using type = decltype(c2); // bogus error: types of c1 and c2 don't match
diff --git a/gcc/testsuite/g++.dg/modules/ben-1.map b/gcc/testsuite/g++.dg/modules/ben-1.map
index 182183a..ad84c11 100644
--- a/gcc/testsuite/g++.dg/modules/ben-1.map
+++ b/gcc/testsuite/g++.dg/modules/ben-1.map
@@ -1,3 +1,3 @@
$root .
-module:import partitions/module:import.mod
+module:import partitions/module-import.mod
module module.mod
diff --git a/gcc/testsuite/g++.dg/modules/ben-1_a.C b/gcc/testsuite/g++.dg/modules/ben-1_a.C
index 7e9b566..f1562eb 100644
--- a/gcc/testsuite/g++.dg/modules/ben-1_a.C
+++ b/gcc/testsuite/g++.dg/modules/ben-1_a.C
@@ -2,7 +2,7 @@
// { dg-additional-files ben-1.map }
export module module:import;
-// { dg-module-cmi =partitions/module:import.mod }
+// { dg-module-cmi =partitions/module-import.mod }
export int b() {
return 0;
diff --git a/gcc/testsuite/g++.dg/modules/pr102576_a.H b/gcc/testsuite/g++.dg/modules/pr102576_a.H
new file mode 100644
index 0000000..87ba9b5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/pr102576_a.H
@@ -0,0 +1,5 @@
+// PR c++/102576
+// { dg-additional-options -fmodule-header }
+// { dg-module-cmi {} }
+
+#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/modules/pr102576_b.C b/gcc/testsuite/g++.dg/modules/pr102576_b.C
new file mode 100644
index 0000000..10251ed
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/pr102576_b.C
@@ -0,0 +1,9 @@
+// PR c++/102576
+// { dg-additional-options -fmodules-ts }
+
+import "pr102576_a.H";
+
+int main() {
+ for (int i : {1, 2, 3})
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/cond-temp1.C b/gcc/testsuite/g++.dg/tree-ssa/cond-temp1.C
new file mode 100644
index 0000000..b156358
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/cond-temp1.C
@@ -0,0 +1,16 @@
+// Test that the ?: only creates one temporary.
+// { dg-additional-options "-fdump-tree-gimple" }
+// { dg-final { scan-tree-dump-times "struct A" 2 "gimple" } }
+
+struct A
+{
+ int i;
+ A(int);
+};
+
+bool b;
+int main()
+{
+ A a = 1;
+ a = b ? A(2) : A(3);
+}
diff --git a/gcc/testsuite/g++.target/aarch64/pr107080.C b/gcc/testsuite/g++.target/aarch64/pr107080.C
new file mode 100644
index 0000000..28212c0
--- /dev/null
+++ b/gcc/testsuite/g++.target/aarch64/pr107080.C
@@ -0,0 +1,19 @@
+// PR c++/107080
+// { dg-do compile }
+// { dg-options "" }
+
+template <typename T, typename T1>
+int
+foo (T x, T1 y)
+{
+ return 3;
+}
+
+int
+main ()
+{
+ return (foo (0.0f16, 0.0f16) + foo (0.0f16, (__fp16) 0.0)) != 6;
+}
+
+// { dg-final { scan-assembler "_Z3fooIDF16_DF16_EiT_T0_" } }
+// { dg-final { scan-assembler "_Z3fooIDF16_DhEiT_T0_" } }
diff --git a/gcc/testsuite/g++.target/arm/pr107080.C b/gcc/testsuite/g++.target/arm/pr107080.C
new file mode 100644
index 0000000..89a5746
--- /dev/null
+++ b/gcc/testsuite/g++.target/arm/pr107080.C
@@ -0,0 +1,19 @@
+// PR c++/107080
+// { dg-do compile }
+// { dg-options "-mfp16-format=ieee" }
+
+template <typename T, typename T1>
+int
+foo (T x, T1 y)
+{
+ return 3;
+}
+
+int
+main ()
+{
+ return (foo (0.0f16, 0.0f16) + foo (0.0f16, (__fp16) 0.0)) != 6;
+}
+
+// { dg-final { scan-assembler "_Z3fooIDF16_DF16_EiT_T0_" } }
+// { dg-final { scan-assembler "_Z3fooIDF16_DhEiT_T0_" } }
diff --git a/gcc/testsuite/gcc.dg/c11-float-7.c b/gcc/testsuite/gcc.dg/c11-float-7.c
new file mode 100644
index 0000000..a8a7ef5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-float-7.c
@@ -0,0 +1,24 @@
+/* Test C11 definition of LDBL_EPSILON. Based on
+ gcc.target/powerpc/rs6000-ldouble-2.c. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <float.h>
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ volatile long double ee = 1.0;
+ long double eps = ee;
+ while (ee + 1.0 != 1.0)
+ {
+ eps = ee;
+ ee = eps / 2;
+ }
+ if (eps != LDBL_EPSILON)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c2x-attr-noreturn-1.c b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-1.c
new file mode 100644
index 0000000..d903c09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-1.c
@@ -0,0 +1,56 @@
+/* Test C2x noreturn attribute: valid uses. */
+/* { dg-do compile } */
+/* { dg-options "-std=c2x -pedantic-errors" } */
+
+[[noreturn]] void exit (int);
+
+[[__noreturn__]] int f1 (void);
+
+[[_Noreturn]] void f2 (void);
+
+[[___Noreturn__]] static void f3 (void) { exit (0); }
+
+/* Returning from a noreturn function is undefined at runtime, not a
+ constraint violation, but recommended practice is to diagnose if
+ such a return appears possible. */
+
+[[noreturn]] int
+f4 (void)
+{
+ return 1; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
+}
+
+[[__noreturn__]] void
+f5 (void)
+{
+ return; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
+}
+
+[[_Noreturn]] void
+f6 (void)
+{
+} /* { dg-warning "does return" } */
+
+[[___Noreturn__]] void
+f7 (int a)
+{
+ if (a)
+ exit (0);
+} /* { dg-warning "does return" } */
+
+/* Declarations need not all have the attribute (buf if the first does not,
+ there is undefined behavior). */
+
+void f2 (void);
+
+/* Duplicate attribute, and use with _Noreturn, is OK. */
+[[noreturn]] [[noreturn]] [[noreturn, __noreturn__]] void _Noreturn f9 (void);
+
+/* The attribute does not affect type compatibility. */
+
+void (*fp) (void) = f5;
+
+/* Unlike the function specifier, the attribute may be used on main. */
+[[noreturn]] int main ();
diff --git a/gcc/testsuite/gcc.dg/c2x-attr-noreturn-2.c b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-2.c
new file mode 100644
index 0000000..331da4a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-2.c
@@ -0,0 +1,72 @@
+/* Test C2x noreturn attribute: invalid contexts. */
+/* { dg-do compile } */
+/* { dg-options "-std=c2x -pedantic-errors" } */
+
+[[noreturn]]; /* { dg-error "ignored" } */
+
+int [[noreturn]] var; /* { dg-error "ignored" } */
+
+int array_with_dep_type[2] [[noreturn]]; /* { dg-error "ignored" } */
+
+void fn_with_dep_type () [[noreturn]]; /* { dg-error "ignored" } */
+
+int z = sizeof (int [[__noreturn__]]); /* { dg-error "ignored" } */
+
+[[noreturn]] int x1; /* { dg-error "can only be applied to functions" } */
+int x2 [[__noreturn__]]; /* { dg-error "can only be applied to functions" } */
+
+[[_Noreturn]] void (*fp) (); /* { dg-error "can only be applied to functions" } */
+
+void
+f (void)
+{
+ int a;
+ [[_Noreturn]]; /* { dg-error "ignored" } */
+ [[___Noreturn__]] a = 1; /* { dg-error "ignored" } */
+}
+
+int
+g ([[noreturn]] int x, int y) /* { dg-error "can only be applied to functions" } */
+{
+ [[noreturn]] typedef float F; /* { dg-error "can only be applied to functions" } */
+ [[noreturn]] int a; /* { dg-error "can only be applied to functions" } */
+ int b [[__noreturn__]]; /* { dg-error "can only be applied to functions" } */
+ int c [[noreturn]]; /* { dg-error "can only be applied to functions" } */
+ [[__noreturn__]] label1: ; /* { dg-error "can only be applied to functions" } */
+ c = y;
+ [[noreturn]] label2: ; /* { dg-error "can only be applied to functions" } */
+ return y;
+}
+
+struct [[_Noreturn]] s { double d; }; /* { dg-error "can only be applied to functions" } */
+
+struct s2
+{
+ [[___Noreturn__]] int a; /* { dg-error "can only be applied to functions" } */
+ int b [[noreturn]]; /* { dg-error "can only be applied to functions" } */
+} x;
+
+enum e { E1 [[noreturn]] }; /* { dg-error "can only be applied to functions" } */
+
+union [[_Noreturn]] u { int x; }; /* { dg-error "can only be applied to functions" } */
+
+enum [[noreturn]] eu { E2 }; /* { dg-error "can only be applied to functions" } */
+
+void fx ([[noreturn]] int p); /* { dg-error "can only be applied" } */
+
+union u2
+{
+ [[noreturn]] int a; /* { dg-error "can only be applied to functions" } */
+ int b [[noreturn]]; /* { dg-error "can only be applied to functions" } */
+} y;
+
+void
+g2 (int x)
+{
+ switch (x)
+ {
+ [[noreturn]] case 1: ; /* { dg-error "can only be applied to functions" } */
+ [[__noreturn__]] case 2: ; /* { dg-error "can only be applied to functions" } */
+ [[noreturn]] default: ; /* { dg-error "can only be applied to functions" } */
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/c2x-attr-noreturn-3.c b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-3.c
new file mode 100644
index 0000000..aaf21e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2x-attr-noreturn-3.c
@@ -0,0 +1,11 @@
+/* Test C2x noreturn attribute: invalid syntax. */
+/* { dg-do compile } */
+/* { dg-options "-std=c2x -pedantic-errors" } */
+
+[[noreturn()]] void a(); /* { dg-error "does not take any arguments" } */
+
+[[__noreturn__(0)]] void b(); /* { dg-error "does not take any arguments|expected" } */
+
+[[_Noreturn("", 123)]] void c(); /* { dg-error "does not take any arguments|expected" } */
+
+[[___Noreturn__("")]] void d(); /* { dg-error "does not take any arguments|expected" } */
diff --git a/gcc/testsuite/gcc.dg/c2x-float-12.c b/gcc/testsuite/gcc.dg/c2x-float-12.c
new file mode 100644
index 0000000..40900bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2x-float-12.c
@@ -0,0 +1,19 @@
+/* Test C2x definition of LDBL_EPSILON. */
+/* { dg-do run } */
+/* { dg-options "-std=c2x -pedantic-errors" } */
+
+#include <float.h>
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ volatile long double x = 1.0L;
+ for (int i = 0; i < LDBL_MANT_DIG - 1; i++)
+ x /= 2;
+ if (x != LDBL_EPSILON)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c2x-has-c-attribute-2.c b/gcc/testsuite/gcc.dg/c2x-has-c-attribute-2.c
index 6a379e9..3c34ab6 100644
--- a/gcc/testsuite/gcc.dg/c2x-has-c-attribute-2.c
+++ b/gcc/testsuite/gcc.dg/c2x-has-c-attribute-2.c
@@ -34,6 +34,22 @@
#error "bad result for __fallthrough__"
#endif
+#if __has_c_attribute (noreturn) != 202202L
+#error "bad result for noreturn"
+#endif
+
+#if __has_c_attribute (__noreturn__) != 202202L
+#error "bad result for __noreturn__"
+#endif
+
+#if __has_c_attribute (_Noreturn) != 202202L
+#error "bad result for _Noreturn"
+#endif
+
+#if __has_c_attribute (___Noreturn__) != 202202L
+#error "bad result for ___Noreturn__"
+#endif
+
/* Macros in the attribute name are expanded. */
#define foo deprecated
#if __has_c_attribute (foo) != 201904L
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
index 38fc77c..89d2975 100644
--- a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
@@ -7,18 +7,17 @@ void f (unsigned);
#define CODE_WITH_WARNING \
int a; /* { dg-message "was declared here" } */ \
- f (a) /* { dg-warning "used uninitialized" } */
+ f (a) /* { dg-error "used uninitialized" } */
#pragma GCC diagnostic ignored "-Wuninitialized"
void
g (void)
{
+ /* No warning expected here since the #pragma is in effect. */
CODE_WITH_WARNING;
}
-#pragma GCC diagnostic push
-
#pragma GCC diagnostic error "-Wuninitialized"
void
@@ -26,3 +25,5 @@ h (void)
{
CODE_WITH_WARNING; /* { dg-message "in expansion of macro 'CODE_WITH_WARNING'" } */
}
+
+/* { dg-regexp {.*some warnings being treated as errors} } */
diff --git a/gcc/testsuite/gcc.dg/infinite-loop.c b/gcc/testsuite/gcc.dg/infinite-loop.c
new file mode 100644
index 0000000..25037a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/infinite-loop.c
@@ -0,0 +1,26 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+void link_error (void);
+
+void __attribute__ ((noinline,noipa))
+foo(int a)
+{
+ int b = 0;
+
+ while (1)
+ {
+ if (!a)
+ break;
+ b = 1;
+ }
+
+ if (b != 0)
+ link_error ();
+}
+
+int
+main()
+{
+ foo (0);
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr102892-1.c b/gcc/testsuite/gcc.dg/pr102892-1.c
index f08b2b8..faca3f2 100644
--- a/gcc/testsuite/gcc.dg/pr102892-1.c
+++ b/gcc/testsuite/gcc.dg/pr102892-1.c
@@ -12,7 +12,7 @@ int
main ()
{
long c = 0;
- for (long a; a < 1; ++a)
+ for (long a = 0; a < 1; ++a)
for (; c <= 1; c++) {
bar();
if (1 == b[c][0])
diff --git a/gcc/testsuite/gcc.dg/pr104992.c b/gcc/testsuite/gcc.dg/pr104992.c
index 217c89a..82f8c75 100644
--- a/gcc/testsuite/gcc.dg/pr104992.c
+++ b/gcc/testsuite/gcc.dg/pr104992.c
@@ -54,4 +54,5 @@ __attribute__((noipa)) unsigned waldo (unsigned x, unsigned y, unsigned z) {
return x / y * z == x;
}
-/* { dg-final {scan-tree-dump-times " % " 9 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " % " 9 "optimized" { target { ! vect_int_mod } } } } */
+/* { dg-final { scan-tree-dump-times " % " 6 "optimized" { target vect_int_mod } } } */
diff --git a/gcc/testsuite/gcc.dg/pr107109.c b/gcc/testsuite/gcc.dg/pr107109.c
new file mode 100644
index 0000000..e3036f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr107109.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+int printf(const char *, ...);
+int a, b;
+void c() {
+ int d, e;
+ L:
+ a = (b && a) ^ 2756578370;
+ d = ~a + (e ^ d) ^ 2756578370;
+ if (!d)
+ printf("%d", a);
+ d = a / e;
+ goto L;
+}
+int main() {
+ if (a)
+ c();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr25521.c b/gcc/testsuite/gcc.dg/pr25521.c
new file mode 100644
index 0000000..74fe2ae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr25521.c
@@ -0,0 +1,10 @@
+/* PR middle-end/25521 - place `const volatile' objects in read-only
+ sections.
+
+ { dg-require-effective-target elf }
+ { dg-do compile } */
+
+const volatile int foo = 30;
+
+
+/* { dg-final { scan-assembler "\\.rodata" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr107130.c b/gcc/testsuite/gcc.dg/tree-ssa/pr107130.c
new file mode 100644
index 0000000..11fb816
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr107130.c
@@ -0,0 +1,19 @@
+// { dg-do compile }
+// { dg-options "-Os -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre -fdump-tree-vrp1" }
+
+static inline int
+foo (int i)
+{
+ return __builtin_ffsl (i);
+}
+
+int
+main (void)
+{
+ int x = foo (41);
+ if (x != 1)
+ __builtin_abort ();
+ return 0;
+}
+
+// { dg-final { scan-tree-dump-not "builtin_abort" "vrp1" } }
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr79095.c b/gcc/testsuite/gcc.dg/tree-ssa/pr79095.c
index f635fca..b175187 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr79095.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr79095.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-evrp" } */
extern void arf (unsigned x, unsigned y);
extern void baz (unsigned x, unsigned y);
@@ -429,8 +429,8 @@ f4nro (unsigned a, unsigned b)
}
/* All calls to baz should still reference a & b as arguments. */
-/* { dg-final { scan-tree-dump-times "baz \\(a_\[0-9\]+\\(D\\), b_\[0-9\]+\\)" 32 "vrp1"} } */
+/* { dg-final { scan-tree-dump-times "baz \\(a_\[0-9\]+\\(D\\), b_\[0-9\]+\\)" 32 "evrp"} } */
/* All calls to arf should have constant arguments. */
-/* { dg-final { scan-tree-dump-times "arf \\(\[0-9\]+, \[0-9\]+\\)" 32 "vrp1"} } */
+/* { dg-final { scan-tree-dump-times "arf \\(\[0-9\]+, \[0-9\]+\\)" 32 "evrp"} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_15 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_15
index bc64539..6b425ea 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/info_15
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_15
@@ -1,6 +1,6 @@
processor : 0
BogoMIPS : 100.00
-Features : Lorem ipsum dolor sit ametd rebum expetendis per at Dolor lucilius referrentur ei mei virtute eruditi eum ne Iisque verter svesm4 asimd fp
+Features : Lorem ipsum dolor sit ametd rebum expetendis per at Dolor lucilius referrentur ei mei virtute eruditi eum ne Iisque verter svesm4 asimd fp sve sve2 fphp asimdhp sm3 sm4
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_16 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_16
index 2c04ff1..26f01c4 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/info_16
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_16
@@ -1,6 +1,6 @@
processor : 0
BogoMIPS : 100.00
-Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp sve sve2
+Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp sve sve2 fphp asimdhp
CPU implementer : 0xfe
CPU architecture: 8
CPU variant : 0x0
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_17 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_17
index 2c04ff1..26f01c4 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/info_17
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_17
@@ -1,6 +1,6 @@
processor : 0
BogoMIPS : 100.00
-Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp sve sve2
+Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp sve sve2 fphp asimdhp
CPU implementer : 0xfe
CPU architecture: 8
CPU variant : 0x0
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_8 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_8
index d6d9d03..76da16c 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/info_8
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_8
@@ -1,6 +1,6 @@
processor : 0
BogoMIPS : 100.00
-Features : asimd sve fp
+Features : asimd sve fp fphp asimdhp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_9 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_9
index c9aa4a9..14703dd 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/info_9
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_9
@@ -1,6 +1,6 @@
processor : 0
BogoMIPS : 100.00
-Features : asimd fp svesm4
+Features : asimd fp svesm4 sve sve2 fphp asimdhp sm3 sm4
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c
index f155f51..8499f87 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto} } } */
/* Test a normal looking procinfo. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c
index 6a75396..ddb06b8 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+nofp\+nosimd} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+nofp} } } */
/* Test one with no entry in feature list. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c
index b7b3a8e..5516690 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto} } } */
/* Test one with mixed order of feature bits. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c
index a424e7c..2f963bb 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod\+sve2} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto\+sve2} } } */
/* Test a normal looking procinfo. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c
index c269c5f..c68a697 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod\+sve2} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto\+sve2} } } */
/* Test a normal looking procinfo. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c
index aad71f4..edbdb56 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c
@@ -7,6 +7,6 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+nofp\+nosimd} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+nofp} } } */
/* Test one where asimd is provided byt no fp. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c
index da72052..7608e88 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c
@@ -7,7 +7,7 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+fp16\+crypto} } } */
/* Test one where the feature bits for crypto and fp16 are given in
same order as declared in options file. */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c
index 96ad4c1..72b14b4 100644
--- a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c
+++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c
@@ -7,7 +7,7 @@ int main()
return 0;
}
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+fp16\+crypto} } } */
/* Test one where the crypto and fp16 options are specified in different
order from what is in the options file. */
diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_2.c b/gcc/testsuite/gcc.target/aarch64/options_set_2.c
index 3476feb..f82cb5f 100644
--- a/gcc/testsuite/gcc.target/aarch64/options_set_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/options_set_2.c
@@ -6,6 +6,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
/* Check to see if crc and crypto are maintained if crypto specified. */
diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_3.c b/gcc/testsuite/gcc.target/aarch64/options_set_3.c
index 4558339..7d350cf 100644
--- a/gcc/testsuite/gcc.target/aarch64/options_set_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/options_set_3.c
@@ -6,6 +6,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
/* Check if smallest set is maintained when outputting. */
diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_4.c b/gcc/testsuite/gcc.target/aarch64/options_set_4.c
index 15514bf..5370e02 100644
--- a/gcc/testsuite/gcc.target/aarch64/options_set_4.c
+++ b/gcc/testsuite/gcc.target/aarch64/options_set_4.c
@@ -6,7 +6,7 @@ int main ()
return 0;
}
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
/* Check if individual bits that make up a grouping is specified that only the
- grouping is kept. */ \ No newline at end of file
+ grouping is kept. */
diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_6.c b/gcc/testsuite/gcc.target/aarch64/options_set_6.c
index 90a0559..2a1d7fe 100644
--- a/gcc/testsuite/gcc.target/aarch64/options_set_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/options_set_6.c
@@ -6,7 +6,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+aes} 1 } } */
-/* Group as a whole was requested to be turned on, crypto itself is a bit and so
- just turning off one feature can't turn it off. */
+/* +crypto turns on +aes and +sha2, but +nosha2 disables +crypto. */
diff --git a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_4.c b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_4.c
new file mode 100644
index 0000000..0e6461f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_4.c
@@ -0,0 +1,47 @@
+#pragma GCC target "+nothing+dotprod"
+#ifndef __ARM_FEATURE_FMA
+#error Foo
+#endif
+
+#pragma GCC target "+nothing+aes"
+#ifndef __ARM_FEATURE_FMA
+#error Foo
+#endif
+
+#pragma GCC target "+nothing+sha2"
+#ifndef __ARM_FEATURE_FMA
+#error Foo
+#endif
+
+#pragma GCC target "+nothing+sha3"
+#ifndef __ARM_FEATURE_FMA
+#error Foo
+#endif
+
+#pragma GCC target "+nothing+sm4"
+#ifndef __ARM_FEATURE_FMA
+#error Foo
+#endif
+
+#pragma GCC target "+crypto+noaes"
+#ifdef __ARM_FEATURE_CRYPTO
+#error Foo
+#endif
+
+#pragma GCC target "+crypto+nosha2"
+#ifdef __ARM_FEATURE_CRYPTO
+#error Foo
+#endif
+
+#pragma GCC target "+nothing+sve2-sha3"
+#ifndef __ARM_FEATURE_SHA2
+#error Foo
+#endif
+
+#pragma GCC target "+sve2-sha3+nosha2"
+#ifdef __ARM_FEATURE_SHA3
+#error Foo
+#endif
+#ifdef __ARM_FEATURE_SVE2_SHA3
+#error Foo
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_15.c b/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
index 108b372..069a001 100644
--- a/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_15.c
@@ -10,4 +10,4 @@ foo (int a)
return a + 1;
}
-/* { dg-final { scan-assembler-times "\\.arch armv8-a\\+nofp\\+nosimd\n" 1 } } */
+/* { dg-final { scan-assembler-times "\\.arch armv8-a\\+nofp\n" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
index b0fefe5..5188f1d 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
@@ -144,6 +144,8 @@ int secure2 (s_bar_ptr s_bar_p)
** bx r[0-3]
** |
** blx r[0-3]
+** |
+** b secure1
** )
** ...
*/
diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/vrev64q_m_s16-clobber.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vrev64q_m_s16-clobber.c
new file mode 100644
index 0000000..6464c96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/vrev64q_m_s16-clobber.c
@@ -0,0 +1,17 @@
+/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
+/* { dg-add-options arm_v8_1m_mve_fp } */
+/* { dg-additional-options "-O2" } */
+
+#include "arm_mve.h"
+
+int16x8_t
+foo (int16x8_t a, mve_pred16_t p)
+{
+ return vrev64q_m_s16 (a, a, p);
+}
+
+float16x8_t
+foo2 (float16x8_t a, mve_pred16_t p)
+{
+ return vrev64q_m_f16 (a, a, p);
+}
diff --git a/gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c b/gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c
index e35eb11..816980d1 100644
--- a/gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c
+++ b/gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c
@@ -7,7 +7,7 @@
/*
**off_load8_0:
** ...
-** vldrb.8 q0, \[r0, #16\]
+** vldrb.8 q[0-7], \[r0, #16\]
** ...
*/
int8x16_t off_load8_0 (int8_t * a)
@@ -18,7 +18,7 @@ int8x16_t off_load8_0 (int8_t * a)
/*
**off_load8_1:
** ...
-** vldrb.u16 q0, \[r0, #1\]
+** vldrb.u16 q[0-7], \[r0, #1\]
** ...
*/
uint16x8_t off_load8_1 (uint8_t * a)
@@ -29,7 +29,7 @@ uint16x8_t off_load8_1 (uint8_t * a)
/*
**off_load8_2:
** ...
-** vldrb.s32 q0, \[r0, #127\]
+** vldrb.s32 q[0-7], \[r0, #127\]
** ...
*/
int32x4_t off_load8_2 (int8_t * a)
@@ -40,7 +40,7 @@ int32x4_t off_load8_2 (int8_t * a)
/*
**off_load8_3:
** ...
-** vldrb.8 q0, \[r0, #-127\]
+** vldrb.8 q[0-7], \[r0, #-127\]
** ...
*/
uint8x16_t off_load8_3 (uint8_t * a)
@@ -51,7 +51,7 @@ uint8x16_t off_load8_3 (uint8_t * a)
/*
**not_off_load8_0:
** ...
-** vldrb.8 q0, \[r[0-9]+\]
+** vldrb.8 q[0-7], \[r[0-7]+\]
** ...
*/
int8x16_t not_off_load8_0 (int8_t * a)
@@ -62,7 +62,7 @@ int8x16_t not_off_load8_0 (int8_t * a)
/*
**off_loadfp16_0:
** ...
-** vldrh.16 q0, \[r0, #-244\]
+** vldrh.16 q[0-7], \[r0, #-244\]
** ...
*/
float16x8_t off_loadfp16_0 (float16_t *a)
@@ -73,7 +73,7 @@ float16x8_t off_loadfp16_0 (float16_t *a)
/*
**off_load16_0:
** ...
-** vldrh.16 q0, \[r0, #-2\]
+** vldrh.16 q[0-7], \[r0, #-2\]
** ...
*/
uint16x8_t off_load16_0 (uint16_t * a)
@@ -84,7 +84,7 @@ uint16x8_t off_load16_0 (uint16_t * a)
/*
**off_load16_1:
** ...
-** vldrh.u32 q0, \[r0, #254\]
+** vldrh.u32 q[0-7], \[r0, #254\]
** ...
*/
uint32x4_t off_load16_1 (uint16_t * a)
@@ -95,7 +95,7 @@ uint32x4_t off_load16_1 (uint16_t * a)
/*
**not_off_load16_0:
** ...
-** vldrh.16 q0, \[r[0-9]+\]
+** vldrh.16 q[0-7], \[r[0-7]+\]
** ...
*/
int16x8_t not_off_load16_0 (int8_t * a)
@@ -106,7 +106,7 @@ int16x8_t not_off_load16_0 (int8_t * a)
/*
**not_off_load16_1:
** ...
-** vldrh.u32 q0, \[r[0-9]+\]
+** vldrh.u32 q[0-7], \[r[0-7]+\]
** ...
*/
uint32x4_t not_off_load16_1 (uint16_t * a)
@@ -117,7 +117,7 @@ uint32x4_t not_off_load16_1 (uint16_t * a)
/*
**off_loadfp32_0:
** ...
-** vldrw.32 q0, \[r0, #24\]
+** vldrw.32 q[0-7], \[r0, #24\]
** ...
*/
float32x4_t off_loadfp32_0 (float32_t *a)
@@ -128,7 +128,7 @@ float32x4_t off_loadfp32_0 (float32_t *a)
/*
**off_load32_0:
** ...
-** vldrw.32 q0, \[r0, #4\]
+** vldrw.32 q[0-7], \[r0, #4\]
** ...
*/
uint32x4_t off_load32_0 (uint32_t * a)
@@ -139,7 +139,7 @@ uint32x4_t off_load32_0 (uint32_t * a)
/*
**off_load32_1:
** ...
-** vldrw.32 q0, \[r0, #-508\]
+** vldrw.32 q[0-7], \[r0, #-508\]
** ...
*/
int32x4_t off_load32_1 (int32_t * a)
@@ -149,7 +149,7 @@ int32x4_t off_load32_1 (int32_t * a)
/*
**pre_load8_0:
** ...
-** vldrb.8 q[0-9]+, \[r0, #16\]!
+** vldrb.8 q[0-7], \[r0, #16\]!
** ...
*/
int8_t* pre_load8_0 (int8_t * a, int8x16_t *v)
@@ -162,7 +162,7 @@ int8_t* pre_load8_0 (int8_t * a, int8x16_t *v)
/*
**pre_load8_1:
** ...
-** vldrb.u16 q[0-9]+, \[r0, #4\]!
+** vldrb.u16 q[0-7], \[r0, #4\]!
** ...
*/
uint8_t* pre_load8_1 (uint8_t * a, uint16x8_t *v)
@@ -175,7 +175,7 @@ uint8_t* pre_load8_1 (uint8_t * a, uint16x8_t *v)
/*
**pre_loadfp16_0:
** ...
-** vldrh.16 q[0-9]+, \[r0, #128\]!
+** vldrh.16 q[0-7], \[r0, #128\]!
** ...
*/
float16_t* pre_loadfp16_0 (float16_t *a, float16x8_t *v)
@@ -188,7 +188,7 @@ float16_t* pre_loadfp16_0 (float16_t *a, float16x8_t *v)
/*
**pre_load16_0:
** ...
-** vldrh.16 q[0-9]+, \[r0, #-254\]!
+** vldrh.16 q[0-7], \[r0, #-254\]!
** ...
*/
int16_t* pre_load16_0 (int16_t * a, int16x8_t *v)
@@ -201,7 +201,7 @@ int16_t* pre_load16_0 (int16_t * a, int16x8_t *v)
/*
**pre_load16_1:
** ...
-** vldrh.s32 q[0-9]+, \[r0, #52\]!
+** vldrh.s32 q[0-7], \[r0, #52\]!
** ...
*/
int16_t* pre_load16_1 (int16_t * a, int32x4_t *v)
@@ -214,7 +214,7 @@ int16_t* pre_load16_1 (int16_t * a, int32x4_t *v)
/*
**pre_loadfp32_0:
** ...
-** vldrw.32 q[0-9]+, \[r0, #-72\]!
+** vldrw.32 q[0-7], \[r0, #-72\]!
** ...
*/
float32_t* pre_loadfp32_0 (float32_t *a, float32x4_t *v)
@@ -228,7 +228,7 @@ float32_t* pre_loadfp32_0 (float32_t *a, float32x4_t *v)
/*
**pre_load32_0:
** ...
-** vldrw.32 q[0-9]+, \[r0, #-4\]!
+** vldrw.32 q[0-7], \[r0, #-4\]!
** ...
*/
uint32_t* pre_load32_0 (uint32_t * a, uint32x4_t *v)
@@ -242,7 +242,7 @@ uint32_t* pre_load32_0 (uint32_t * a, uint32x4_t *v)
/*
**post_load8_0:
** ...
-** vldrb.8 q[0-9]+, \[r0\], #26
+** vldrb.8 q[0-7], \[r0\], #26
** ...
*/
uint8_t* post_load8_0 (uint8_t * a, uint8x16_t *v)
@@ -255,7 +255,7 @@ uint8_t* post_load8_0 (uint8_t * a, uint8x16_t *v)
/*
**post_load8_1:
** ...
-** vldrb.s16 q[0-9]+, \[r0\], #-1
+** vldrb.s16 q[0-7], \[r0\], #-1
** ...
*/
int8_t* post_load8_1 (int8_t * a, int16x8_t *v)
@@ -268,7 +268,7 @@ int8_t* post_load8_1 (int8_t * a, int16x8_t *v)
/*
**post_load8_2:
** ...
-** vldrb.8 q[0-9]+, \[r0\], #26
+** vldrb.8 q[0-7], \[r0\], #26
** ...
*/
uint8_t* post_load8_2 (uint8_t * a, uint8x16_t *v)
@@ -281,7 +281,7 @@ uint8_t* post_load8_2 (uint8_t * a, uint8x16_t *v)
/*
**post_load8_3:
** ...
-** vldrb.s16 q[0-9]+, \[r0\], #-1
+** vldrb.s16 q[0-7], \[r0\], #-1
** ...
*/
int8_t* post_load8_3 (int8_t * a, int16x8_t *v)
@@ -294,7 +294,7 @@ int8_t* post_load8_3 (int8_t * a, int16x8_t *v)
/*
**post_loadfp16_0:
** ...
-** vldrh.16 q[0-9]+, \[r0\], #-24
+** vldrh.16 q[0-7], \[r0\], #-24
** ...
*/
float16_t* post_loadfp16_0 (float16_t *a, float16x8_t *v)
@@ -307,7 +307,7 @@ float16_t* post_loadfp16_0 (float16_t *a, float16x8_t *v)
/*
**post_load16_0:
** ...
-** vldrh.16 q[0-9]+, \[r0\], #-126
+** vldrh.16 q[0-7], \[r0\], #-126
** ...
*/
uint16_t* post_load16_0 (uint16_t * a, uint16x8_t *v)
@@ -320,7 +320,7 @@ uint16_t* post_load16_0 (uint16_t * a, uint16x8_t *v)
/*
**post_load16_1:
** ...
-** vldrh.u32 q[0-9]+, \[r0\], #16
+** vldrh.u32 q[0-7], \[r0\], #16
** ...
*/
uint16_t* post_load16_1 (uint16_t * a, uint32x4_t *v)
@@ -333,7 +333,7 @@ uint16_t* post_load16_1 (uint16_t * a, uint32x4_t *v)
/*
**post_loadfp32_0:
** ...
-** vldrw.32 q[0-9]+, \[r0\], #4
+** vldrw.32 q[0-7], \[r0\], #4
** ...
*/
float32_t* post_loadfp32_0 (float32_t *a, float32x4_t *v)
@@ -346,7 +346,7 @@ float32_t* post_loadfp32_0 (float32_t *a, float32x4_t *v)
/*
**post_load32_0:
** ...
-** vldrw.32 q[0-9]+, \[r0\], #-16
+** vldrw.32 q[0-7], \[r0\], #-16
** ...
*/
int32_t* post_load32_0 (int32_t * a, int32x4_t *v)
diff --git a/gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c b/gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c
index 632f5b4..11df114 100644
--- a/gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c
+++ b/gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c
@@ -7,7 +7,7 @@
/*
**off_store8_0:
** ...
-** vstrb.8 q0, \[r0, #16\]
+** vstrb.8 q[0-7], \[r0, #16\]
** ...
*/
uint8_t *off_store8_0 (uint8_t * a, uint8x16_t v)
@@ -19,7 +19,7 @@ uint8_t *off_store8_0 (uint8_t * a, uint8x16_t v)
/*
**off_store8_1:
** ...
-** vstrb.16 q0, \[r0, #-1\]
+** vstrb.16 q[0-7], \[r0, #-1\]
** ...
*/
int8_t *off_store8_1 (int8_t * a, int16x8_t v)
@@ -31,7 +31,7 @@ int8_t *off_store8_1 (int8_t * a, int16x8_t v)
/*
**off_store8_2:
** ...
-** vstrb.32 q0, \[r0, #-127\]
+** vstrb.32 q[0-7], \[r0, #-127\]
** ...
*/
uint8_t *off_store8_2 (uint8_t * a, uint32x4_t v)
@@ -43,7 +43,7 @@ uint8_t *off_store8_2 (uint8_t * a, uint32x4_t v)
/*
**off_store8_3:
** ...
-** vstrb.8 q0, \[r0, #127\]
+** vstrb.8 q[0-7], \[r0, #127\]
** ...
*/
int8_t *off_store8_3 (int8_t * a, int8x16_t v)
@@ -55,7 +55,7 @@ int8_t *off_store8_3 (int8_t * a, int8x16_t v)
/*
**not_off_store8_0:
** ...
-** vstrb.8 q0, \[r[0-9]+\]
+** vstrb.8 q[0-7], \[r[0-7]+\]
** ...
*/
uint8_t *not_off_store8_0 (uint8_t * a, uint8x16_t v)
@@ -67,7 +67,7 @@ uint8_t *not_off_store8_0 (uint8_t * a, uint8x16_t v)
/*
**off_storefp16_0:
** ...
-** vstrh.16 q0, \[r0, #250\]
+** vstrh.16 q[0-7], \[r0, #250\]
** ...
*/
float16_t *off_storefp16_0 (float16_t *a, float16x8_t v)
@@ -79,7 +79,7 @@ float16_t *off_storefp16_0 (float16_t *a, float16x8_t v)
/*
**off_store16_0:
** ...
-** vstrh.16 q0, \[r0, #4\]
+** vstrh.16 q[0-7], \[r0, #4\]
** ...
*/
int16_t *off_store16_0 (int16_t * a, int16x8_t v)
@@ -91,7 +91,7 @@ int16_t *off_store16_0 (int16_t * a, int16x8_t v)
/*
**off_store16_1:
** ...
-** vstrh.32 q0, \[r0, #-254\]
+** vstrh.32 q[0-7], \[r0, #-254\]
** ...
*/
int16_t *off_store16_1 (int16_t * a, int32x4_t v)
@@ -103,7 +103,7 @@ int16_t *off_store16_1 (int16_t * a, int32x4_t v)
/*
**not_off_store16_0:
** ...
-** vstrh.16 q0, \[r[0-9]+\]
+** vstrh.16 q[0-7], \[r[0-7]+\]
** ...
*/
uint8_t *not_off_store16_0 (uint8_t * a, uint16x8_t v)
@@ -115,7 +115,7 @@ uint8_t *not_off_store16_0 (uint8_t * a, uint16x8_t v)
/*
**not_off_store16_1:
** ...
-** vstrh.32 q0, \[r[0-9]+\]
+** vstrh.32 q[0-7], \[r[0-7]+\]
** ...
*/
int16_t *not_off_store16_1 (int16_t * a, int32x4_t v)
@@ -127,7 +127,7 @@ int16_t *not_off_store16_1 (int16_t * a, int32x4_t v)
/*
**off_storefp32_0:
** ...
-** vstrw.32 q0, \[r0, #-412\]
+** vstrw.32 q[0-7], \[r0, #-412\]
** ...
*/
float32_t *off_storefp32_0 (float32_t *a, float32x4_t v)
@@ -139,7 +139,7 @@ float32_t *off_storefp32_0 (float32_t *a, float32x4_t v)
/*
**off_store32_0:
** ...
-** vstrw.32 q0, \[r0, #-4\]
+** vstrw.32 q[0-7], \[r0, #-4\]
** ...
*/
int32_t *off_store32_0 (int32_t * a, int32x4_t v)
@@ -151,7 +151,7 @@ int32_t *off_store32_0 (int32_t * a, int32x4_t v)
/*
**off_store32_1:
** ...
-** vstrw.32 q0, \[r0, #508\]
+** vstrw.32 q[0-7], \[r0, #508\]
** ...
*/
uint32_t *off_store32_1 (uint32_t * a, uint32x4_t v)
@@ -163,7 +163,7 @@ uint32_t *off_store32_1 (uint32_t * a, uint32x4_t v)
/*
**pre_store8_0:
** ...
-** vstrb.8 q[0-9]+, \[r0, #-16\]!
+** vstrb.8 q[0-7], \[r0, #-16\]!
** ...
*/
uint8_t* pre_store8_0 (uint8_t * a, uint8x16_t v)
@@ -176,7 +176,7 @@ uint8_t* pre_store8_0 (uint8_t * a, uint8x16_t v)
/*
**pre_store8_1:
** ...
-** vstrb.16 q[0-9]+, \[r0, #4\]!
+** vstrb.16 q[0-7], \[r0, #4\]!
** ...
*/
int8_t* pre_store8_1 (int8_t * a, int16x8_t v)
@@ -189,7 +189,7 @@ int8_t* pre_store8_1 (int8_t * a, int16x8_t v)
/*
**pre_storefp16_0:
** ...
-** vstrh.16 q0, \[r0, #8\]!
+** vstrh.16 q[0-7], \[r0, #8\]!
** ...
*/
float16_t *pre_storefp16_0 (float16_t *a, float16x8_t v)
@@ -202,7 +202,7 @@ float16_t *pre_storefp16_0 (float16_t *a, float16x8_t v)
/*
**pre_store16_0:
** ...
-** vstrh.16 q[0-9]+, \[r0, #254\]!
+** vstrh.16 q[0-7], \[r0, #254\]!
** ...
*/
uint16_t* pre_store16_0 (uint16_t * a, uint16x8_t v)
@@ -215,7 +215,7 @@ uint16_t* pre_store16_0 (uint16_t * a, uint16x8_t v)
/*
**pre_store16_1:
** ...
-** vstrh.32 q[0-9]+, \[r0, #-52\]!
+** vstrh.32 q[0-7], \[r0, #-52\]!
** ...
*/
int16_t* pre_store16_1 (int16_t * a, int32x4_t v)
@@ -228,7 +228,7 @@ int16_t* pre_store16_1 (int16_t * a, int32x4_t v)
/*
**pre_storefp32_0:
** ...
-** vstrw.32 q0, \[r0, #-4\]!
+** vstrw.32 q[0-7], \[r0, #-4\]!
** ...
*/
float32_t *pre_storefp32_0 (float32_t *a, float32x4_t v)
@@ -241,7 +241,7 @@ float32_t *pre_storefp32_0 (float32_t *a, float32x4_t v)
/*
**pre_store32_0:
** ...
-** vstrw.32 q[0-9]+, \[r0, #4\]!
+** vstrw.32 q[0-7], \[r0, #4\]!
** ...
*/
int32_t* pre_store32_0 (int32_t * a, int32x4_t v)
@@ -255,7 +255,7 @@ int32_t* pre_store32_0 (int32_t * a, int32x4_t v)
/*
**post_store8_0:
** ...
-** vstrb.8 q[0-9]+, \[r0\], #-26
+** vstrb.8 q[0-7], \[r0\], #-26
** ...
*/
int8_t* post_store8_0 (int8_t * a, int8x16_t v)
@@ -268,7 +268,7 @@ int8_t* post_store8_0 (int8_t * a, int8x16_t v)
/*
**post_store8_1:
** ...
-** vstrb.16 q[0-9]+, \[r0\], #1
+** vstrb.16 q[0-7], \[r0\], #1
** ...
*/
uint8_t* post_store8_1 (uint8_t * a, uint16x8_t v)
@@ -281,7 +281,7 @@ uint8_t* post_store8_1 (uint8_t * a, uint16x8_t v)
/*
**post_store8_2:
** ...
-** vstrb.8 q[0-9]+, \[r0\], #-26
+** vstrb.8 q[0-7], \[r0\], #-26
** ...
*/
int8_t* post_store8_2 (int8_t * a, int8x16_t v)
@@ -294,7 +294,7 @@ int8_t* post_store8_2 (int8_t * a, int8x16_t v)
/*
**post_store8_3:
** ...
-** vstrb.16 q[0-9]+, \[r0\], #7
+** vstrb.16 q[0-7], \[r0\], #7
** ...
*/
uint8_t* post_store8_3 (uint8_t * a, uint16x8_t v)
@@ -307,7 +307,7 @@ uint8_t* post_store8_3 (uint8_t * a, uint16x8_t v)
/*
**post_storefp16_0:
** ...
-** vstrh.16 q[0-9]+, \[r0\], #-16
+** vstrh.16 q[0-7], \[r0\], #-16
** ...
*/
float16_t *post_storefp16_0 (float16_t *a, float16x8_t v)
@@ -320,7 +320,7 @@ float16_t *post_storefp16_0 (float16_t *a, float16x8_t v)
/*
**post_store16_0:
** ...
-** vstrh.16 q[0-9]+, \[r0\], #126
+** vstrh.16 q[0-7], \[r0\], #126
** ...
*/
int16_t* post_store16_0 (int16_t * a, int16x8_t v)
@@ -333,7 +333,7 @@ int16_t* post_store16_0 (int16_t * a, int16x8_t v)
/*
**post_store16_1:
** ...
-** vstrh.32 q[0-9]+, \[r0\], #-16
+** vstrh.32 q[0-7], \[r0\], #-16
** ...
*/
uint16_t* post_store16_1 (uint16_t * a, uint32x4_t v)
@@ -346,7 +346,7 @@ uint16_t* post_store16_1 (uint16_t * a, uint32x4_t v)
/*
**post_storefp32_0:
** ...
-** vstrw.32 q[0-9]+, \[r0\], #-16
+** vstrw.32 q[0-7], \[r0\], #-16
** ...
*/
float32_t* post_storefp32_0 (float32_t * a, float32x4_t v)
@@ -359,7 +359,7 @@ float32_t* post_storefp32_0 (float32_t * a, float32x4_t v)
/*
**post_store32_0:
** ...
-** vstrw.32 q[0-9]+, \[r0\], #16
+** vstrw.32 q[0-7], \[r0\], #16
** ...
*/
int32_t* post_store32_0 (int32_t * a, int32x4_t v)
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-1.c b/gcc/testsuite/gcc.target/powerpc/pr99888-1.c
new file mode 100644
index 0000000..9370b4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-1.c
@@ -0,0 +1,43 @@
+/* Verify no errors for different nops after local entry on ELFv2. */
+
+extern int a;
+
+__attribute__ ((noipa, patchable_function_entry (1, 0)))
+int test1 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (2, 0)))
+int test2 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (3, 0)))
+int test3 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (4, 0)))
+int test4 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (5, 0)))
+int test5 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (6, 0)))
+int test6 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (7, 0)))
+int test7 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (8, 0)))
+int test8 (int b) {
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-2.c b/gcc/testsuite/gcc.target/powerpc/pr99888-2.c
new file mode 100644
index 0000000..4506171
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-2.c
@@ -0,0 +1,43 @@
+/* Verify no errors for 2, 6 and 14 nops before local entry on ELFv2. */
+
+extern int a;
+
+__attribute__ ((noipa, patchable_function_entry (2, 2)))
+int test1 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (4, 2)))
+int test2 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (6, 6)))
+int test3 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (8, 6)))
+int test4 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (16, 6)))
+int test5 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (14, 14)))
+int test6 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (28, 14)))
+int test7 (int b) {
+ return a + b;
+}
+
+__attribute__ ((noipa, patchable_function_entry (64, 14)))
+int test8 (int b) {
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-3.c b/gcc/testsuite/gcc.target/powerpc/pr99888-3.c
new file mode 100644
index 0000000..4531ae3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-3.c
@@ -0,0 +1,11 @@
+/* { dg-options "-fpatchable-function-entry=1" } */
+
+/* Verify no errors on ELFv2, using command line option instead of
+ function attribute. */
+
+extern int a;
+
+int test (int b) {
+ return a + b;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-4.c b/gcc/testsuite/gcc.target/powerpc/pr99888-4.c
new file mode 100644
index 0000000..00a8d4d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-4.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target powerpc_elfv2 } */
+/* There is no global entry point prologue with pcrel. */
+/* { dg-options "-mno-pcrel -fpatchable-function-entry=1,1" } */
+
+/* Verify one error emitted for unexpected 1 nop before local
+ entry. */
+
+extern int a;
+
+int test (int b) {
+ return a + b;
+}
+/* { dg-error "unsupported number of nops before function entry \\(1\\)" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-5.c b/gcc/testsuite/gcc.target/powerpc/pr99888-5.c
new file mode 100644
index 0000000..39d3b44
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-5.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target powerpc_elfv2 } */
+/* There is no global entry point prologue with pcrel. */
+/* { dg-options "-mno-pcrel -fpatchable-function-entry=7,3" } */
+
+/* Verify one error emitted for unexpected 3 nops before local
+ entry. */
+
+extern int a;
+
+int test (int b) {
+ return a + b;
+}
+/* { dg-error "unsupported number of nops before function entry \\(3\\)" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr99888-6.c b/gcc/testsuite/gcc.target/powerpc/pr99888-6.c
new file mode 100644
index 0000000..c6c18dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr99888-6.c
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target powerpc_elfv2 } */
+/* There is no global entry point prologue with pcrel. */
+/* { dg-options "-mno-pcrel" } */
+
+/* Verify one error emitted for unexpected 4 nops before local
+ entry. */
+
+extern int a;
+
+__attribute__ ((patchable_function_entry (20, 4)))
+int test (int b) {
+ return a + b;
+}
+/* { dg-error "unsupported number of nops before function entry \\(4\\)" "" { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/gfortran.dg/PR100029.f90 b/gcc/testsuite/gfortran.dg/PR100029.f90
new file mode 100644
index 0000000..fd7e4c4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/PR100029.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+!
+! Test the fix for PR100029
+!
+
+program foo_p
+ implicit none
+
+ type :: foo_t
+ end type foo_t
+
+ class(foo_t), allocatable :: pout
+
+ call foo_s(pout)
+
+contains
+
+ subroutine foo_s(that)
+ class(foo_t), allocatable, intent(out) :: that(..)
+ end subroutine foo_s
+
+end program foo_p
diff --git a/gcc/testsuite/gfortran.dg/PR100040.f90 b/gcc/testsuite/gfortran.dg/PR100040.f90
new file mode 100644
index 0000000..0a135ff
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/PR100040.f90
@@ -0,0 +1,36 @@
+! { dg-do run }
+!
+! Test the fix for PR100040
+!
+
+program foo_p
+ implicit none
+
+ integer, parameter :: n = 11
+
+ type :: foo_t
+ integer :: i
+ end type foo_t
+
+ type(foo_t), parameter :: a = foo_t(n)
+
+ class(foo_t), allocatable :: pout
+
+ call foo_s(pout)
+ if(.not.allocated(pout)) stop 1
+ if(pout%i/=n) stop 2
+
+contains
+
+ subroutine foo_s(that)
+ class(foo_t), allocatable, intent(out) :: that(..)
+
+ select rank(that)
+ rank(0)
+ that = a
+ rank default
+ stop 3
+ end select
+ end subroutine foo_s
+
+end program foo_p
diff --git a/gcc/testsuite/gfortran.dg/goacc/mapping-tests-5.f90 b/gcc/testsuite/gfortran.dg/goacc/mapping-tests-5.f90
new file mode 100644
index 0000000..8df8c58
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc/mapping-tests-5.f90
@@ -0,0 +1,15 @@
+subroutine foo
+ type one
+ integer, dimension(10) :: i, j
+ end type
+ type two
+ type(one) A, B
+ end type
+
+ type(two) x
+
+ !$acc enter data copyin(x%A%i(5), x%A%i(4), x%A)
+! { dg-error ".x.a.i. appears more than once in map clauses" "" { target *-*-* } .-1 }
+ !$acc enter data copyin(x%A, x%A%i(5), x%A%i(4))
+! { dg-error ".x.a.i. appears more than once in map clauses" "" { target *-*-* } .-1 }
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90
index 0eeca0e..1d3a0d8 100644
--- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-1.f90
@@ -7,16 +7,16 @@ subroutine test(b,c,d)
integer, target :: a(5)
- !$omp target is_device_ptr(a) ! { dg-error "Non-dummy object .a. in IS_DEVICE_PTR clause" }
+ !$omp target is_device_ptr(a) ! Valid since OpenMP 5.1
!$omp end target
- !$omp target is_device_ptr(b) ! { dg-error "VALUE object .b. in IS_DEVICE_PTR clause" }
+ !$omp target is_device_ptr(b) ! Valid since OpenMP 5.1
!$omp end target
- !$omp target is_device_ptr(c) ! { dg-error "POINTER object .c. in IS_DEVICE_PTR clause" }
+ !$omp target is_device_ptr(c) ! Valid since OpenMP 5.1
!$omp end target
- !$omp target is_device_ptr(d) ! { dg-error "ALLOCATABLE object .d. in IS_DEVICE_PTR clause" }
+ !$omp target is_device_ptr(d) ! Valid since OpenMP 5.1
!$omp end target
!$omp target data map(a) use_device_addr(a) ! Should be okay
diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90
index 7adc6f6..0762e57 100644
--- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-2.f90
@@ -8,7 +8,7 @@ subroutine abc(cc)
!$omp target enter data map(to: cc, dd)
!$omp target data use_device_addr(cc) use_device_ptr(dd)
- !$omp target is_device_ptr(cc, dd) ! { dg-error "Non-dummy object 'dd' in IS_DEVICE_PTR clause at" }
+ !$omp target is_device_ptr(cc, dd) ! Valid since OpenMP 5.1
if (cc /= 131 .or. dd /= 484) stop 1
cc = 44
dd = 45
diff --git a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90 b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90
index c3de772..7b5b27b 100644
--- a/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/is_device_ptr-3.f90
@@ -23,5 +23,6 @@ contains
end program main
-! { dg-final { scan-tree-dump "is_device_ptr\\(a\\)" "gimple" } }
+! { dg-final { scan-tree-dump "has_device_addr\\(a\\)" "gimple" } }
+! { dg-final { scan-tree-dump-not "has_device_addr\\(b\\)" "gimple" } }
! { dg-final { scan-tree-dump-not "is_device_ptr\\(b\\)" "gimple" } }
diff --git a/gcc/testsuite/gfortran.dg/ieee/fma_1.f90 b/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
index 3463642..320c73a 100644
--- a/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/fma_1.f90
@@ -38,7 +38,6 @@
print *, sx1 * sx2 + sx3
print *, ieee_fma(sx1, sx2, sx3)
if (ieee_fma(sx1, sx2, sx3) /= real(3, kind(sx1)) / 2) stop 4
- !if (ieee_fma(sx1, sx2, sx3) == sx1 * sx2 + sx3) stop 5
! Double
@@ -57,7 +56,6 @@
print *, dx1 * dx2 + dx3
print *, ieee_fma(dx1, dx2, dx3)
if (ieee_fma(dx1, dx2, dx3) /= real(3, kind(dx1)) / 2) stop 4
- !if (ieee_fma(dx1, dx2, dx3) == dx1 * dx2 + dx3) stop 5
! Large kind 1
@@ -76,7 +74,6 @@
print *, lx1 * lx2 + lx3
print *, ieee_fma(lx1, lx2, lx3)
if (ieee_fma(lx1, lx2, lx3) /= real(3, kind(lx1)) / 2) stop 4
- if (ieee_fma(lx1, lx2, lx3) == lx1 * lx2 + lx3) stop 5
! Large kind 2
@@ -95,6 +92,5 @@
print *, wx1 * wx2 + wx3
print *, ieee_fma(wx1, wx2, wx3)
if (ieee_fma(wx1, wx2, wx3) /= real(3, kind(wx1)) / 2) stop 4
- if (ieee_fma(wx1, wx2, wx3) == wx1 * wx2 + wx3) stop 5
end
diff --git a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90 b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
index b6ab288..205c47f 100644
--- a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
+++ b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
@@ -81,15 +81,15 @@ program foo
! Check again
if (ieee_support_underflow_control()) then
call ieee_get_underflow_mode(f)
- if (.not. f) stop 3
+ if (.not. f) stop 4
endif
if (ieee_support_rounding(ieee_down)) then
call ieee_get_rounding_mode(rmode)
- if (rmode /= ieee_down) stop 4
+ if (rmode /= ieee_down) stop 5
endif
if (ieee_support_halting(ieee_overflow)) then
call ieee_get_halting_mode(ieee_overflow, f)
- if (f) stop 5
+ if (f) stop 6
endif
end program foo
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 42ef1d8..2102ed6 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -332,7 +332,7 @@ proc gcc_adjust_linker_flags_list { args } {
continue
} elseif { $skip != "" } then {
set skip ""
- } elseif { $opt == "-Xlinker" } then {
+ } elseif { $opt == "-Xlinker" || $opt == "-T" } then {
set skip $opt
} elseif { ![string match "-*" $opt] \
&& [file isfile $opt] } {
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 703aba4..7c9dd45 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -370,6 +370,55 @@ proc check_weak_override_available { } {
return [check_weak_available]
}
+# Return 1 if VMA is equal to LMA for the .data section, 0
+# otherwise. Cache the result.
+
+proc check_effective_target_vma_equals_lma { } {
+ global tool
+
+ return [check_cached_effective_target vma_equals_lma {
+ set src vma_equals_lma[pid].c
+ set exe vma_equals_lma[pid].exe
+ verbose "check_effective_target_vma_equals_lma compiling testfile $src" 2
+ set f [open $src "w"]
+ puts $f "#ifdef __cplusplus\nextern \"C\"\n#endif\n"
+ puts $f "int foo = 42; void main() {}"
+ close $f
+ set lines [${tool}_target_compile $src $exe executable ""]
+ file delete $src
+
+ if [string match "" $lines] then {
+ # No error messages
+
+ set objdump_name [find_binutils_prog objdump]
+ set output [remote_exec host "$objdump_name" "--section-headers --section=.data $exe"]
+ set output [lindex $output 1]
+
+ remote_file build delete $exe
+
+ # Example output of objdump:
+ #vma_equals_lma9059.exe: file format elf32-littlearm
+ #
+ #Sections:
+ #Idx Name Size VMA LMA File off Algn
+ # 6 .data 00000558 20000000 08002658 00020000 2**3
+ # CONTENTS, ALLOC, LOAD, DATA
+
+ # Capture LMA and VMA columns for .data section
+ if ![ regexp {\d*\d+\s+\.data\s+\d+\s+(\d+)\s+(\d+)} $output dummy vma lma ] {
+ verbose "Could not parse objdump output" 2
+ return 0
+ } else {
+ return [string equal $vma $lma]
+ }
+ } else {
+ remote_file build delete $exe
+ verbose "Could not determine if VMA is equal to LMA. Assuming not equal." 2
+ return 0
+ }
+ }]
+}
+
# The "noinit" attribute is only supported by some targets.
# This proc returns 1 if it's supported, 0 if it's not.
@@ -477,6 +526,16 @@ proc check_effective_target_alias { } {
}
}
+# Returns 1 if the target uses the ELF object format, 0 otherwise.
+
+proc check_effective_target_elf { } {
+ if { [gcc_target_object_format] == "elf" } {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
# Returns 1 if the target toolchain supports ifunc, 0 otherwise.
proc check_ifunc_available { } {
@@ -8253,6 +8312,14 @@ proc check_effective_target_vect_long_mult { } {
return $answer
}
+# Return 1 if the target supports vector int modulus, 0 otherwise.
+
+proc check_effective_target_vect_int_mod { } {
+ return [check_cached_effective_target_indexed vect_int_mod {
+ expr { [istarget powerpc*-*-*]
+ && [check_effective_target_has_arch_pwr10] }}]
+}
+
# Return 1 if the target supports vector even/odd elements extraction, 0 otherwise.
proc check_effective_target_vect_extract_even_odd { } {