gcc/testsuite/gfortran.dg/output_exponents_1.f90
raw| 1 | ! { dg-do run } |
| 2 | ! { dg-options "-std=legacy" } |
| 3 | ! |
| 4 | ! PR 21376 |
| 5 | ! we used to take the logarithm of zero in this special case |
| 6 | character*10 c |
| 7 | write (c,'(e10.4)') 1.0 |
| 8 | if(c /= "0.1000E+01") STOP 1 |
| 9 | write (c,'(e10.4)') 0.0 |
| 10 | if(c /= "0.0000E+00") STOP 2 |
| 11 | write (c,'(e10.4)') 1.0d100 |
| 12 | if(c /= "0.1000+101") STOP 3 |
| 13 | write (c,'(e10.4)') 1.0d-102 |
| 14 | if(c /= "0.1000-101") STOP 4 |
| 15 | end |