public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Thomas <paulthomas2@wanadoo.fr>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: "'fortran@gcc.gnu.org'" <fortran@gcc.gnu.org>,
		patch <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran]
Date: Sun, 25 Jun 2006 07:09:00 -0000	[thread overview]
Message-ID: <449E11B2.3070400@wanadoo.fr> (raw)
In-Reply-To: <20060624153211.GA58005@troutmask.apl.washington.edu>

Steve Kargl wrote:

> + if (type == BT_LOGICAL && cp->low->expr_type == EXPR_CONSTANT)
> + {
> + if (cp->low->value.logical & seen_logical)
>
> Do you want & or && here?

The arithmetic and was intentional. However, I realised in replying to 
you that the first operand is incorrect; the patch only fixes repeated 
.TRUE.!

This is what I will submit:
if (type == BT_LOGICAL && cp->low->expr_type == EXPR_CONSTANT)
{
int value;
value = cp->low->value.logical == 0 ? 2 : 1;
if (value & seen_logical)
{
gfc_error ("constant logical value in CASE statement "
"is repeated at %L",
&cp->low->where);
t = FAILURE;
break;
}
seen_logical |= value;
}

>
> Otherwise, the patch is OK.

Many thanks for this and the review of the FORALL patch.

Paul

  reply	other threads:[~2006-06-25  4:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23 17:16 Paul Thomas
2006-06-23 17:49 ` [Patch, fortran] PR25056, PR27554, PR25073, PR20874 & PR20867 Paul Thomas
2006-06-24 15:35 ` [Patch, fortran] Steve Kargl
2006-06-25  7:09   ` Paul Thomas [this message]
2011-06-05 21:00 [patch, fortran] Thomas Koenig
2014-04-08 12:04 [PATCH, FORTRAN] Bernd Edlinger
2014-09-08 21:23 [PATCH, Fortran] Alessandro Fanfarillo
     [not found] ` <540E2489.2030403@net-b.de>
2014-09-08 22:13   ` Alessandro Fanfarillo
2016-07-14 17:47 [patch, fortran] 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=449E11B2.3070400@wanadoo.fr \
    --to=paulthomas2@wanadoo.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --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).