bug?pgfortran/pgf90 failed to support io-function.

Hello all:

I usually use disk files to access big datas to save intermediated result. I’ve met a headache problem that when I use the code "close (unitnum,status=“delete”) during the program runing,it cannot delete the related file(s) and just keep it occupied and sometimes showed the file size as “0 bytes”, even if I want to delete it manually but failed with the warning of “the file cannot be accessed” unless I exit the program and delete the file(s) manually.This code is work well with other compilers such as ifort or gfortran as well. I’ve tried with other ways such as by call system(“del”) or deletefile functions by using third party module, but failed also with or without warnings.
Can anyone tell me how to fix it to solve my problem?It’ll be highly appreciated.
The compiler version is PGI 18.10 community.
Thank you!

Is this on Linux? If so, are you trying to delete a file on a local filesystem or on a network file system?

This feature usually works, but anything you can provide to help make a reproducer would be helpful.

No, the OS is win10.

Sorry, the previous description of the issue is not complete, the actual problem is when the pgf90/pgfortran compile with -Mcuda=… options, it occurs. The normal programs without these options would be effected as expected for the host code.
The problem is the “close” are for host codes and has nothing to do with the device.