Skip to content

Numerous line truncations and uninitialized variables #1

@mlt

Description

@mlt

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
      end
tryme.f
      subroutine tryme
      aa = 3.
      end
gfortran main.f tryme.f
./a.out

You'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.out

The above will cause exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions