This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50231] Fatal Error: Wrong module version '5' (expected '4') for file 'sizes.mod'
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Aug 2011 21:14:07 +0000
- Subject: [Bug fortran/50231] Fatal Error: Wrong module version '5' (expected '4') for file 'sizes.mod'
- Auto-submitted: auto-generated
- References: <bug-50231-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50231
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> 2011-08-29 21:14:07 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> > fsubs.f90:2.29:
> > USE SIZES, ONLY: DPSIZE
> > 1
> > Fatal Error: Wrong module version '5' (expected '4') for file 'sizes.mod'
> >
> > [....]
> >
> > Do you have any insights?
>
> This error message indicates that your module "SIZES" has been compiled with a
> different compiler version than the one you're using to compile fsubs.f90.
>
> Please use the same compiler version for both!
>
> This is not a compiler bug but a user error. I'm closing this PR as invalid.
I agree that the error you quoted is a user error.
This, however, should not happen:
gfortran: Internal error: Aborted (program f951)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Finished compiling fsubs
gfortran: fsubs.o: No such file or directory
Completed call to gfcompile.bat
No nonmem execution.
foo.f90:
!!! foo.f90 !!!
module bar
end module bar
!!!!!!!!!!!!!!!
toto.f90:
!!! toto.f90 !!!
program toto
use bar
end program toto
!!!!!!!!!!!!!!!!
$ gfortran45 foo.f90 -c -o foo.o
# hand-edit bar.mod and change module version
$ gfortran45 toto.f90
toto.f90:3.13:
use bar
1
Fatal Error: Wrong module version '3' (expected '4') for file 'bar.mod' opened
at (1)
$
In other words: no ICE. Just the plain error message.