Bug 39309 - [4.4 Regression] .mod file versioning causes error instead of overwritting the file
Summary: [4.4 Regression] .mod file versioning causes error instead of overwritting th...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 09:41 UTC by Tobias Burnus
Modified: 2009-02-27 10:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-02-26 10:22:40


Attachments
Draft patch (untested, not even compiled) (361 bytes, patch)
2009-02-26 13:17 UTC, Tobias Burnus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2009-02-26 09:41:52 UTC
In order to not trigger a compilation cascade, gfortran only overwrites a .mod file when its MD5 sum has changed.

Seemingly, the mod-file versioning has the side effect that the MOD file is not overwritten if there are no other changes but the version number, which causes the version-mismatch error.

I'm not sure whether this is a problem between 4.x and 4.(x+1) versions as the .mod file probably has changed in an incompatible way (different MD5 sum), but still it is annoying.

Expected: If the version number does not match, the file is written nevertheless.

(Maybe the error also occurs at a different place, I have not yet checked the source code.)
Comment 1 Paul Thomas 2009-02-26 10:22:40 UTC
Confirmed.

This scared the pants off me by apparently causing regressions and then a build failure in libgomp.

Cheers

Paul
Comment 2 Tobias Burnus 2009-02-26 13:17:14 UTC
Created attachment 17366 [details]
Draft patch (untested, not even compiled)
Comment 3 Tobias Burnus 2009-02-27 06:45:21 UTC
Subject: Bug 39309

Author: burnus
Date: Fri Feb 27 06:44:59 2009
New Revision: 144461

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144461
Log:
2009-02-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39309
        * module.c (read_md5_from_module_file): Include mod version
        in had-changed test.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c

Comment 4 Tobias Burnus 2009-02-27 07:46:04 UTC
Subject: Bug 39309

Author: burnus
Date: Fri Feb 27 07:45:47 2009
New Revision: 144462

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144462
Log:
2009-02-27  Tobias Burnus  <burnus@net-b.de>

       PR fortran/39309
       * module.c (read_md5_from_module_file): Add missing quote.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c

Comment 5 Tobias Burnus 2009-02-27 10:47:05 UTC
FIXED on the trunk.