Title: | Digital Fortran |
Notice: | Read notes 1.* for important information |
Moderator: | QUARK::LIONEL |
Created: | Thu Jun 01 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1333 |
Total number of notes: | 6734 |
Hello, I'd like to have a little update on the problem of omitted dummy argu ments. I know omitted dummy arguments were not supported by VAX FORTRAN, what about DEC FORTRAN nowadays ? To say the truth, one customer wanted to use this 'feature' and encountered the well known ACCVIO problem with an omitted character string argument, but the accvio only occurs with nooptimized code ... Why ? Here is a little example : implicit none character*2 chain /'cc'/ integer*4 i /1/ call my_sub(,i) end subroutine my_sub ( dum_chain, dum_i) character*2 dum_chain integer*4 dum_i type*, dum_i return end So compiled /NOOPT/DEBUG it leads to ACCVIO, compiled with default qualifiers, it runs. Thanks for your explanations. Marielle Degage CSC France
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1325.1 | QUARK::LIONEL | Free advice is worth every cent | Mon Jun 02 1997 11:05 | 30 | |
Still not supported. Optimization may change where code gets emitted to access the argument list, or the contents of registers/stack, etc. Yes, this program may "run" but if the subroutine actually uses dum_chain, it doesn't. Try this one: implicit none character*2 chain /'cc'/ integer*4 i /1/ call my_sub(,i) end subroutine my_sub ( dum_chain, dum_i) character*2 dum_chain integer*4 dum_i type*, dum_i if (dum_i .ne. 1) type *, dum_chain return end Even though the comparison will fail, so the TYPE of dum_chain doesn't occur, the compiler generates code to fetch the descriptor of dum_chain and fails. In the example you posted, the optimizer was able to tell that dum_chain was never used and thus removed the descriptor access code. Steve |