This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/72798] Module (.mod) file changes even when interface does not
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Aug 2016 08:27:07 +0000
- Subject: [Bug fortran/72798] Module (.mod) file changes even when interface does not
- Auto-submitted: auto-generated
- References: <bug-72798-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72798
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2016-08-04
Ever confirmed|0 |1
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> If I compile the attached module ('gfortran -c test_mod.f90') with and without
> the print statement commented out, I get .mod files which not only differ
> in contents, but also in size.
Why do you expect the .mod files be the same with or without a print statement?
IMO if two files differ in contents, it is likely they also differ in size.
AFAICT compiling several time the attached test does not regenerate the
test_mod.mod file unless I do some modification in the module. So you probably
need a more complex test to expose the behavior you are complaining about.
> Is there a way to force gfortran to treat all routines as being
> (internally) impure, unless explicitly declared as pure?
You can always give the IMPURE attribute to the routines, but I have no idea if
it helps.