This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] fortran/30207 -- Fix a WHERE and array section problem
Thanks for the review/approval.
> I'm sorry that I took a little bit with this - I was checking out some
> simpler alternatives.... which broke things!
I'm a little curious what other approaches you investigated. After a
little digging, I think I now understand why I thought the front-end
canonicalized "z" and "z(:)" to the same gfc_expr. It turns out that
it's not the front-end that canonicalizes them, but the scalarizer.
So in trans-array.c:gfc_walk_variable_expr I must have come across the
>> case AR_FULL:
>> /* Make sure array is the same as array(:,:), this way
>> we don't need to special case all the time. */
gfortran's dependency analysis needs to run prior to (as well as
during) scalarization, so we're given with the raw expressions
instead of the standardized GFC_SS_SECTIONs.
The good news is that I've another clever use of gfc_full_array_ref_p
which I'll post later today, after bootstrap and regression testing.