Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / value_2.f90
blobdef9c025de2cae7791bbfb1f25892032c145db47
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 ! Tests the standard check in the patch for PR29642, which requested the
4 ! implementation of the F2003 VALUE attribute for gfortran.
6 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
8 program test_value
9 integer(8) :: i = 42
11 call bar (i)
12 if (i /= 42) STOP 1
13 contains
14 subroutine bar (i)
15 integer(8) :: i
16 value :: i ! { dg-error "Fortran 2003: VALUE" }
17 if (i /= 42) STOP 2
18 i = 99
19 if (i /= 99) STOP 3
20 end subroutine bar
21 end program test_value