https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79863
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to vehre from comment #0) > The following simple test code: > > integer, allocatable :: si(:) > integer, allocatable :: ssi(:) > > si = ssi > end > > is IMHO valid Fortran (2003+ at least), but when run in valgrind will show > access to unallocated memory. Without valgrind it most of the time executes > without error. Why do you think that the above code is valid. From F2003, p113 An allocatable variable has a status of unallocated if it is not allocated. The status of an allocatable variable becomes unallocated if it is deallocated (6.3.3) or if it is given that status by the allocation transfer procedure. An allocatable variable with this status shall not be referenced or defined. ssi is unallocated. It shall not be referenced. This is no a numbered constraint, so a compiler need not issue an error. It is a restriction on the programmer.