PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / bessel_4.f90
blob7da1bf9aa17d0cdb4fd518b00d65a1f86f9382b1
1 ! { dg-do compile }
2 ! { dg-options "-std=f2008" }
4 ! PR fortran/36158 - Transformational BESSEL_JN/YN
5 ! PR fortran/33197 - F2008 math functions
7 implicit none
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" }
24 end