Skip to content

Commit

Permalink
240410.212617.HKT fix failure of mlint
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Apr 10, 2024
1 parent 161df49 commit 2437770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions fortran/common/consts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module consts_mod
!
! Started: July 2020
!
! Last Modified: Wednesday, April 10, 2024 AM01:55:03
! Last Modified: Wednesday, April 10, 2024 PM09:18:10
!--------------------------------------------------------------------------------------------------!

!--------------------------------------------------------------------------------------------------!
Expand Down Expand Up @@ -158,7 +158,7 @@ module consts_mod
! N.B.: The `if` is a workaround for the following issues with LLVM flang 19.0.0 and nvfortran 24.3.0:
! https://fortran-lang.discourse.group/t/flang-new-19-0-warning-overflow-on-power-with-integer-exponent/7801
! https://forums.developer.nvidia.com/t/bug-of-nvfortran-24-3-0-fort1-terminated-by-signal-11/289026
#if (defined __llvm__ && defined __flang__)
#if (defined __flang__ && __flang_major__ <= 19)
real(RP), parameter :: TINYCV = TEN**max(-60.0, -real(MAXPOW10))
#else
real(RP), parameter :: TINYCV = TEN**max(-60, -MAXPOW10)
Expand Down
13 changes: 8 additions & 5 deletions matlab/mex_gateways/tests/makefiles/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 9: G95
# a: Absoft af95
# d: AOCC flang
# f: Classic flang
# f: LLVM flang
# g: GNU gfortran
# n: NAG nagfor
# i: Intel ifort
Expand Down Expand Up @@ -251,10 +251,13 @@ dtest_i2_r16_d1_tst dtest_i4_r16_d1_tst dtest_i8_r16_d1_tst dtest_i2_r16_d0_tst
dtest_i2_r16_d1_tst dtest_i4_r16_d1_tst dtest_i8_r16_d1_tst dtest_i2_r16_d0_tst dtest_i4_r16_d0_tst dtest_i8_r16_d0_tst: \
FC2 := $(DFORT) $(FFLAGS2) -ffp-exception-behavior=strict

# Classic Flang
FFORT := flang
FFORT := $(FFORT) -pedantic-errors -Werror
FFORT := $(FFORT) -std=f$(FSTD) -pedantic -Weverything -Wall -Wextra -Minform=warn -Mstandard -Mbounds -Mchkptr -Kieee
# LLVM Flang
FFORT := $(shell find -L /usr/bin /usr/local/bin ${HOME}/local ${HOME}/.local /tmp -type f -executable -name flang -print 2>/dev/null | sort | tail -n 1)
FFINC := $(shell dirname $$(dirname $(FFORT) 2>/dev/null) 2>/dev/null)/include
FFLIB := $(shell dirname $$(dirname $(FFORT) 2>/dev/null) 2>/dev/null)/lib
FFORT := $(FFORT) -fimplicit-none -Werror
# -std or -pedantic does not work due to the non-standard code in the MEX API provided by MathWorks
#FFORT := $(FFORT) -std=f2018 -pedantic

ftest_i2_r4_d1_tst ftest_i4_r4_d1_tst ftest_i8_r4_d1_tst ftest_i2_r4_d0_tst ftest_i4_r4_d0_tst ftest_i8_r4_d0_tst: \
FC1 := $(FFORT) $(FFLAGS1)
Expand Down

0 comments on commit 2437770

Please sign in to comment.