diff gcc/testsuite/gfortran.dg/default_format_2.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gfortran.dg/default_format_2.f90	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,22 @@
+! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
+! { dg-require-effective-target fortran_large_real }
+! Test XFAILed on these platforms because the system's printf() lacks
+! proper support for denormalized long doubles. See PR24685
+!
+! This tests that the default formats for formatted I/O of reals are
+! wide enough and have enough precision, by checking that values can
+! be written and read back.
+!
+include "default_format_2.inc"
+
+program main
+  use test_default_format
+
+  if (test (1.0_kl, 0) /= 0) call abort
+  if (test (0.0_kl, 0) /= 0) call abort
+  if (test (tiny(0.0_kl), 1) /= 0) call abort
+  if (test (-tiny(0.0_kl), -1) /= 0) call abort
+  if (test (huge(0.0_kl), -1) /= 0) call abort
+  if (test (-huge(0.0_kl), 1) /= 0) call abort
+end program main
+!