------- Comment #3 from bdavis at gcc dot gnu dot org 2008-04-29 19:23 ------- this looks promising:
Index: gcc/gcc/fortran/simplify.c =================================================================== --- gcc/gcc/fortran/simplify.c (revision 134801) +++ gcc/gcc/fortran/simplify.c (working copy) @@ -1570,7 +1570,8 @@ int back, len, lensub; int i, j, k, count, index = 0, start; - if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT) + if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT + || b->expr_type != EXPR_CONSTANT) return NULL; if (b != NULL && b->value.logical != 0) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35940