Commit 63b62fa0 by Janus Weil

re PR fortran/82143 (add a -fdefault-real-16 flag)

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  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.

From-SVN: r253214
parent 57e6b981
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> 2017-09-26 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
...@@ -1357,6 +1357,12 @@ Target has runtime support for any options added with ...@@ -1357,6 +1357,12 @@ Target has runtime support for any options added with
@item fortran_integer_16 @item fortran_integer_16
Target supports Fortran @code{integer} that is 16 bytes or longer. 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 @item fortran_large_int
Target supports Fortran @code{integer} kinds larger than @code{integer(8)}. Target supports Fortran @code{integer} kinds larger than @code{integer(8)}.
......
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> 2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.dg/gomp/associate1.f90: Really commit change * gfortran.dg/gomp/associate1.f90: Really commit change
......
! { dg-do run } ! { dg-do run }
! { dg-options "-fdefault-real-16" } ! { dg-options "-fdefault-real-16" }
! { dg-require-effective-target fortran_real_16 }
! !
! PR 82143: add a -fdefault-real-16 flag ! PR 82143: add a -fdefault-real-16 flag
! !
......
! { dg-do run } ! { dg-do run }
! { dg-options "-fdefault-real-10" } ! { dg-options "-fdefault-real-10" }
! { dg-require-effective-target fortran_real_10 }
! !
! PR 82143: add a -fdefault-real-16 flag ! PR 82143: add a -fdefault-real-16 flag
! !
...@@ -12,5 +13,5 @@ double precision :: d ...@@ -12,5 +13,5 @@ double precision :: d
if (kind(r4) /= 4) call abort if (kind(r4) /= 4) call abort
if (kind(r8) /= 8) call abort if (kind(r8) /= 8) call abort
if (kind(r) /= 10) call abort if (kind(r) /= 10) call abort
if (kind(d) /= 16) call abort if (kind(d) < 10) call abort
end end
...@@ -1464,6 +1464,20 @@ proc check_effective_target_fortran_real_16 { } { ...@@ -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, # Return 1 if the target supports Fortran's IEEE modules,
# 0 otherwise. # 0 otherwise.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment