* trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
for quadruple precision BUILT_IN_SQRT.
* gfortran.dg/norm_4.f90: Rename to...
* gfortran.dg/norm2_4.f90: this.
* gfortran.dg/norm2_5.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226929
138bc75d-0d04-0410-961f-
82ee72b054a4
2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ PR fortran/54656
+ * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
+ for quadruple precision BUILT_IN_SQRT.
+
+2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
* trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
generic BUILT_IN_SIGNBIT.
(conv_intrinsic_ieee_copy_sign): Likewise.
#undef DEFINE_MATH_BUILTIN
#undef DEFINE_MATH_BUILTIN_C
+ /* There is one built-in we defined manually, because it gets called
+ with builtin_decl_for_precision() or builtin_decl_for_float_type()
+ even though it is not an OTHER_BUILTIN: it is SQRT. */
+ quad_decls[BUILT_IN_SQRT] = define_quad_builtin ("sqrtq", func_1, true);
+
}
/* Add GCC builtin functions. */
+2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/54656
+ * gfortran.dg/norm_4.f90: Rename to...
+ * gfortran.dg/norm2_4.f90: this.
+ * gfortran.dg/norm2_5.f90: New test.
+
2015-08-14 Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/guality/pr54200.c: Add -fno-tree-coalesce-vars.
--- /dev/null
+! { dg-do compile }
+!
+! Testcase from PR 54656
+! Checking for NORM2 for large float kinds
+!
+program test
+ implicit none
+
+ ! k1 and k2 will be large real kinds, if supported, and single/double
+ ! otherwise
+ integer, parameter :: k1 = &
+ max(selected_real_kind(precision(0.d0) + 1), kind(0.))
+ integer, parameter :: k2 = &
+ max(selected_real_kind(precision(0._k1) + 1), kind(0.d0))
+
+ real(kind=k1) :: d1(10), z1
+ real(kind=k2) :: d2(10), z2
+ d1 = 1 ; d2 = 1
+ z1 = norm2 (d1)
+ z2 = norm2 (d2)
+
+ print *, z1, z2
+end program test