re PR fortran/54656 (ICE with software REAL(16) for NORM2)
PR fortran/54656 * 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. From-SVN: r226929
This commit is contained in:
parent
c541d5217e
commit
8c07a5f4b4
5 changed files with 41 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -676,6 +676,11 @@ gfc_build_intrinsic_lib_fndecls (void)
|
|||
#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. */
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
23
gcc/testsuite/gfortran.dg/norm2_5.f90
Normal file
23
gcc/testsuite/gfortran.dg/norm2_5.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! { 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
|
Loading…
Add table
Reference in a new issue