public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gilles.gouaillardet at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-108056-4-9ZvwGWFg0H@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108056-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108056

--- Comment #2 from Gilles Gouaillardet <gilles.gouaillardet at gmail dot com> ---
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=3) at
../../../../src/gcc-12.1.0/libgfortran/runtime/error.c:218
#4  0x00002aaaaacf12af in _gfortrani_internal_error (cmp=0x0,
message=0x2aaaaafdf2a5 "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=0x7fffffffcfa8,
s=0x7fffffffcfd0) at
../../../../src/gcc-12.1.0/libgfortran/runtime/ISO_Fortran_binding.c:219
#6  0x0000000000400808 in pub_f08ts (a=<unknown type in
/home/usersup/gilles/build/gcc-11.3.0/x86_64-pc-linux-gnu/libgfortran/a.out, CU
0x0, DIE 0xc1>, 
    b=<unknown type in
/home/usersup/gilles/build/gcc-11.3.0/x86_64-pc-linux-gnu/libgfortran/a.out, CU
0x0, DIE 0xce>) at /home/usersup/gilles/y.f90:29
#7  0x00000000004007ad in bugsub (a=1, b=-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=1, argv=0x7fffffffd4cd) 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 = {base_addr = 0x7fffffffd04c, offset = 38, dtype = {elem_len = 4, version =
0, rank = 0 '\000', type = 11 '\v', attribute = 2}, span = 4, dim =
0x7fffffffcff8}

I also noted that if the reproducer is built with gcc-12,
_gfortran_gfc_desc_to_cfi_desc() is not invoked at all.

  parent reply	other threads:[~2022-12-11  7:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11  6:37 [Bug libfortran/108056] New: " gilles.gouaillardet at gmail dot com
2022-12-11  7:05 ` [Bug libfortran/108056] " kargl at gcc dot gnu.org
2022-12-11  7:44 ` gilles.gouaillardet at gmail dot com [this message]
2022-12-11  7:51 ` gilles.gouaillardet at gmail dot com
2022-12-11  8:44 ` rimvydas.jas at gmail dot com
2022-12-11 13:19 ` [Bug libfortran/108056] [12/13 Regression] " rguenth at gcc dot gnu.org
2022-12-11 18:34 ` kargl at gcc dot gnu.org
2022-12-11 22:15 ` sandra at gcc dot gnu.org
2022-12-11 22:24 ` jakub at gcc dot gnu.org
2022-12-12  8:40 ` jakub at gcc dot gnu.org
2022-12-12  9:07 ` rguenther at suse dot de
2022-12-12  9:10 ` gilles.gouaillardet at gmail dot com
2022-12-12 12:09 ` burnus at gcc dot gnu.org
2022-12-12 12:34 ` rguenther at suse dot de
2022-12-15 11:27 ` cvs-commit at gcc dot gnu.org
2022-12-16  2:47 ` haochen.jiang at intel dot com
2022-12-16  7:48 ` burnus at gcc dot gnu.org
2022-12-16  7:57 ` cvs-commit at gcc dot gnu.org
2022-12-20 17:22 ` jakub at gcc dot gnu.org
2022-12-21  7:13 ` [Bug libfortran/108056] [12 " rguenth at gcc dot gnu.org
2022-12-21  7:23 ` cvs-commit at gcc dot gnu.org
2022-12-21  7:34 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108056-4-9ZvwGWFg0H@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).