| 1 |
! { dg-do run } |
| 2 |
! PR95647 operator(.eq.) and operator(==) treated differently |
| 3 |
program test |
| 4 |
use, intrinsic :: ieee_arithmetic, only : & |
| 5 |
& ieee_class, & |
| 6 |
& ieee_class_type, & |
| 7 |
& ieee_negative_normal, & |
| 8 |
& ieee_positive_normal, & |
| 9 |
& operator(.eq.), operator(.ne.) |
| 10 |
integer :: good |
| 11 |
real(4) r4 |
| 12 |
type(ieee_class_type) class1 |
| 13 |
good = 0 |
| 14 |
r4 = 1.0 |
| 15 |
class1 = ieee_class(r4) |
| 16 |
if (class1 .eq. ieee_positive_normal) good = good + 1 |
| 17 |
if (class1 .ne. ieee_negative_normal) good = good + 1 |
| 18 |
r4 = -1.0 |
| 19 |
class1 = ieee_class(r4) |
| 20 |
if (class1 .eq. ieee_negative_normal) good = good + 1 |
| 21 |
if (class1 .ne. ieee_positive_normal) good = good + 1 |
| 22 |
if (good /= 4) call abort |
| 23 |
end program test |
| 24 |
|