mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 04:16:46 +00:00

As Fortran 2018 5.2.2 states, a program shall consist of exactly one main program. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125186
8 lines
162 B
Fortran
8 lines
162 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Test the restriction in 5.2.2
|
|
|
|
program m
|
|
end
|
|
!ERROR: A source file cannot contain more than one main program
|
|
end
|