<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - f08 behaves differently wrt modules than flang, and gives 'File has invalid checksum' error"
href="https://bugs.llvm.org/show_bug.cgi?id=46019">46019</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>f08 behaves differently wrt modules than flang, and gives 'File has invalid checksum' error
</td>
</tr>
<tr>
<th>Product</th>
<td>flang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>balay@mcs.anl.gov
</td>
</tr>
<tr>
<th>CC</th>
<td>David.Truby@arm.com, jperier@nvidia.com, kirankumartp@gmail.com, llvm-bugs@lists.llvm.org, sscalpone@nvidia.com
</td>
</tr></table>
<p>
<div>
<pre>[balay@pj01 junk]$ cat modtest.f
module configtest
integer testint
parameter (testint = 42)
end module configtest
[balay@pj01 junk]$ cat usemod.f
program main
use configtest
write(*,*) testint
end
[balay@pj01 junk]$ export F18_FC=gfortran
[balay@pj01 junk]$ ls modfiledir
[balay@pj01 junk]$ flang -c modtest.f -module modfiledir
[balay@pj01 junk]$ ls modfiledir
configtest.f18.mod
[balay@pj01 junk]$ flang -I modfiledir usemod.f
[balay@pj01 junk]$ rm modfiledir/configtest.f18.mod
[balay@pj01 junk]$ f18 -c modtest.f -module modfiledir
[balay@pj01 junk]$ ls modfiledir
configtest.mod
[balay@pj01 junk]$ f18 -I modfiledir usemod.f
usemod.f:2:11: error: Error reading module file for module 'configtest'
use configtest
^^^^^^^^^^
usemod.f:2:11: File has invalid checksum: ./configtest.mod
use configtest
^^^^^^^^^^
f18: semantic errors in usemod.f
[balay@pj01 junk]$
Should f18 behave the same way as flang? [-help suggests they should do the
same thing]. However one creates configtest.f18.mod and the other
configtest.mod
And compile with flang works - but f08 gives the above error.
Also I understand there is no standard naming scheme for module files [some
compilers use configtest.mod, others CONFIGTEST.mod]. Hopefully flang can stick
with configtest.mod - instead of adding a new naming scheme configtest.f18.mod</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>