summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/warn_conversion_2.f90
blob: d2b4eec6049ca7df8b74f6ecb1da6cdf7d5f8ea2 (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