-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
There are numerous cases of truncated lines and/or uninitialized variables. It might be the cause of various misbalances.
The essense of a problem:
main.f
program hello
call tryme
aaaaaaaa = 2
a = 1
d = aaaaaaaa
print *, d
endtryme.f
subroutine tryme
aa = 3.
endgfortran main.f tryme.f
./a.outYou'll get nonsense like (may vary)
mlt@nb:~/dev/swat/master/build(master)$ ./a.out
-1.41008350E-05
Note that -fno-automatic does not solve the problem
gfortran main.f tryme.f -Wall -fno-automatic -finit-real=snan -ffpe-trap=invalid
./a.outThe above will cause exception.