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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

[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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to