From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DBF9A388CA5C; Sun, 11 Dec 2022 07:44:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DBF9A388CA5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670744684; bh=pek7U9itcMujX9rLT5G26pkV/xOqtz7WODadRofCI5M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x6Q6c9PyrIDmz/cpT7H9lisyQL90UgarJnv1vyrb7wBVSe3m9zUnQAghM8BZ+Lk2h wEHb8TpfWBrlKG9EBIZ/bk7R3xepHjY2gCVeI8AwwhOPOJJX0luxkV3dLc/BVWPHzb oy81CsCWNJ81t96RAvnO2QB5w4tUXLYB/WmVolMk= From: "gilles.gouaillardet at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/108056] backward compatibility issue between 11 and 12 Date: Sun, 11 Dec 2022 07:44:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: Message-ID: In-Reply-To: References: 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 --- Comment #2 from Gilles Gouaillardet --- ubuntu does not ship libgfortran.so from gfortran-11. I tried on a RedHat box, and the issue only occurs when - I compile with gfortran-11 - *and* I force libgfortran-12 (so if i use the same gfortran and libgfortran versions, there is no issue). Here is a stack trace in these conditions: #0 0x00002aaaaba2dd70 in _exit () from /lib64/libc.so.6 #1 0x00002aaaab9a1cab in __run_exit_handlers () from /lib64/libc.so.6 #2 0x00002aaaab9a1d37 in exit () from /lib64/libc.so.6 #3 0x00002aaaaacf0976 in _gfortrani_exit_error (status=3D3) at ../../../../src/gcc-12.1.0/libgfortran/runtime/error.c:218 #4 0x00002aaaaacf12af in _gfortrani_internal_error (cmp=3D0x0, message=3D0x2aaaaafdf2a5 "Invalid type in descriptor") at ../../../../src/gcc-12.1.0/libgfortran/runtime/error.c:534 #5 0x00002aaaaaf787e2 in _gfortran_gfc_desc_to_cfi_desc (d_ptr=3D0x7ffffff= fcfa8, s=3D0x7fffffffcfd0) at ../../../../src/gcc-12.1.0/libgfortran/runtime/ISO_Fortran_binding.c:219 #6 0x0000000000400808 in pub_f08ts (a=3D,=20 b=3D) at /home/usersup/gilles/y.f90:29 #7 0x00000000004007ad in bugsub (a=3D1, b=3D-3.67578065e-13) at /home/usersup/gilles/y.f90:35 #8 0x00000000004008d0 in bug () at /home/usersup/gilles/y.f90:43 #9 0x0000000000400907 in main (argc=3D1, argv=3D0x7fffffffd4cd) at /home/usersup/gilles/y.f90:44 #10 0x00002aaaab98a555 in __libc_start_main () from /lib64/libc.so.6 #11 0x0000000000400699 in _start () FWIW, here is the value of s when _gfortran_gfc_desc_to_cfi_desc is invoked (gdb) p *s $6 =3D {base_addr =3D 0x7fffffffd04c, offset =3D 38, dtype =3D {elem_len = =3D 4, version =3D 0, rank =3D 0 '\000', type =3D 11 '\v', attribute =3D 2}, span =3D 4, dim = =3D 0x7fffffffcff8} I also noted that if the reproducer is built with gcc-12, _gfortran_gfc_desc_to_cfi_desc() is not invoked at all.=