The statement
integer freeunit
may, especially in old code, not declare a scalar integer variable but a function that returns an integer. Typically then the function would be defined in another compilation unit and its declaration in the program provides enough for the linker to do its work.
If this is the case then
ixyz = freeunit ()
would be construed as a call to that function with no arguments.
Scour your source files for a line containing
integer function freeunit
Note that I'm making educated guesses here, I never follow links away from the safety of SO. I'll go further and hazard a guess that the function freeunit
returns an i/o unit number which is not already in use.