view gcc/testsuite/gfortran.dg/contained_equivalence_1.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
! This program tests that equivalence only associates variables in
! the same scope.
!
! provided by Paul Thomas - pault@gcc.gnu.org
!
program contained_equiv
  real a
  a = 1.0
  call foo ()
  if (a.ne.1.0) STOP 1
contains
  subroutine foo ()
    real b
    equivalence (a, b)
    b = 2.0
  end subroutine foo
end program contained_equiv