Since Richard Henderson and Zack seem to think it's best, why don't you
just create new tree nodes for these variable-length cases? That seems
to be the consensus point of view on how to solve the problem.
Except that the authors of the optimizers haven't weighed in here yet
and they were very much against adding new nodes to GIMPLE, which is
what this would be doing. Having played with some of that code, I can
tell you that it won't be pleasant to add all the extra cases to
deal with the additional nodes.
Also, I'm told that over on IRC, the Fortran folks have ideas about
what to do with some of the new fields.
I think the memory cost argument in GIMPLE is very weak: only a very
tiny fraction of GIMPLE nodes are ARRAY_REF and COMPONENT_REF.
Your arguments about trees that are permanently kept around at the
GENERIC level seems a far stronger argument and that's why I was thinking
about having a different node for front-end use that corresponds to
the shorter form.