llvm-project/flang/test/Semantics/multi-programs01.f90
Peixin-Qiao c207e36025 [flang] Enforce a program not including more than one main program
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
2022-05-09 10:48:06 +08:00

7 lines
152 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Test the restriction in 5.2.2
end
!ERROR: A source file cannot contain more than one main program
end