Yuao Ma wrote:
        PR113152

If you run your patch through

./contrib/gcc-changelog/git_email.py 
0001-fortran-add-constant-input-support-for-trig-function.patch

you will notice that the PR is not recognized. The format as mentioned before is "PR 
component/number". Namely:

"PR fortran/113152"

gcc/fortran/ChangeLog:

        * gfortran.h (enum gfc_isym_id): Add new enum.
        * intrinsic.cc (add_functions): Register new intrinsics. Reformatted 
certain
        lines that utilize gfc_resolve_trig{2}.

The second part is not what you are doing, you are actually changing the call from gfc_resolve_trigd{,2} to gfc_resolve_trig{,2}.


+ gfc_error ("If first argument of ATAN2PI at %L is zero, then the " + "second argument must not be zero", + &y->where);

I am a non-native speaker, but I think there is a "the" missing before "first".

-! Former ICE when simplifying asind, plus wrong function name in error message -real, parameter :: d = asind(1.1) ! { dg-error "Argument of ASIND at.*must be between -1 and 1" } -print *, d +real, parameter :: dacos = acosd(1.1) ! { dg-error "Argument of ACOSD at" }

BTW: If you have '(1)', you need to escape it with '\\(1\\)' or as the (...) don't matter, just use '.1.' as pattern. For '[...]' you need to make sure that [...] is not read as pattern range (such as '[a-z]'), i.e. use '\\\[-1, 1\\\]' (albeit it also works with only two \\).

* * *

+! { dg-options "-std=f2018" }
+! { dg-do compile }
+
+real, parameter :: piacos = acospi(0.0) ! { dg-error "Function 'acospi' in 
initialization expression at" }
+print *, piacos

BTW: You could also use "intrinsic :: acospi" - which tells the compiler that the function is supposed to be an intrinsic.

Otherwise, it looks also good to me.

Tobias

Reply via email to