aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/sourcebuild.texi6
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gfortran.dg/promotion_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/promotion_4.f903
-rw-r--r--gcc/testsuite/lib/target-supports.exp14
6 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54acc78..d80b6a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-26 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/82143
+ PR fortran/82324
+ * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
+
2017-09-26 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 9901c94..56e1b4e 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1357,6 +1357,12 @@ Target has runtime support for any options added with
@item fortran_integer_16
Target supports Fortran @code{integer} that is 16 bytes or longer.
+@item fortran_real_10
+Target supports Fortran @code{real} that is 10 bytes or longer.
+
+@item fortran_real_16
+Target supports Fortran @code{real} that is 16 bytes or longer.
+
@item fortran_large_int
Target supports Fortran @code{integer} kinds larger than @code{integer(8)}.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 697d063..38591f4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2017-09-26 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/82143
+ PR fortran/82324
+ * lib/target-supports.exp (check_effective_target_fortran_real_10): New.
+ * gfortran.dg/promotion_3.f90: Only run if real(16) is available.
+ * gfortran.dg/promotion_4.f90: Only run if real(10) is available.
+ Don't assume that DOUBLE PRECISION has kind=16.
+
2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.dg/gomp/associate1.f90: Really commit change
diff --git a/gcc/testsuite/gfortran.dg/promotion_3.f90 b/gcc/testsuite/gfortran.dg/promotion_3.f90
index 7c9b591..3571bd1 100644
--- a/gcc/testsuite/gfortran.dg/promotion_3.f90
+++ b/gcc/testsuite/gfortran.dg/promotion_3.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-fdefault-real-16" }
+! { dg-require-effective-target fortran_real_16 }
!
! PR 82143: add a -fdefault-real-16 flag
!
diff --git a/gcc/testsuite/gfortran.dg/promotion_4.f90 b/gcc/testsuite/gfortran.dg/promotion_4.f90
index 0aa1c8e..8378cdd 100644
--- a/gcc/testsuite/gfortran.dg/promotion_4.f90
+++ b/gcc/testsuite/gfortran.dg/promotion_4.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! { dg-options "-fdefault-real-10" }
+! { dg-require-effective-target fortran_real_10 }
!
! PR 82143: add a -fdefault-real-16 flag
!
@@ -12,5 +13,5 @@ double precision :: d
if (kind(r4) /= 4) call abort
if (kind(r8) /= 8) call abort
if (kind(r) /= 10) call abort
-if (kind(d) /= 16) call abort
+if (kind(d) < 10) call abort
end
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 8b25797..57f646c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1464,6 +1464,20 @@ proc check_effective_target_fortran_real_16 { } {
}]
}
+# Return 1 if the target supports Fortran real kind 10,
+# 0 otherwise. Contrary to check_effective_target_fortran_large_real
+# this checks for real(10) only.
+#
+# When the target name changes, replace the cached result.
+
+proc check_effective_target_fortran_real_10 { } {
+ return [check_no_compiler_messages fortran_real_10 executable {
+ ! Fortran
+ real(kind=10) :: x
+ x = cos (x)
+ end
+ }]
+}
# Return 1 if the target supports Fortran's IEEE modules,
# 0 otherwise.