| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Testcase from PR 54656 |
| 4 |
! Checking for NORM2 for large float kinds |
| 5 |
! |
| 6 |
program test |
| 7 |
implicit none |
| 8 |
|
| 9 |
! k1 and k2 will be large real kinds, if supported, and single/double |
| 10 |
! otherwise |
| 11 |
integer, parameter :: k1 = & |
| 12 |
max(selected_real_kind(precision(0.d0) + 1), kind(0.)) |
| 13 |
integer, parameter :: k2 = & |
| 14 |
max(selected_real_kind(precision(0._k1) + 1), kind(0.d0)) |
| 15 |
|
| 16 |
real(kind=k1) :: d1(10), z1 |
| 17 |
real(kind=k2) :: d2(10), z2 |
| 18 |
d1 = 1 ; d2 = 1 |
| 19 |
z1 = norm2 (d1) |
| 20 |
z2 = norm2 (d2) |
| 21 |
|
| 22 |
print *, z1, z2 |
| 23 |
end program test |