OSDN Git Service

PR debug/43329
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / automatic_char_len_2.f90
1 ! { dg-do run }
2 ! { dg-options "-O0" }
3 !
4 ! Tests fix for PR21459 - This is the original example.
5 !
6 program format_string
7   implicit none
8   character(len=*), parameter :: rform='(F15.5)', &
9   cform="(' (', F15.5, ',' F15.5, ') ')"
10   call print_a_number(cform)
11 contains
12 subroutine print_a_number(style)
13   character(len=*) :: style
14   write(*, style) cmplx(42.0, 99.0) ! { dg-output "99.00000" }
15 end subroutine print_a_number
16 end program format_string