Skip to content

Commit cab2c26

Browse files
committed
prevent uninitialized variable
1 parent 82b9eda commit cab2c26

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/fpm_meta.f90

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,16 +1135,18 @@ logical function is_intel_classic_option(language,same_vendor_ID,screen_out,comp
11351135
type(string_t), intent(in) :: screen_out
11361136
type(compiler_t), intent(in) :: compiler,mpi_compiler
11371137

1138-
if (same_vendor_ID/=0) return
1139-
1140-
select case (language)
1141-
case (LANG_FORTRAN)
1142-
is_intel_classic_option = mpi_compiler%is_intel() .and. compiler%is_intel()
1143-
case (LANG_C)
1144-
is_intel_classic_option = screen_out%s=='icc' .and. compiler%cc=='icx'
1145-
case (LANG_CXX)
1146-
is_intel_classic_option = screen_out%s=='icpc' .and. compiler%cc=='icpx'
1147-
end select
1138+
if (same_vendor_ID/=0) then
1139+
is_intel_classic_option = .false.
1140+
else
1141+
select case (language)
1142+
case (LANG_FORTRAN)
1143+
is_intel_classic_option = mpi_compiler%is_intel() .and. compiler%is_intel()
1144+
case (LANG_C)
1145+
is_intel_classic_option = screen_out%s=='icc' .and. compiler%cc=='icx'
1146+
case (LANG_CXX)
1147+
is_intel_classic_option = screen_out%s=='icpc' .and. compiler%cc=='icpx'
1148+
end select
1149+
end if
11481150

11491151
end function is_intel_classic_option
11501152

0 commit comments

Comments
 (0)