public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Fritz Reese <fritzoreese@gmail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
		Jerry DeLisle <jvdelisle@charter.net>,
	Steve Kargl <sgk@troutmask.apl.washington.edu>
Subject: Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec
Date: Wed, 26 Oct 2016 13:50:00 -0000	[thread overview]
Message-ID: <CAE4aFAkg4XZNyhPGzrv_xaYfoQJgH-jXEEg0UFyZwpXb2QTG4A@mail.gmail.com> (raw)
In-Reply-To: <mvmy41bifex.fsf@hawking.suse.de>

On Wed, Oct 26, 2016 at 6:16 AM, Andreas Schwab <schwab@suse.de> wrote:
> On Okt 25 2016, Fritz Reese <fritzoreese@gmail.com> wrote:
>
>>         * dec_bitwise_ops_1.f90, dec_bitwise_ops_2.f90: New testcases.
>
> I'm getting these errors on ia64:
>
> FAIL: gfortran.dg/dec_bitwise_ops_1.f90   -O0  (test for excess errors)
> Excess errors:
> /usr/local/gcc/gcc-20161026/gcc/testsuite/gfortran.dg/dec_bitwise_ops_1.f90:33:16: Error: Can't convert INTEGER(4) to INTEGER(4) at (1)
> /usr/local/gcc/gcc-20161026/gcc/testsuite/gfortran.dg/dec_bitwise_ops_1.f90:34:16: Error: Can't convert INTEGER(4) to INTEGER(4) at (1)
> /usr/local/gcc/gcc-20161026/gcc/testsuite/gfortran.dg/dec_bitwise_ops_1.f90:35:24: Error: Can't convert INTEGER(4) to INTEGER(4) at (1)
...

Andreas,

I can't seem to reproduce this on x86-64. Did you fully apply the
patch? I think this section of code in resolve.c should be guarding
against type to same-type conversions in this case:

>>> resolve.c:3719 (resolve_operator)
      /* Logical ops on integers become bitwise ops with -fdec.  */
      else if (flag_dec
               && (op1->ts.type == BT_INTEGER || op2->ts.type == BT_INTEGER))
        {
          e->ts.type = BT_INTEGER;
          e->ts.kind = gfc_kind_max (op1, op2);
          if (op1->ts.type != e->ts.type || op1->ts.kind != e->ts.kind)
            gfc_convert_type (op1, &e->ts, 1);
          if (op2->ts.type != e->ts.type || op2->ts.kind != e->ts.kind)
            gfc_convert_type (op2, &e->ts, 1);
          e = logical_to_bitwise (e);
          return resolve_function (e);
        }
<<<

---
Fritz Reese

  parent reply	other threads:[~2016-10-26 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 16:24 Fritz Reese
2016-10-25 17:30 ` Jerry DeLisle
2016-10-26 10:16 ` Andreas Schwab
2016-10-26 12:33   ` Fritz Reese
2016-10-26 13:50   ` Fritz Reese [this message]
2016-10-26 14:33     ` Andreas Schwab
2016-10-26 14:48       ` Fritz Reese
2016-10-26 14:50         ` Andreas Schwab
2016-10-27  8:42         ` Andreas Schwab
2016-10-27 11:50           ` Fritz Reese

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=CAE4aFAkg4XZNyhPGzrv_xaYfoQJgH-jXEEg0UFyZwpXb2QTG4A@mail.gmail.com \
    --to=fritzoreese@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jvdelisle@charter.net \
    --cc=schwab@suse.de \
    --cc=sgk@troutmask.apl.washington.edu \
    /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).