| 1 |
*> { dg-do run } |
| 2 |
*> { dg-output-file "group2/access_to_OPTIONAL_LINKAGE_item_not_passed.out" } |
| 3 |
|
| 4 |
identification division. |
| 5 |
program-id. caller. |
| 6 |
data division. |
| 7 |
working-storage section. |
| 8 |
01 x pic x(4) value '9876'. |
| 9 |
procedure division. |
| 10 |
call 'callee' using x |
| 11 |
end-call |
| 12 |
call 'callee' using omitted |
| 13 |
end-call |
| 14 |
stop run. |
| 15 |
end program caller. |
| 16 |
|
| 17 |
identification division. |
| 18 |
program-id. callee. |
| 19 |
data division. |
| 20 |
working-storage section. |
| 21 |
01 py pointer. |
| 22 |
linkage section. |
| 23 |
01 x. |
| 24 |
05 y pic x(4). |
| 25 |
procedure division using optional x. |
| 26 |
set py to address of x. |
| 27 |
if py is not equal to zero |
| 28 |
display y |
| 29 |
else |
| 30 |
display "parameter omitted" |
| 31 |
end-if. |
| 32 |
goback. |
| 33 |
end program callee. |
| 34 |
|