aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2017-11-24 22:40:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-11-24 22:40:21 +0100
commit3b3e6283a4b1ea82bb41867ebdccd6a1fc0501d3 (patch)
tree0f71d277ea2d2d8aa0fa93308f9441e03c8f2755 /libgomp
parent19cf3a368544af31e3791c27e3c9be9b01e71851 (diff)
downloadgcc-3b3e6283a4b1ea82bb41867ebdccd6a1fc0501d3.zip
gcc-3b3e6283a4b1ea82bb41867ebdccd6a1fc0501d3.tar.gz
gcc-3b3e6283a4b1ea82bb41867ebdccd6a1fc0501d3.tar.bz2
re PR fortran/81304 (Bogus warning with -Wsurprising and -fopenmp: Type specified for intrinsic function 'min' / 'max')
PR fortran/81304 * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set attr.implicit_type in intrinsic_sym to avoid undesirable warning. * testsuite/libgomp.fortran/pr81304.f90: New test. From-SVN: r255144
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.fortran/pr81304.f9017
2 files changed, 22 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 966b561..9f6b17b 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/81304
+ * testsuite/libgomp.fortran/pr81304.f90: New test.
+
2017-11-23 Jakub Jelinek <jakub@redhat.com>
PR fortran/81841
diff --git a/libgomp/testsuite/libgomp.fortran/pr81304.f90 b/libgomp/testsuite/libgomp.fortran/pr81304.f90
new file mode 100644
index 0000000..460a2a0
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/pr81304.f90
@@ -0,0 +1,17 @@
+! PR fortran/81304
+! { dg-do run }
+! { dg-options "-Wsurprising" }
+
+program pr81304
+ integer :: i
+ real, dimension(1:3) :: a, b, c
+ a = 128
+ b = 0
+!$omp parallel do reduction(min: a) reduction(max: b) private (c) ! { dg-bogus "Type specified for intrinsic function" }
+ do i = 1, 16
+ c = (/ i, i - 5, i + 5 /)
+ a = min (a, c)
+ b = max (b, c)
+ end do
+ if (any (a /= (/ 1, -4, 6 /)) .or. any (b /= (/ 16, 11, 21 /))) call abort
+end