2016-01-15 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr67939.f90
blobd1694bb043324893017ef344dd4424237ac27c85
1 ! { dg-do compile }
2 ! PR fortran/67939
3 ! Original code by Gerhard Steinmetz
4 ! gerhard dot steinmetz dot fortran at t-online dot de
6 program p
7 character(100) :: x
8 data x(998:99) /'ab'/ ! { dg-warning "Unused initialization string" }
9 call a
10 end
12 subroutine a
13 character(2) :: x
14 data x(:-1) /'ab'/ ! { dg-warning "Unused initialization string" }
15 end subroutine a
17 subroutine b
18 character(8) :: x
19 data x(3:1) /'abc'/ ! { dg-warning "Unused initialization string" }
20 end subroutine b