In Visual Studio 2019 I created a 'standard graphics application' type fortran project and added a source file with the following code
write(6,'(a,$)')'enter lowercase text >'
stringa(i:i) = char(ichar(stringa(i:i))-32)
write(6,'(a)') ' uppercase text >'//stringa
end program lower2upper
I compiled the project for the 32-bit platform using the 2022.1, 2021.4 and 2021.2 releases
The program crashes with the first two releases while it works with the third.
The same behavior is achieved with the 64-bit platform.
I also tried to create a 'QuickWin application' type fortran project with the same results.
Note that "Standard Graphics" is just a variant of QuickWin, one intended to emulate a DOS (!) application with just a full window and no controls or toolbar.