http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55733
Bug #: 55733
Summary: -fno-automatic: Fails for scalar allocatables
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
-fno-automatic implies SAVE. However, it doesn't work for scalar allocatables:
subroutine foo(i)
integer :: i
integer, allocatable :: j
if (i == 1) j = 42
if (.not. allocated (j)) call abort ()
if (j /= 42) call abort ()
end
call foo(1)
call foo(2)
end