This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR fortran/19269 (partial fix): Lengths of reshaped arrays
Richard Sandiford wrote:
>>Is this an extension we provide that I've forgotten about?
>
>
> Unknown, but resolve_character_array_descriptor certainly goes
> out of its way to choose the maximum length, so I assumed it
> was supported.
(I assume you meant resolve_character_array_constructor, I can't seem to find
the function you're quoting, and the name looks fairly nonsensical: resolve ->
frontend, descriptor -> code generation.) For PARAMETERs the characters may
have different length, and this function only determines the maximum length in
the constant case, at least if this comment is correct:
/* Find the maximum length of the elements. Do nothing for variable array
constructor. */
> I hadn't expected the testcase to be so controversial though. ;)
> The varying lengths isn't anything to do with the bug. It's just
> something I threw in for emphasis. If (despite the maximum code
> in resolve_character_array_descriptor) you really don't want to
> support this, then would the patch be OK with a testcase that tests
> for equal-length elements?
I don't think it is an extension that we want.
- Tobi