This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR31217 - ICE using FORALL on character substrings
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Tobias Burnus" <burnus at net-b dot de>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, "gcc-patches List" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Oct 2007 15:17:28 +0200
- Subject: Re: [Patch, fortran] PR31217 - ICE using FORALL on character substrings
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=0k9cpuOk/kjGdVg/Vx7giBN/CGez0nQiLUBzyj+HbGk=; b=HkaAcU3fZh6/Ib0nkmePTo13MEqNKMt5eYYe6elRQsrxLr7LcisPfJ1dVWoJQCazUKhL4jmYhojrnx5J1G2k1GidBgxI4OT3V2SsQyU5dWho+rjNRdK3ChILHWsO++8ZdfvV5nOXxOJfEeGBOnrFFtbD/BqwCYdJGg+vNDdB41w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cn7Cv34Qd9ieUMC+qMg4nSwb5sQmACHilw+9xrBI6+9KJKtM6Am0V5kM927r4E9R5QKUJObATJKw9e0WoZv6C23PXcA0hC1jsQK46tA10LabOa5Yt8qljRAA92Z9RpnzvAkd7hnmEgOra2BqHJNLQNJ0Qv9s+Xt1EV5dFg2hYKY=
- References: <339c37f20710180744yeaf6309u9060bf46b67a3ffd@mail.gmail.com> <4717864F.2040908@net-b.de> <339c37f20710180933r59df33d7h9788e724ae7836fe@mail.gmail.com> <339c37f20710181233m12da3046h6d0cbac7f0e0bd69@mail.gmail.com> <4717CE3E.5030201@net-b.de>
Tobias,
> I stuggle a bit with
>
> ! return ((fin_dep >= GFC_DEP_OVERLAP)
> ! && (fin_dep != GFC_DEP_ERROR)) ? 1 : 0;
>
>
> I expected "<=" instead of ">=", after I looking at
I looked at line 1250
/* Exactly matching and forward overlapping ranges don't cause a dependency. */
if (fin_dep < GFC_DEP_OVERLAP)
return 0;
and inverted it without thinking.
> typedef enum
> {
> GFC_DEP_ERROR,
> GFC_DEP_EQUAL, /* Identical Ranges. */
> GFC_DEP_FORWARD, /* eg. a(1:3), a(2:4). */
> GFC_DEP_OVERLAP, /* May overlap in some other way. */
> GFC_DEP_NODEP /* Distinct ranges. */
> }
I think that it needs to be simply:
return (fin_dep == GFC_DEP_OVERLAP) ? 1 : 0; Does it not?
> Thus: If you think it helps to commit this patch before fixing
> Dominique's problem, you may do so if you change ">=" into "<=".
> Otherwise, I'm awaiting the next patch.
I'm thinking about it whilst doing the daytime thing.
>
> (w/o the patch, Dominique's test gives an ICE, which might be regarded
> better than wrong code.)
At very least a warning would be in order but I am, as I say, looking
for a fix. The worst of it is that this propogates into arrays with
such substrings too....
Cheers
Paul