I have a bit of old code where a number of character arrays are declared thus:
CHARACTER*(30) A(10), B(10), C(1)
They are then initialised in DATA statements. C started out as 10 elements long as well, but as I never got round to using C(2) onwards, I must at some time around 1985 have reduced it to C(1), so that the DATA statement looks simply like:
DATA C/'123456789012345678901234567890'/
If I compile without -O, the code compiles and runs correctly as far as I can tell. If I use -O, the code generates two errors:
Assumed-size errors cannot appear in a DATA statement
(which gives the line number of the DATA statement) and
C is an assumed-size array (bound of *), but is not an argument
which gives the line number of the declaration.
The workaround is to make C have the dimension (2), so it isn't serious, although I do have to put 30 useless characters in the data statement for C(2).
I'm using an old 4.90 version. Is this the same error fixed at 5.20 and referred to in the bugs fixed list under the note:
/OLD_ARRAYS gives a false error report when A(1) is not an argument
It is probably connected.
Regards
Eddie