re PR fortran/78741 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534)
[official-gcc.git] / gcc / testsuite / gfortran.dg / fmt_tl.f
blob619f8c9691c24662989101424bca42f5768cbbff
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
4 ! PR25631 Check that TL editing works for special case of no bytes written yet.
5 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
6 real x
7 character*15 line
8 x = 12.34
9 write(line,10) x
10 10 format(tr2,tl2,g11.4)
11 if (line.ne.' 12.34 ') STOP 1
12 write(line,20) x
13 20 format(tr5,tl3,g11.4)
14 if (line.ne.' 12.34 ') STOP 2
15 write(line,30) x
16 30 format(tr5,tl3,tl3,g11.4)
17 if (line.ne.' 12.34 ') STOP 3
18 write(line,40) x
19 40 format(tr25,tl35,f11.4)
20 if (line.ne.' 12.3400 ') STOP 4
21 write(line,50) x
22 50 format(tl5,tr3,f11.4)
23 if (line.ne.' 12.3400 ') STOP 5
24 write(line,60) x
25 60 format(t5,tl3,f11.4)
26 if (line.ne.' 12.3400 ') STOP 6
27 end