[llvm-bugs] [Bug 46019] New: f08 behaves differently wrt modules than flang, and gives 'File has invalid checksum' error

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 21 06:55:50 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46019

            Bug ID: 46019
           Summary: f08 behaves differently wrt modules than flang, and
                    gives 'File has invalid checksum' error
           Product: flang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedbugs at nondot.org
          Reporter: balay at mcs.anl.gov
                CC: David.Truby at arm.com, jperier at nvidia.com,
                    kirankumartp at gmail.com, llvm-bugs at lists.llvm.org,
                    sscalpone at nvidia.com

[balay at pj01 junk]$ cat modtest.f
      module configtest
      integer testint
      parameter (testint = 42)
      end module configtest
[balay at pj01 junk]$ cat usemod.f
      program main
      use configtest

      write(*,*) testint

      end
[balay at pj01 junk]$ export F18_FC=gfortran
[balay at pj01 junk]$ ls modfiledir
[balay at pj01 junk]$ flang -c modtest.f -module modfiledir
[balay at pj01 junk]$ ls modfiledir
configtest.f18.mod
[balay at pj01 junk]$ flang -I modfiledir usemod.f 
[balay at pj01 junk]$ rm modfiledir/configtest.f18.mod 
[balay at pj01 junk]$ f18 -c modtest.f -module modfiledir
[balay at pj01 junk]$ ls modfiledir
configtest.mod
[balay at 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 at 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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200521/4f57471c/attachment.html>


More information about the llvm-bugs mailing list