MeteoSwiss / MeteoSwiss/ffixed2free

Wrong rewriting of label line, when the label is the same as the do loop

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Fortran
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

For code like :
```fortran
do 10 i = 1, N
goto 10
10 j = i
...
```
the tools transform into
```fortran
do i = 1, N
goto 10
j = i
10 continue
end do
...
```
skipping the line j = i
it should be

```fortran
do i = 1, N
goto 10
10 continue
j = i
end do
...

```
or
```fortran
do i = 1, N
goto 10
10 j = i
end do
...

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the transformation with the fixed-format snippet shown in the issue and compare it with both expected outputs. Trace the converter's handling of a labeled DO loop when its terminal label is also on the loop body, then add a regression test showing that `j = i` is not skipped. Done means the converted code preserves that statement in the loop.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.