summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warn_conversion_2.f90
blob: c0222983a0fb6932ffdeb1b1674d129c7cb7565f (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do "compile" }
! { dg-options "-Wconversion-extra" }

  real(8) :: sqrt2
  real x

  x = 2.0
  sqrt2 = sqrt(x)      ! { dg-warning "Conversion" }

  sqrt2 = sqrt(2.0)    ! no warning; simplified to a constant and range checked
end