2 ! { dg-options "-std=f2008" }
4 ! PR fortran/36158 - Transformational BESSEL_JN/YN
5 ! PR fortran/33197 - F2008 math functions
8 ! OK, elemental function:
9 print *, bessel_yn(1, [1.0, 2.0])
10 print *, bessel_yn([1, 2], 2.0)
12 ! Wrong, transformational function:
13 ! Does not pass check.c -- thus regarded as wrong generic function
14 ! and thus rejected with a slightly misleading error message
15 print *, bessel_yn(1, 2, [2.0, 3.0]) ! { dg-error "Too many arguments" }
17 ! Wrong in F2008: Negative argument, ok as GNU extension
18 print *, bessel_yn(-1, 3.0) ! { dg-error "Extension: Negative argument N " }
20 ! Wrong in F2008: Negative argument -- and no need for a GNU extension
21 ! Does not pass check.c -- thus regarded as wrong generic function
22 ! and thus rejected with a slightly misleading error message
23 print *, bessel_yn(-1, 2, 3.0) ! { dg-error "Too many arguments" }