Skip to content

f2py incorrectly translate dimension declaration #8062

@ChewbaccaKL

Description

@ChewbaccaKL

Consider n being an integer and a() is an array The declaration

Integer :: a(0:n/2*2)

is converted into:

a(1.0 * n + 1.0)

which is incorrect. Attaching a minimal Fortran 90 example (zipped because I cannot upload
t1.zip

If, in the attached example, you changed n/2*2 into, say, n, the code would compile correctly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions