aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpm/src/fpm_sources.f906
1 files changed, 3 insertions, 3 deletions
diff --git a/fpm/src/fpm_sources.f90 b/fpm/src/fpm_sources.f90
index b104fa6..2c15b8c 100644
--- a/fpm/src/fpm_sources.f90
+++ b/fpm/src/fpm_sources.f90
@@ -378,9 +378,9 @@ function parse_f_source(f_filename,error) result(f_source)
end if
- ! Detect if is program
- if (f_source%unit_type == FPM_UNIT_UNKNOWN .and. &
- index(adjustl(lower(file_lines(i)%s)),'program') == 1) then
+ ! Detect if contains a program
+ ! (no modules allowed after program def)
+ if (index(adjustl(lower(file_lines(i)%s)),'program') == 1) then
f_source%unit_type = FPM_UNIT_PROGRAM