https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67615
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #3 from kargl at gcc dot gnu.org ---
This patch to resolve.c catches the problem. Watch for
cut-n-paste corruption of tabs.
@@ -10377,12 +10381,11 @@ gfc_resolve_code (gfc_code *code, gfc_na
}
case EXEC_ARITHMETIC_IF:
- if (t
- && code->expr1->ts.type != BT_INTEGER
- && code->expr1->ts.type != BT_REAL)
- gfc_error ("Arithmetic IF statement at %L requires a numeric "
- "expression", &code->expr1->where);
+ if (t && (code->expr1->rank > 0 || !gfc_numeric_ts
(&code->expr1->ts)))
+ gfc_error ("Arithmetic IF statement at %L requires a scalar "
+ "numeric expression", &code->expr1->where);
+
resolve_branch (code->label1, code);
resolve_branch (code->label2, code);
resolve_branch (code->label3, code);
Whoops. Needs for for BT_COMPLEX.