[Patch, fortran] PR31217 - ICE using FORALL on character substrings
Paul Richard Thomas
paul.richard.thomas@gmail.com
Fri Oct 19 13:17:00 GMT 2007
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
More information about the Fortran
mailing list