From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C666383960F; Sun, 11 Dec 2022 06:37:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C666383960F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670740640; bh=9tPX60gIjsbPILiAQkf/tyt5fp8L1QMOKfnjd8rCVx0=; h=From:To:Subject:Date:From; b=rnvIiQvtz1/VlfwwVFWko5KNZfeslWF2XTHya1pMpHsnWyq1/R+Q6LVLrY5lgVT8D Wq2Vu9Wdu+H+ShVL3U5JoHuPRWyOjkTZnlQ4OrREiSPY3sut8Q0gLBrpLU1zB9jIMF 7/mEOb3ZMC2etpvqwwHOMZdN8mgib+QtbXr0sePc= From: "gilles.gouaillardet at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/108056] New: backward compatibility issue between 11 and 12 Date: Sun, 11 Dec 2022 06:37:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gilles.gouaillardet at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108056 Bug ID: 108056 Summary: backward compatibility issue between 11 and 12 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: gilles.gouaillardet at gmail dot com Target Milestone: --- Created attachment 54062 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54062&action=3Dedit a simple reproducer The attached program crashes when compiled on ubuntu 22.04 (jammy) based on debian bookworm with gfortran-11: $ gfortran bug.f90=20 $ ./a.out=20 Internal Error: Invalid type in descriptor Error termination. Backtrace: #0 0x7f04aefe9ad0 in ??? #1 0x7f04aefea649 in ??? #2 0x7f04aefeae38 in ??? #3 0x7f04af22c8a4 in ??? #4 0x56490815c24e in ??? #5 0x56490815c1f3 in ??? #6 0x56490815c316 in ??? #7 0x56490815c352 in ??? #8 0x7f04aedc7d8f in __libc_start_call_main at ../sysdeps/nptl/libc_start_call_main.h:58 #9 0x7f04aedc7e3f in __libc_start_main_impl at ../csu/libc-start.c:392 #10 0x56490815c0c4 in ??? #11 0xffffffffffffffff in ??? After some investigations, I found gfortran-11 uses libgfortran built for gfortran-12. I guess the fine folks at debian chose to do so since the vers= ion library for libgfortran in 5.0.0 (from gfortran-8 up to gfortran-12, I did = not test gfortran-13) and they assume or expect ABI and semantic compatibility. The issue can be reproduced by compiling the attached reproducer with gfortran-11, and running it after tweaking LD_LIBRARY_PATH so it uses libgfortran from gfortran-12. I think there are basically two ways to see this issue: - it should work, this is a bug in libfrotran-12 - libgfortran does not ensure such backward compatibility, and because of = the semantic change, the library version should be/have been bumped ( e.g. 5.1.= 0 or 6.0.0) from gfortran-12. Once it is decided on how to move forward, I will be more than happy to rep= ort this to the debian folks. For the records, this issue came to my attention at https://stackoverflow.com/questions/74738981/the-use-mpi-f08-statement-caus= es-fortran-mpi-programs-to-crash-on-ubuntu-22-04/74742760#74742760=