gcc/testsuite/gfortran.dg/print_1.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/29403 |
| 3 | program p |
| 4 | character(len=10) a, b, c |
| 5 | integer i |
| 6 | i = 1 |
| 7 | print ('(I0)'), i |
| 8 | a = '(I0,' |
| 9 | b = 'I2,' |
| 10 | c = 'I4)' |
| 11 | call prn(a, b, c, i) |
| 12 | print (1,*), i ! { dg-error "in PRINT statement" } |
| 13 | end program p |
| 14 | |
| 15 | subroutine prn(a, b, c, i) |
| 16 | integer i |
| 17 | character(len=*) a, b, c |
| 18 | print (a//(b//c)), i, i, i |
| 19 | print trim(a//trim(b//c)), i, i, i |
| 20 | end subroutine prn |