From f58be48c09b58b801a2ec2f2d1fc6478b0190ad3 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Thu, 23 May 2019 17:20:58 +0000 Subject: [PATCH] fmt_f_default_field_width_1.f90: Hide REAL(16) behind __GFC_REAL_16__. 2019-05-23 Mark Eggleston * gfortran.dg/fmt_f_default_field_width_1.f90: Hide REAL(16) behind __GFC_REAL_16__. Add -cpp to dg-options. * gfortran.dg/fmt_f_default_field_width_2.f90: Ditto. * gfortran.dg/fmt_f_default_field_width_3.f90: Ditto. * gfortran.dg/fmt_g_default_field_width_1.f90: Ditto. * gfortran.dg/fmt_g_default_field_width_2.f90: Ditto. * gfortran.dg/fmt_g_default_field_width_3.f90: Ditto. From-SVN: r271573 --- gcc/testsuite/ChangeLog | 10 ++++++++++ .../gfortran.dg/fmt_f_default_field_width_1.f90 | 7 ++++++- .../gfortran.dg/fmt_f_default_field_width_2.f90 | 7 ++++++- .../gfortran.dg/fmt_f_default_field_width_3.f90 | 7 ++++++- .../gfortran.dg/fmt_g_default_field_width_1.f90 | 7 ++++++- .../gfortran.dg/fmt_g_default_field_width_2.f90 | 7 ++++++- .../gfortran.dg/fmt_g_default_field_width_3.f90 | 7 ++++++- 7 files changed, 46 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7746fbeb4ee..f659e459354 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2019-05-23 Mark Eggleston + + * gfortran.dg/fmt_f_default_field_width_1.f90: Hide REAL(16) behind + __GFC_REAL_16__. Add -cpp to dg-options. + * gfortran.dg/fmt_f_default_field_width_2.f90: Ditto. + * gfortran.dg/fmt_f_default_field_width_3.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_1.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_2.f90: Ditto. + * gfortran.dg/fmt_g_default_field_width_3.f90: Ditto. + 2019-05-23 Bill Schmidt * gcc.target/powerpc/cpu-future.c: New test. diff --git a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_1.f90 b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_1.f90 index 5c0834211ff..a2b14b7fee6 100644 --- a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_1.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_1.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options -fdec } +! { dg-options "-cpp -fdec" } ! ! Test case for the default field widths enabled by the -fdec-format-defaults flag. ! @@ -8,11 +8,14 @@ ! program test + implicit none character(50) :: buffer real(4) :: real_4 real(8) :: real_8 +#ifdef __GFC_REAL_16__ real(16) :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, F, A)" @@ -32,9 +35,11 @@ program test len = len_trim(buffer) if (len /= 27) stop 3 +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' print *,buffer len = len_trim(buffer) if (len /= 44) stop 4 +#endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_2.f90 b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_2.f90 index fd5b1d25a56..1896197580a 100644 --- a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_2.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_2.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options -fdec-format-defaults } +! { dg-options "-cpp -fdec-format-defaults" } ! ! Test case for the default field widths enabled by the -fdec-format-defaults flag. ! @@ -11,11 +11,14 @@ ! program test + implicit none character(50) :: buffer real(4) :: real_4 real(8) :: real_8 +#ifdef __GFC_REAL_16__ real(16) :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, F, A)" @@ -35,9 +38,11 @@ program test len = len_trim(buffer) if (len /= 27) stop 3 +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' print *,buffer len = len_trim(buffer) if (len /= 44) stop 4 +#endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 index 6852f8e9aa2..81ed35255ba 100644 --- a/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_f_default_field_width_3.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdec -fno-dec-format-defaults" } +! { dg-options "-cpp -fdec -fno-dec-format-defaults" } ! ! Test case for the default field widths not enabled. ! @@ -8,11 +8,14 @@ ! program test + implicit none character(50) :: buffer real*4 :: real_4 real*8 :: real_8 +#ifdef __GFC_REAL_16__ real*16 :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, F, A)" @@ -25,6 +28,8 @@ program test real_8 = 4.18 write(buffer, fmt) ':',real_8,':' ! { dg-error "Nonnegative width required" } +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' ! { dg-error "Nonnegative width required" } +#endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_1.f90 b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_1.f90 index 028cd113929..859e648ac39 100644 --- a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_1.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_1.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options -fdec } +! { dg-options "-cpp -fdec" } ! ! Test case for the default field widths enabled by the -fdec-format-defaults flag. ! @@ -8,11 +8,14 @@ ! program test + implicit none character(50) :: buffer real(4) :: real_4 real(8) :: real_8 +#ifdef __GFC_REAL_16__ real(16) :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, G, A)" @@ -37,9 +40,11 @@ program test len = len_trim(buffer) if (len /= 27) stop 4 +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' print *,buffer len = len_trim(buffer) if (len /= 44) stop 5 +#endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_2.f90 b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_2.f90 index 45c98c7c300..207dcc7ce09 100644 --- a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_2.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_2.f90 @@ -1,5 +1,5 @@ ! { dg-do run } -! { dg-options -fdec-format-defaults } +! { dg-options "-cpp -fdec-format-defaults" } ! ! Test case for the default field widths enabled by the -fdec-format-defaults flag. ! @@ -11,11 +11,14 @@ ! program test + implicit none character(50) :: buffer real(4) :: real_4 real(8) :: real_8 +#ifdef __GFC_REAL_16__ real(16) :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, G, A)" @@ -40,9 +43,11 @@ program test len = len_trim(buffer) if (len /= 27) stop 4 +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' print *,buffer len = len_trim(buffer) if (len /= 44) stop 5 +#endif end diff --git a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 index 3db4fddd162..1fea3957c7a 100644 --- a/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_g_default_field_width_3.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdec -fno-dec-format-defaults" } +! { dg-options "-cpp -fdec -fno-dec-format-defaults" } ! ! Test case for the default field widths not enabled. ! @@ -8,11 +8,14 @@ ! program test + implicit none character(50) :: buffer real(4) :: real_4 real(8) :: real_8 +#ifdef __GFC_REAL_16__ real(16) :: real_16 +#endif integer :: len character(*), parameter :: fmt = "(A, G, A)" @@ -28,6 +31,8 @@ program test real_8 = 4.18 write(buffer, fmt) ':',real_8,':' ! { dg-error "Positive width required" } +#ifdef __GFC_REAL_16__ real_16 = 4.18 write(buffer, fmt) ':',real_16,':' ! { dg-error "Positive width required" } +#endif end -- 2.30.2