问题描述
在Linux(Ubuntu 16.04,内核4.4.0-186-通用)上,我使用了Oracle Developer Studio 12.6中的Fortran编译器sunf95
来编译以下Fortran代码:
program testieee
use ieee_arithmetic,only : is_nan => ieee_is_nan
implicit none
print *,is_nan(0.0)
end program testieee
未指定编译器选项。编译失败,并显示以下消息:
f90comp: ../src/s_intr_mod.c :772 : ieee_arithmetic_semantics: assertion `0' failed.
f90: Fatal error in $PATH_TO_ORACLE_DEVELOPER_STUDIO/OracleDeveloperStudio12.6-linux-x86-bin/developerstudio12.6/lib/compilers/bin/f90comp : Signal number = 6
但是,可以使用同一编译器成功编译以下代码:
program testieee
use ieee_arithmetic,only : ieee_is_nan ! Here is the only difference.
implicit none
print *,ieee_is_nan(0.0)
end program testieee
gfortran,g95,ifort,nagfor,pgfortran和absoft fortran编译器都可以编译两个版本的代码。
那么Oracle Developer Studio 12.6为什么会失败?错误消息是什么意思?对代码的任何评论/批评将不胜感激。非常感谢。
修改
- @Ian Bush推测,该错误可能是因为名称“ is_nan”与某些非标准固有过程的名称冲突。因此,我尝试将其更改为“ my_nan”,但错误仍然存在。感谢伊恩·布什。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)