diff options
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 17 | ||||
-rwxr-xr-x | libgomp/configure | 19 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/pr84418-1.f90 | 26 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/pr84418-2.f90 | 35 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/threadprivate4.f90 | 1 |
5 files changed, 96 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index a620923729b..ccc77006c5a 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,20 @@ +2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com> + + PR target/84148 + * configure: Regenerate. + +2018-02-16 Jakub Jelinek <jakub@redhat.com> + + PR fortran/84418 + * libgomp.fortran/pr84418-1.f90: New test. + * libgomp.fortran/pr84418-2.f90: New test. + +2018-02-14 Jakub Jelinek <jakub@redhat.com> + + PR fortran/84313 + * testsuite/libgomp.fortran/threadprivate4.f90: Add + -std=f2003 -fall-intrinsics into dg-additional-options. + 2018-02-08 Martin Jambor <mjambor@suse.cz> * testsuite/libgomp.hsa.c/pr82416.c: Make the function with target diff --git a/libgomp/configure b/libgomp/configure index e7842b5519f..92b8142b0b1 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -15142,7 +15142,7 @@ fi # Plugins for offload execution, configure.ac fragment. -*- mode: autoconf -*- # -# Copyright (C) 2014-2017 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # # Contributed by Mentor Embedded. # @@ -16633,18 +16633,28 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 +$as_echo_n "checking for CET support... " >&6; } + case "$host" in i[34567]86-*-linux* | x86_64-*-linux*) case "$enable_cet" in default) - # Check if assembler supports CET. + # Check if target supports multi-byte NOPs + # and if assembler supports CET insn. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { + +#if !defined(__SSE2__) +#error target does not support multi-byte NOPs +#else asm ("setssbsy"); +#endif + ; return 0; } @@ -16684,6 +16694,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext esac if test x$enable_cet = xyes; then CET_FLAGS="-fcf-protection -mcet" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi XCFLAGS="$XCFLAGS $CET_FLAGS" diff --git a/libgomp/testsuite/libgomp.fortran/pr84418-1.f90 b/libgomp/testsuite/libgomp.fortran/pr84418-1.f90 new file mode 100644 index 00000000000..e56c022446c --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr84418-1.f90 @@ -0,0 +1,26 @@ +! PR fortran/84418 +! { dg-do run { target vect_simd_clones } } +! { dg-options "-fno-inline" } +! { dg-additional-options "-msse2" { target sse2_runtime } } +! { dg-additional-options "-mavx" { target avx_runtime } } + + real :: a(1024), b(1024), c(1024) + integer :: i + do i = 1, 1024 + a(i) = 0.5 * i + b(i) = 1.5 * i + end do + !$omp simd + do i = 1, 1024 + c(i) = foo (a(i), b(i)) + end do + do i = 1, 1024 + if (c(i).ne.(2 * i)) call abort + end do +contains + real function foo (x, y) + real :: x, y + !$omp declare simd linear (ref (x, y)) + foo = x + y + end function +end diff --git a/libgomp/testsuite/libgomp.fortran/pr84418-2.f90 b/libgomp/testsuite/libgomp.fortran/pr84418-2.f90 new file mode 100644 index 00000000000..a6657d18095 --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/pr84418-2.f90 @@ -0,0 +1,35 @@ +! PR fortran/84418 +! { dg-do run { target vect_simd_clones } } +! { dg-options "-fno-inline" } +! { dg-additional-options "-msse2" { target sse2_runtime } } +! { dg-additional-options "-mavx" { target avx_runtime } } + + type p + integer :: i, j + end type + type(p) :: a(1024) + integer :: b(4,1024), c(1024) + integer :: i + do i = 1, 1024 + a(i)%i = 2 * i + a(i)%j = 3 * i + b(1,i) = 4 * i + b(2,i) = 5 * i + b(3,i) = 6 * i + b(4,i) = 7 * i + end do + !$omp simd + do i = 1, 1024 + c(i) = foo (a(i), b(:,i)) + end do + do i = 1, 1024 + if (c(i).ne.(6 * i)) call abort + end do +contains + function foo (x, y) + type (p) :: x + integer :: y(4), foo + !$omp declare simd linear (ref (x, y)) + foo = x%i + y(1) + end function +end diff --git a/libgomp/testsuite/libgomp.fortran/threadprivate4.f90 b/libgomp/testsuite/libgomp.fortran/threadprivate4.f90 index b5fb10bfee7..c86cac72305 100644 --- a/libgomp/testsuite/libgomp.fortran/threadprivate4.f90 +++ b/libgomp/testsuite/libgomp.fortran/threadprivate4.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-additional-options "-std=f2003 -fall-intrinsics" } ! { dg-require-effective-target tls_runtime } module threadprivate4 |