RFC - g77 tests using dg-output
Billinghurst, David (CRTS)
David.Billinghurst@riotinto.com
Tue Jan 15 08:33:00 GMT 2002
I want to write some tests for Fortran formatted output. The following
example, when placed in gcc/testsuite/g77.dg, does what I want. My only
concern is that I don't see any other tests using dg-output. Is this
style of test OK, or are there better ways?
C Test I format descriptor
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
C { dg-output "^" }
write(*,'(I1)') 1 ! { dg-output "1\n" }
write(*,'(I2)') 2 ! { dg-output " 2\n" }
write(*,'(I3)') 3 ! { dg-output " 3\n" }
write(*,'(I1.1)') 4 ! { dg-output "4\n" }
write(*,'(I2.1)') 5 ! { dg-output " 5\n" }
write(*,'(I2.2)') 6 ! { dg-output "06\n" }
write(*,'(I2.0)') 0 ! { dg-output " \n" }
C { dg-output "$" }
end
More information about the Gcc
mailing list