gcc/testsuite/gfortran.dg/read_float_4.f90
raw| 1 | ! { dg-do run } |
| 2 | ! |
| 3 | ! PR libgfortran/53051 |
| 4 | ! |
| 5 | ! Check that reading "4.0q0" works, i.e. floating-point |
| 6 | ! numbers which use "q" to indicate the exponential. |
| 7 | ! (Which is a vendor extension.) |
| 8 | ! |
| 9 | character(len=20) :: str |
| 10 | real :: r |
| 11 | integer :: i |
| 12 | |
| 13 | r = 0 |
| 14 | str = '1.0q0' |
| 15 | read(str, *, iostat=i) r |
| 16 | if (r /= 1.0 .or. i /= 0) STOP 1 |
| 17 | !print *, r |
| 18 | end |