Janus, Your patch works as advertised without disturbing my pet bugs. Just a nit pick: the double parentheses in
+ if ((CLASS_DATA (select_type_stack->selector)->attr.dimension
|| CLASS_DATA (select_type_stack->selector)->attr.codimension))
do not seem necessary.
Note for Paul: I had to adjust the patch in order to make it compatible
with the "unlimited polymorphism" patch at
http://gcc.gnu.org/ml/fortran/2012-07/msg00130.html
Dominique
