New interesting twist came from 64bit Fortran. I got the error above and by inertia though that debugger was wrong indicating this error because it still can miss the error by the line or two plus there were a lot of other ways to make a mistake in the long list of variables
Eventually after losing some time i realized that the confusion is because variable IJ is integer*8 or integer (7). So formally it is integer but it is not indicated by the compiler's debugger what kind of integer.
And here we return to these damn cryptic error messages from the 1960th era. Suggestion for error message
'Argument number 4 of WINIO@ (continuation 31) declared as integer (7) or Integer8 should be integer4 or integer kind... whatever'