RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / warn_conversion_6.f90
blobe16a62e7f8cfb97417637bc5223dce53a5e795f8
1 ! { dg-do compile }
2 ! { dg-options "-Wconversion -Wconversion-extra" }
3 ! PR 47359 - additional warnings for conversions.
4 program main
5 implicit none
6 real(kind=8) :: a,b
7 complex(kind=8) :: c
8 integer :: i
9 real(kind=4) :: r
10 a = 0.13 ! { dg-warning "Conversion" }
11 print *,0.1_8 ** 0.2 ! { dg-warning "Conversion" }
12 b = a/0.13 ! { dg-warning "Conversion" }
13 i = 12345. ! { dg-warning "Conversion" }
14 i = (1., 23.) ! { dg-warning "Non-zero imaginary part" }
15 r = (1., 23.) ! { dg-warning "Non-zero imaginary part" }
16 b = 0.& ! { dg-warning "Possible change of value" }
17 &5_8*c ! { dg-warning "Conversion" }
18 c = 0.3 ! { dg-warning "Conversion" }
19 a = 0.5 ! { dg-warning "Conversion" }
20 end program main