2 ! { dg-options "-Wconversion" }
5 ! PR fortran/27866 -improve -Wconversion
11 r
= d
! { dg-warning "conversion" }
19 i4
= 2.3 ! { dg-warning "conversion" }
20 i1
= 500 ! { dg-error "overflow" }
21 a
= 2**26-1 ! { dg-warning "Change of value in conversion" }
22 b
= 1d999 ! { dg-error "overflow" }
24 a
= i4
! assignment INTEGER(4) to REAL(4) - no warning
25 b
= i4
! assignment INTEGER(4) to REAL(8) - no warning
26 i1
= i4
! { dg-warning "conversion" }
27 a
= b
! { dg-warning "conversion" }
32 ! PR fortran/35003 - spurious warning with -Wconversion
33 ! Contributed by Brian Barnes <bcbarnes AT gmail DOT com>
46 ! PR fortran/42809 - Too much noise with -Wconversion
47 ! Contributed by Harald Anlauf <anlauf AT gmx DOT de>
51 integer, parameter :: sp
= kind (1.0)
52 integer, parameter :: dp
= kind (1.d0
)
57 s
= 0 ! assignment INTEGER(4) to REAL(4) - no warning
58 d
= s
! assignment REAL((8)) to REAL(4) - no warning
59 z
= (0, 1) ! conversion INTEGER(4) to REAL(4),
60 ! assignment COMPLEX(4) to COMPLEX(8) - no warning