2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr39666-2.f90
blob720a716ae3153ff52944513cea4b7b4b8ab41cea
1 ! PR middle-end/39666
2 ! { dg-do compile }
3 ! { dg-options "-O2 -Wuninitialized" }
5 FUNCTION f(n) ! { dg-warning "may be used uninitialized" }
6 INTEGER, INTENT(in) :: n
7 REAL :: f
9 SELECT CASE (n)
10 CASE (:-1); f = -1.0
11 CASE (0); f = 0.0
12 CASE (2:); f = 1.0
13 END SELECT
14 END FUNCTION