PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / warn_conversion_4.f90
blob3d1b12582b3e8188831c571278e5dfc9d17b5808
1 ! { dg-do compile }
2 ! { dg-options "-Wconversion" }
4 ! PR fortran/54234
7 module fft_mod
8 implicit none
9 integer, parameter :: dp=kind(0.0d0)
10 contains
11 subroutine test
12 integer :: x
13 x = int (abs (cmplx(2.3,0.1)))
14 x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
15 x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
16 x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
17 end subroutine test
18 end module fft_mod