Bug 38259 - Add version number to .mod file
Summary: Add version number to .mod file
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: diagnostic
: 38993 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-25 12:57 UTC by Tobias Burnus
Modified: 2009-02-13 22:17 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-09 21:39:32


Attachments
first patch (872 bytes, patch)
2008-12-09 22:23 UTC, Mikael Morin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2008-11-25 12:57:39 UTC
Currently, there are only strange parenthesis-related error messages given if an old, incompatible .mod file is used with a newer compiler, e.g.

Fatal Error: Reading module mmm at line 16 column 65: Expected left parenthesis

(cf. also PR 38248). The solution is to add a version number which is always bumped if a .mod related change happened, which presumably was the case for all new GCC/gfortran releases.
Comment 1 Daniel Franke 2008-12-09 21:39:32 UTC
Could come in handy, especially if people start to distribute module files.
Comment 2 Mikael Morin 2008-12-09 22:23:17 UTC
Created attachment 16867 [details]
first patch

This was starting to rot on my computer.
Comment 3 Mikael Morin 2009-01-28 18:14:32 UTC
*** Bug 38993 has been marked as a duplicate of this bug. ***
Comment 4 Tobias Burnus 2009-02-12 12:33:14 UTC
Jakub and Richard proposed on #gcc that this feature should still go into 4.4, I agree.

(In reply to comment #2)
> Created an attachment (id=16867) [edit]
> first patch

The patch is pre-approved. (I personally had started with version 1 instead of 0, but it really doesn't matter.)
Comment 5 Tobias Burnus 2009-02-13 22:16:39 UTC
Subject: Bug 38259

Author: burnus
Date: Fri Feb 13 22:16:20 2009
New Revision: 144169

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144169
Log:
2009-02-13  Mikael Morin  <mikael.morin@tele2.fr>

        PR fortran/38259
        * module.c (gfc_dump_module,gfc_use_module): Add module
        version number.


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

Comment 6 Tobias Burnus 2009-02-13 22:17:29 UTC
FIXED on the trunk (4.4.0).