------- Comment #1 from pault at gcc dot gnu dot org 2010-02-26 07:35 ------- This fixes it and regtests.
Index: gcc/fortran/check.c =================================================================== *** gcc/fortran/check.c (revision 157061) --- gcc/fortran/check.c (working copy) *************** gfc_check_allocated (gfc_expr *array) *** 537,542 **** --- 537,550 ---- if (variable_check (array, 0) == FAILURE) return FAILURE; + if (array->expr_type != EXPR_VARIABLE && array->expr_type != EXPR_FUNCTION) + { + gfc_error ("The argument of '%s' intrinsic at %L is not a variable " + "or function expression", gfc_current_intrinsic, + &array->where); + return FAILURE; + } + attr = gfc_variable_attr (array, NULL); if (!attr.allocatable) { OK for trunk with the usual embellishments of ChangeLogs and testcase? Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-02-26 07:35:26 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43179