public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/96859] Wrong answer with intrinsic merge_bits
Date: Tue, 01 Sep 2020 13:10:16 +0000	[thread overview]
Message-ID: <bug-96859-4-EJJkLnUR9d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96859-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Untested fix:
--- gcc/fortran/check.c.jj      2020-08-24 10:00:01.424256990 +0200
+++ gcc/fortran/check.c 2020-09-01 15:06:45.428938642 +0200
@@ -429,9 +429,9 @@ gfc_boz2int (gfc_expr *x, int kind)
       /* Clear first two bits.  */
       else
        {
-         if (buf[0] == '4' || buf[0] == '6')
+         if (buf[0] == '2' || buf[0] == '4' || buf[0] == '6')
            buf[0] = '0';
-         else if (buf[0] == '5' || buf[0] == '7')
+         else if (buf[0] == '3' || buf[0] == '5' || buf[0] == '7')
            buf[0] = '1';
        }
     }

  parent reply	other threads:[~2020-09-01 13:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31  6:31 [Bug fortran/96859] New: " zhen.xu@compiler-dev.com
2020-08-31  9:53 ` [Bug fortran/96859] " dominiq at lps dot ens.fr
2020-08-31 16:30 ` kargl at gcc dot gnu.org
2020-09-01 12:17 ` zhen.xu@compiler-dev.com
2020-09-01 12:22 ` zhen.xu@compiler-dev.com
2020-09-01 12:52 ` jakub at gcc dot gnu.org
2020-09-01 13:10 ` jakub at gcc dot gnu.org [this message]
2020-09-01 13:30 ` jakub at gcc dot gnu.org
2020-09-01 15:02 ` sgk at troutmask dot apl.washington.edu
2020-09-01 15:20 ` jakub at gcc dot gnu.org
2020-09-01 15:54 ` sgk at troutmask dot apl.washington.edu
2020-09-02 10:19 ` cvs-commit at gcc dot gnu.org
2020-09-11  7:47 ` cvs-commit at gcc dot gnu.org
2021-03-26 18:43 ` anlauf at gcc dot gnu.org
2021-05-31 17:23 ` dominiq at lps dot ens.fr
2021-09-17  6:40 ` pinskia 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-96859-4-EJJkLnUR9d@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).