Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units analysis sensitive to arrays; possible bug #37

Closed
dorchard opened this issue Aug 11, 2016 · 0 comments
Closed

Units analysis sensitive to arrays; possible bug #37

dorchard opened this issue Aug 11, 2016 · 0 comments
Assignees

Comments

@dorchard
Copy link
Member

Compare the following two files and the results coming from units-suggest, crit.f90

program critical
  implicit none
  real :: a, b, c, d, e
  e = a + b*c*d
end program

and crit2.f90

program critical2
  implicit none
  integer i = 1
  real, dimension(1) :: a, b, c, d, e
  e(i) = a(i) + b(i)*c(i)*d(i)
end program

units-suggest gives:

$ crit.f90 
Suggesting variables to annotate with unit specifications in 'crit.f90'
crit.f90: 3 variable declarations suggested to be given a specification:
    (3:17)  c
    (3:20)  d
    (3:23)  e

$ crit2.f90 
Suggesting variables to annotate with unit specifications in 'crit2.f90'
crit2.f90: 6 variable declarations suggested to be given a specification:
    (3:11)  i
    (4:25)  a
    (4:28)  b
    (4:31)  c
    (4:34)  d
    (4:37)  e

I believe the second set of critical variables should only differ by i. Or at least, should be some set of size 4, not the above. I suppose this is something to do with how array declarations are handled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants