public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Harris Snyder <hsnyder@structura.bio>
Cc: <fortran@gcc.gnu.org>
Subject: Re: Possible bug re: ISO_Fortran_binding.h
Date: Mon, 11 Jan 2021 17:21:14 +0100	[thread overview]
Message-ID: <9d207d0d-5ee9-5578-78fa-dc94373ab80e@codesourcery.com> (raw)
In-Reply-To: <CAFWzjBLp6uQ6WtXhwJ-DihiZPmwvxofbjoF7=sDcGCDzVkkUdg@mail.gmail.com>

Hi Harris,

On 11.01.21 16:42, Harris Snyder wrote:
> As for the site of the issue,
> libgfortran/runtime/ISO_Fortran_binding.c, circa line 348:
>
>    if (type == CFI_type_char || type == CFI_type_ucs4_char ||
>        type == CFI_type_signed_char || type == CFI_type_struct ||
>        type == CFI_type_other)
>      dv->elem_len = elem_len;
> [...]
> So we're clearly using elem_len for signed char types and therefore
> int8_t. In light of your comments above about how signed char is
> supposed to be an integer type, what about simply removing
> CFI_type_signed_char from the alternates in the if statement?
Seems as if you found the fix for issue yourself.

I added a link to this thread to https://gcc.gnu.org/PR93524

Thanks for the testcase and digging.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter

  reply	other threads:[~2021-01-11 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 22:17 Harris Snyder
2021-01-11 11:24 ` Tobias Burnus
2021-01-11 15:42   ` Harris Snyder
2021-01-11 16:21     ` Tobias Burnus [this message]
2021-01-11 18:18       ` Harris Snyder
2021-01-12 14:30         ` Tobias Burnus
2021-01-12 19:20         ` [PATCH, Fortran] Bug fix in ISO_Fortran_binding - unsigned char arrays Harris Snyder
2021-01-13  6:34           ` Harris Snyder
2021-01-13 16:02             ` [PATCH, Fortran] PR fortran/93524 - ISO_Fortran_binding signed " Harris Snyder
2021-01-14  3:42               ` Jerry DeLisle

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=9d207d0d-5ee9-5578-78fa-dc94373ab80e@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=hsnyder@structura.bio \
    /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).