annotate gcc/testsuite/gfortran.dg/value_2.f90 @ 132:d34655255c78

update gcc-8.2
author mir3636
date Thu, 25 Oct 2018 10:21:07 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-std=f95" }
kono
parents:
diff changeset
3 ! Tests the standard check in the patch for PR29642, which requested the
kono
parents:
diff changeset
4 ! implementation of the F2003 VALUE attribute for gfortran.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
kono
parents:
diff changeset
7 !
kono
parents:
diff changeset
8 program test_value
kono
parents:
diff changeset
9 integer(8) :: i = 42
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 call bar (i)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 if (i /= 42) STOP 1
111
kono
parents:
diff changeset
13 contains
kono
parents:
diff changeset
14 subroutine bar (i)
kono
parents:
diff changeset
15 integer(8) :: i
kono
parents:
diff changeset
16 value :: i ! { dg-error "Fortran 2003: VALUE" }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
17 if (i /= 42) STOP 2
111
kono
parents:
diff changeset
18 i = 99
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
19 if (i /= 99) STOP 3
111
kono
parents:
diff changeset
20 end subroutine bar
kono
parents:
diff changeset
21 end program test_value