summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-06 17:06:54 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-06 17:06:54 +0000
commit36fb17058156550631e423817c444f200c235a07 (patch)
tree0de6d06ee3109c2ff08c4951bcfc68a150f4cb9c /gcc/testsuite/gfortran.dg
parent1b57040b433016b2a96dd0a08cc1bc3fd8eb6174 (diff)
downloadgcc-36fb17058156550631e423817c444f200c235a07.tar.gz
2008-05-06 Tobias Burnus <burnus@net-b.de>
PR fortran/36117 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*. * intrinsic.h: Add prototypes for gfc_simplify_bessel_*. * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1, gfc_simplify_bessel_jn,gfc_simplify_bessel_y0, gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New. 2008-05-06 Tobias Burnus <burnus@net-b.de> PR fortran/36117 * gfortran.dg/bessel_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134988 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r--gcc/testsuite/gfortran.dg/bessel_2.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bessel_2.f90 b/gcc/testsuite/gfortran.dg/bessel_2.f90
new file mode 100644
index 00000000000..3b4c2e2e4ee
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bessel_2.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! PR fortran/36117
+!
+! This program will fail for MPFR < 2.3.0
+!
+! Based on a test by James Van Buskirk.
+!
+program bug3
+ implicit none
+ real, parameter :: Qarg1 = 1.7
+ integer, parameter :: k2 = kind(BESJ0(Qarg1))
+ integer, parameter :: is_int = 1-1/(2+0*BESJ0(Qarg1))*2
+ integer, parameter :: kind_if_real = &
+ (1-is_int)*k2+is_int*kind(1.0)
+ complex :: z = cmplx(0,1,kind_if_real) ! FAILS
+ if (kind_if_real /= kind(Qarg1)) call abort ()
+end program bug3