------- Comment #13 from jvdelisle at gcc dot gnu dot org 2007-12-22 16:28 ------- This is surprising! If I get rid of the hack that was needed before for optional_dim_2.f90 :
Index: iresolve.c =================================================================== --- iresolve.c (revision 131133) +++ iresolve.c (working copy) @@ -590,12 +590,6 @@ gfc_resolve_cshift (gfc_expr *f, gfc_exp if (dim != NULL) { - if (dim->expr_type != EXPR_CONSTANT && dim->symtree->n.sym->attr.optional) - { - /* Mark this for later setting the type in gfc_conv_missing_dummy. */ - dim->representation.length = shift->ts.kind; - } - else { gfc_resolve_dim_arg (dim); /* Convert dim to shift's kind to reduce variations. */ The new case passes (for cshift and I would presume eoshift) and the optional_dim_2.f90 passes and I see no apparent regressions. Still testing. This means something got fixed somewhere else. I also checked this on ppc64-linux with the same result. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34540