* check.c (gfc_check_atan2): New function.
* intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
* intrinsic.h (gfc_check_atan2): Add prototype.
From-SVN: r86628
+2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * check.c (gfc_check_atan2): New function.
+ * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
+ * intrinsic.h (gfc_check_atan2): Add prototype.
+
2004-08-25 Richard Henderson <rth@redhat.com>
* arith.c (gfc_validate_kind): Add may_fail argument; abort if
}
+try
+gfc_check_atan2 (gfc_expr * y, gfc_expr * x)
+{
+ if (type_check (y, 0, BT_REAL) == FAILURE)
+ return FAILURE;
+ if (same_type_check (y, 0, x, 1) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
try
gfc_check_btest (gfc_expr * i, gfc_expr * pos)
{
make_generic ("atan", GFC_ISYM_ATAN);
add_sym_2 ("atan2", 1, 1, BT_REAL, dr,
- NULL, gfc_simplify_atan2, gfc_resolve_atan2,
+ gfc_check_atan2, gfc_simplify_atan2, gfc_resolve_atan2,
y, BT_REAL, dr, 0, x, BT_REAL, dr, 0);
add_sym_2 ("datan2", 1, 1, BT_REAL, dd,
try gfc_check_all_any (gfc_expr *, gfc_expr *);
try gfc_check_allocated (gfc_expr *);
try gfc_check_associated (gfc_expr *, gfc_expr *);
+try gfc_check_atan2 (gfc_expr *, gfc_expr *);
try gfc_check_btest (gfc_expr *, gfc_expr *);
try gfc_check_char (gfc_expr *, gfc_expr *);
try gfc_check_cmplx (gfc_expr *, gfc_expr *, gfc_expr *);