The following simple code compiler with no errors or warnings, however the assignment statement results in an "forrtl: severe (157): Program Exception - access violation" at run-time:
program p implicit none character(len=1), allocatable :: str(:) str = [ "" ] stop end program p
forrtl: severe (157): Program Exception - access violation Image PC Routine Line Source p64.exe 000000013F7A7629 Unknown Unknown Unknown p64.exe 000000013F782213 Unknown Unknown Unknown p64.exe 000000013F781162 MAIN__ 7 p.f90 p64.exe 000000013F7AAA5E Unknown Unknown Unknown p64.exe 000000013F7AAD94 Unknown Unknown Unknown kernel32.dll 00000000771A59DD Unknown Unknown Unknown ntdll.dll 00000000773DA631 Unknown Unknown Unknown Press any key to continue . . .
Thanks,