Mention that contains statement is missing if it does not precede module procedures
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- fortran
- Domain
- compilers
Research direction
Start by reproducing the diagnostic with the shown contains.f90 example and lfortran -c. Trace the parser or diagnostic entry point that reports the unexpected subroutine token; done means the message explains that a preceding CONTAINS statement is missing, with existing diagnostics still passing.
Written by the indexing model from the issue text.
Description
Original issue: https://gitlab.com/lfortran/lfortran/-/issues/729
As mentioned at Fortran Discourse, for a code with a missing contains statement such as
module m
implicit none
subroutine hello()
print*,"hi"
end subroutine hello
end module m
for which lfortran -c says
syntax error: Token 'subroutine' is unexpected here
--> contains.f90:3:1
|
3 | subroutine hello()
| ^
^^^^^^^^^
it would be even better to say
syntax error: Token 'subroutine' is unexpected here without a preceding CONTAINS statement
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 271
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 173
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lfortran/lfortran
-
tests
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Cleanup: resolve_proc_pointer_placeholders re-resolves placeholders already in placeholder_to_real Openderived types
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
derived types
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
openmp
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
All issues in lfortran/lfortran
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·