As I wrote earlier, Fortran does not allow you to pass a scalar to an array. And, again, the reason it works in release mode is that a release configuration doesn’t enable the cross-source-file generated interface check.
If the value is an input, and not written to, you can pass [int(RWORK(LWM))]
, making it an array constructor. Any changes made in the called routine will be discarded on return.