fortran: Bump MOD_VERSION to "16" [PR118337]

Message ID Z35Ggbdz9r2AZnZe@tucnak
State New
Headers
Series fortran: Bump MOD_VERSION to "16" [PR118337] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed

Commit Message

Jakub Jelinek Jan. 8, 2025, 9:33 a.m. UTC
  Hi!

As mentioned in the PR, there is a *.mod incompatibility between GCC 14 and
GCC 15, at least when using iso_c_binding or iso_fortran_env intrinsic
modules, because new entries have been added to those modules in the middle,
causing changes in the constants emitted in the *.mod files.

Also, I fear modules produced with GCC 15 with -funsigned and using UNSIGNED
in the modules will be unreadable by GCC 14.

The following patch just bumps MOD_VERSION for this.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Note, I'll post incrementally a WIP on accepting also MOD_VERSION "15",
but it is unfinished.

2025-01-08  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/118337
	* module.cc (MOD_VERSION): Bump to "16".


	Jakub
  

Comments

Steve Kargl Jan. 8, 2025, 6:18 p.m. UTC | #1
On Wed, Jan 08, 2025 at 10:33:53AM +0100, Jakub Jelinek wrote:
> 
> As mentioned in the PR, there is a *.mod incompatibility between GCC 14 and
> GCC 15, at least when using iso_c_binding or iso_fortran_env intrinsic
> modules, because new entries have been added to those modules in the middle,
> causing changes in the constants emitted in the *.mod files.
> 
> Also, I fear modules produced with GCC 15 with -funsigned and using UNSIGNED
> in the modules will be unreadable by GCC 14.
> 
> The following patch just bumps MOD_VERSION for this.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 

Yes.

While working on f_c_string(), it never occurred to me
that the version number should have been bumped.  Thanks
for the sleuthing you've done so far.
  
Thomas Koenig Jan. 8, 2025, 8:55 p.m. UTC | #2
Am 08.01.25 um 19:18 schrieb Steve Kargl:
> While working on f_c_string(), it never occurred to me
> that the version number should have been bumped.  Thanks
> for the sleuthing you've done so far.

Same for me!

Best regards

	Thomas
  

Patch

--- gcc/fortran/module.cc.jj	2025-01-02 11:47:31.697201637 +0100
+++ gcc/fortran/module.cc	2025-01-07 21:41:46.866494776 +0100
@@ -84,7 +84,7 @@  along with GCC; see the file COPYING3.
 
 /* Don't put any single quote (') in MOD_VERSION, if you want it to be
    recognized.  */
-#define MOD_VERSION "15"
+#define MOD_VERSION "16"
 
 
 /* Structure that describes a position within a module file.  */