------- Comment #3 from pault at gcc dot gnu dot org 2007-03-30 00:34 ------- This fixes it and regtests OK
Paul Index: gcc/fortran/check.c =================================================================== *** gcc/fortran/check.c (revision 123183) --- gcc/fortran/check.c (working copy) *************** numeric_check (gfc_expr *e, int n) *** 58,63 **** --- 58,75 ---- if (gfc_numeric_ts (&e->ts)) return SUCCESS; + /* If the expression has not got a type, check if its namespace can + offer a default type. */ + if ((e->expr_type == EXPR_VARIABLE || e->expr_type == EXPR_VARIABLE) + && e->symtree->n.sym->ts.type == BT_UNKNOWN + && gfc_set_default_type (e->symtree->n.sym, 0, + e->symtree->n.sym->ns) == SUCCESS + && gfc_numeric_ts (&e->symtree->n.sym->ts)) + { + e->ts = e->symtree->n.sym->ts; + return SUCCESS; + } + gfc_error ("'%s' argument of '%s' intrinsic at %L must be a numeric type", gfc_current_intrinsic_arg[n], gfc_current_intrinsic, &e->where); -- 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|NEW |ASSIGNED Last reconfirmed|2007-03-16 15:06:50 |2007-03-30 00:34:40 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31222