diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/automatic_char_len_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/automatic_char_len_2.f90 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/automatic_char_len_2.f90 b/gcc/testsuite/gfortran.dg/automatic_char_len_2.f90 new file mode 100644 index 000000000..18bb8d12d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/automatic_char_len_2.f90 @@ -0,0 +1,16 @@ +! { dg-do run } +! { dg-options "-O0" } +! +! Tests fix for PR21459 - This is the original example. +! +program format_string + implicit none + character(len=*), parameter :: rform='(F15.5)', & + cform="(' (', F15.5, ',' F15.5, ') ')" + call print_a_number(cform) +contains +subroutine print_a_number(style) + character(len=*) :: style + write(*, style) cmplx(42.0, 99.0) ! { dg-output "99.00000" } +end subroutine print_a_number +end program format_string |