From c3ab6266bc52c6d42bd1de015397b272515cf40c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 2 Jun 2021 10:24:56 +0200 Subject: testsuite: Add -Wno-psabi -w to g++.dg/ext/builtin-shufflevector-1.C The testcase without this FAILs on i686-linux, where we warn about returning of a generic vector changing the ABI. 2021-06-02 Jakub Jelinek * g++.dg/ext/builtin-shufflevector-1.C: Add -Wno-psabi -w to dg-options. --- gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C index da838e8..3869531 100644 --- a/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C +++ b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C @@ -1,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-options "-Wno-psabi -w" } template struct shufflevector -- cgit v1.1 From 9ca24bd34b6ac44c17f949d89ff60d0fd4665133 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Wed, 2 Jun 2021 11:48:21 +0200 Subject: Fortran/OpenMP: Add gfortran.dg/gomp/taskloop-2.f90 [PR99928] PR middle-end/99928 gcc/testsuite/ChangeLog * gfortran.dg/gomp/taskloop-2.f90: New. --- gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 | 72 +++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 (limited to 'gcc') diff --git a/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 new file mode 100644 index 0000000..2142762 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 @@ -0,0 +1,72 @@ +subroutine foo() +implicit none +integer :: i, r +!$omp taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do + +!$omp taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp parallel master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +end + + +subroutine bar() +implicit none +integer :: i, r +r = 0 +!$omp parallel reduction(+:r) + !$omp master taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp master taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp master + !$omp taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp end master +!$omp end parallel + +!$omp parallel master taskloop in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do + +!$omp parallel master taskloop simd in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do +end -- cgit v1.1 From 22d834e32b509b22f68000b7f012d8e45d833ea8 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Mon, 31 May 2021 21:59:50 +0200 Subject: IBM Z: Remove match_scratch workaround Since commit dd1ef00c45ba ("Fix bug in the define_subst handling that made match_scratch unusable for multi-alternative patterns.") the workaround for that bug in *ashrdi3_31 is not only no longer necessary, but actually breaks the build. Get rid of it by using only one alternative in (match_scratch). It will be replicated as many times as needed in order to match the pattern with which (define_subst) is used. gcc/ChangeLog: * config/s390/s390.md(*ashrdi3_31): Use a single constraint. * config/s390/subst.md(cconly_subst): Use a single constraint in (match_scratch). gcc/testsuite/ChangeLog: * gcc.target/s390/ashr.c: New test. --- gcc/config/s390/s390.md | 14 ++++---------- gcc/config/s390/subst.md | 2 +- gcc/testsuite/gcc.target/s390/ashr.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.target/s390/ashr.c (limited to 'gcc') diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 7faf775..0c5b4dc 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -9328,19 +9328,13 @@ "" "") -; FIXME: The number of alternatives is doubled here to match the fix -; number of 2 in the subst pattern for the (clobber (match_scratch... -; The right fix should be to support match_scratch in the output -; pattern of a define_subst. (define_insn "*ashrdi3_31" - [(set (match_operand:DI 0 "register_operand" "=d, d") - (ashiftrt:DI (match_operand:DI 1 "register_operand" "0, 0") - (match_operand:QI 2 "shift_count_operand" "jsc,jsc"))) + [(set (match_operand:DI 0 "register_operand" "=d") + (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") + (match_operand:QI 2 "shift_count_operand" "jsc"))) (clobber (reg:CC CC_REGNUM))] "!TARGET_ZARCH" - "@ - srda\t%0,%Y2 - srda\t%0,%Y2" + "srda\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) diff --git a/gcc/config/s390/subst.md b/gcc/config/s390/subst.md index 384af11..3ea6fc4 100644 --- a/gcc/config/s390/subst.md +++ b/gcc/config/s390/subst.md @@ -45,7 +45,7 @@ "s390_match_ccmode(insn, CCSmode)" [(set (reg CC_REGNUM) (compare (match_dup 1) (const_int 0))) - (clobber (match_scratch:DSI 0 "=d,d"))]) + (clobber (match_scratch:DSI 0 "=d"))]) (define_subst_attr "cconly" "cconly_subst" "" "_cconly") diff --git a/gcc/testsuite/gcc.target/s390/ashr.c b/gcc/testsuite/gcc.target/s390/ashr.c new file mode 100644 index 0000000..8cffdfa --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/ashr.c @@ -0,0 +1,11 @@ +/* Test the arithmetic shift right pattern. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int e(void); + +int f (long c, int b) +{ + return (c >> b) && e (); +} -- cgit v1.1 From 46d04271a4983b5430ed4830ab65ea26052176fb Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Wed, 2 Jun 2021 14:31:00 +0300 Subject: ARC: gcc driver default to hs38_linux arc700 is legacy and there's no active development for it, so switch to latest hs38_linux as default Signed-off-by: Vineet Gupta Signed-off-by: Claudiu Zissulescu gcc/ 2021-06-02 Vineet Gupta * config/arc/arc.h (TARGET_CPU_DEFAULT): Change to hs38_linux. --- gcc/config/arc/arc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index bd1fe0a..252241a 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see #define SYMBOL_FLAG_CMEM (SYMBOL_FLAG_MACH_DEP << 3) #ifndef TARGET_CPU_DEFAULT -#define TARGET_CPU_DEFAULT PROCESSOR_arc700 +#define TARGET_CPU_DEFAULT PROCESSOR_hs38_linux #endif /* Check if this symbol has a long_call attribute in its declaration */ -- cgit v1.1