PR fortran/45380
* frontend-passes.c (optimize_equality): Don't optimize array equality
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163484
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/45380
+ * frontend-passes.c (optimize_equality): Don't optimize array equality
+
2010-08-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/45366
return true;
}
+ /* An expression of type EXPR_CONSTANT is only valid for scalars. */
+ /* TODO: A scalar constant may be acceptable in some cases (the scalarizer
+ handles them well). However, there are also cases that need a non-scalar
+ argument. For example the any intrinsic. See PR 45380. */
+ if (e->rank > 0)
+ return false;
+
/* Check for direct comparison between identical variables. Don't compare
REAL or COMPLEX because of NaN checks. */
if (op1->expr_type == EXPR_VARIABLE