kind declaration can be lost

Open
#2,178 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
fortran, python
Domain
compilers

Research direction

The reproducer is in test2.f90 and runs with psyclone -api nemo; start by running that command to observe the lost kind declarations. Trace how integer(kind=kind(2)) and integer(kind(2)) are represented, with completion meaning the generated Fortran preserves both kind values.

Written by the indexing model from the issue text.

Description

bug PSyIR

When the kind of a variable is determined by the kind keyword, PSyclone loses the value. For example ...

program test2
  integer(kind=kind(2)) :: i
  integer(kind(2))      :: j
end program test2
psyclone -api nemo test2.f90
program test2
  integer :: i
  integer :: j
end program test2
Dominant language
Python
Stars
137
Forks
36
Avg merge
6d 16h
Merged PRs (30d)
18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stfc/PSyclone

All issues in stfc/PSyclone

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.