From ddf6799888c579fd30789d02f6eda89d54b63340 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sun, 26 Jul 2009 19:25:56 +0200 Subject: re PR fortran/33197 (Fortran 2008: math functions) 2009-07-26 Tobias Burnus PR fortran/33197 * intrinsic.c (make_generic): Remove assert as "atan" can be both ISYM_ATAN and ISYM_ATAN2. (add_functions): Add two-argument variant of ATAN. * intrinsic.h (gfc_check_atan_2): Add check for it. * intrinsic.texi (ATAN2): Correct and enhance description. (ATAN): Describe two-argument variant of ATAN. 2009-07-26 Tobias Burnus PR fortran/33197 * gfortran.dg/atan2_1.f90: New test * gfortran.dg/atan2_2.f90: New test From-SVN: r150100 --- gcc/fortran/check.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/fortran/check.c') diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index e19f812..779af20 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -676,6 +676,19 @@ null_arg: gfc_try +gfc_check_atan_2 (gfc_expr *y, gfc_expr *x) +{ + /* gfc_notify_std would be a wast of time as the return value + is seemingly used only for the generic resolution. The error + will be: Too many arguments. */ + if ((gfc_option.allow_std & GFC_STD_F2008) == 0) + return FAILURE; + + return gfc_check_atan2 (y, x); +} + + +gfc_try gfc_check_atan2 (gfc_expr *y, gfc_expr *x) { if (type_check (y, 0, BT_REAL) == FAILURE) -- cgit v1.1