Occasionally I have heard references to a peculiarpeculiarity of certain (old) Fortran compilers, with regards to subprogram argument passing. Here is an example, from an answer to a Stack Overflow question:
Some early Fortran compilers implemented constants by using a constant pool. All parameters were passed by reference. If you called a function, e.g.
f(1)
The compiler would pass the address of the constant 1 in the constant pool to the function. If you assigned a value to the parameter in the function, you would change the value (in this case the value of 1) globally in the program. Caused some head scratching.
The C FAQ also mentions “FORTRAN's classic idiosyncrasy involving constants passed by reference” in a footnote.
I have no problem believing that some compilers behaved this way. However, I would like to have some contemporarycontemporaneous documents that confirm it. The nature of the document doesn't matter too much; I merely want confirmation from a non-anecdotal source (although some kind of manual would be ideal).