<div dir="ltr"><p style="margin-top:0px;margin-bottom:0px">Dear MPIf90 maintainers,<br></p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">I appear to have found a bug
with mpif90, running under Centos 7. Essentially any assignment to a
byte variable gives a warning or an error. The errors are fatal, and
the warnings are too numerous to ignore (I'm getting
one warning for each byte that is initialised in a DATA statement, so
that can be many thousands of warnings). We have used code like this
since 1982 without any problems.<br>
</p>
<div><br>
</div>
<div>When mpif90 is used to compile a simple Fortran source with the
-fno-range-check option, any byte assignment in code or data statement
will give a warning, eg :<br>
<br>
<i>mpif90_bug_report.f:30.13:<br>
b1 = 6<br>
1<br>
Warning: Possible change of value in conversion from INTEGER(4) to INTEGER(1) at (1)</i><br>
<br>
This only happens with 'mpif90 -c -fno-range-check'; there is no warning
when using gfortran. However, without -fno-range-check, we get other,
fatal, errors, so that's even worse :<br>
</div>
<div><br>
</div>
<div> <i> mpif90_bug_report.f:28.24:<br>
<br>
byte b2 / '89'X/<br>
1</i></div>
<div><i> Error: Arithmetic overflow converting INTEGER(16) to
INTEGER(1) at (1). This check can be disabled with the option
-fno-range-check<br>
</i><br>
</div>
I've attached a simple program to replicate the problem (<span>mpif90_bug_report.f</span>)
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">The environment details are :</p>
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">> more /etc/redhat-release<br>
</p>
<div>CentOS Linux release 7.6.1810 (Core)<br>
<div><br>
</div>
<div>> uname -a<br>
</div>
<div>Linux ... 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux<br>
<div> </div>
<div>> mpif90 -v<br>
mpif90 for MPICH version 3.0.4<br>
Using built-in specs.<br>
COLLECT_GCC=gfortran<br>
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper<br>
Target: x86_64-redhat-linux<br>
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=<a href="http://bugzilla.redhat.com/bugzilla">http://bugzilla.redhat.com/bugzilla</a> --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto
--enable-plugin --enable-initfini-array --disable-libgcj
--with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-tune=generic
--with-arch_32=x86-64 --build=x86_64-redhat-linux<br>
Thread model: posix<br>
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) <br>
</div>
<div><br>
</div>
Please don't hestitate to let me know if any further details are needed.</div>
<div><br>
</div>
<div>Many thanks,</div>
<div>Jonathan Ravens<br>
</div>
</div></div>