| 1 |
c { dg-do compile } |
| 2 |
c PR fortran/50407 |
| 3 |
c |
| 4 |
program bar |
| 5 |
|
| 6 |
interface operator (.ip.) |
| 7 |
function mul (i1, i2) |
| 8 |
character(20) mul |
| 9 |
intent(in) :: i1,i2 |
| 10 |
end function |
| 11 |
end interface |
| 12 |
|
| 13 |
character(20) foo |
| 14 |
i=3 |
| 15 |
j=4 |
| 16 |
print 2.ip.8 ! compiles fine |
| 17 |
print i.ip.2 ! compiles fine |
| 18 |
print i.ip.j ! compiles fine |
| 19 |
foo = 1_'(I0,I4.4)' |
| 20 |
print foo, i,j |
| 21 |
print 1_'(I0,1X,I4.4)', i, j |
| 22 |
end |
| 23 |
|
| 24 |
function mul (i1, i2) |
| 25 |
character(20) mul |
| 26 |
intent(in) :: i1,i2 |
| 27 |
integer prod |
| 28 |
prod=i1*i2 |
| 29 |
write(mul,100) prod |
| 30 |
100 format("('ok ",i2,"')") |
| 31 |
end function |