OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [module_equivalence_1.f90] - Blame information for rev 581

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! This tests the fix for PR17917, where equivalences were not being
3
! written to and read back from modules.
4
!
5
! Contributed by Paul Thomas  pault@gcc.gnu.org
6
!
7
module test_equiv !Bug 17917
8
  common /my_common/ d
9
  real    a(2),b(4),c(4), d(8)
10
  equivalence (a(1),b(2)), (c(1),d(5))
11
end module test_equiv
12
 
13
subroutine foo ()
14
  use test_equiv, z=>b
15
  if (any (d(5:8)/=z)) call abort ()
16
end subroutine foo
17
 
18
program module_equiv
19
  use test_equiv
20
  b = 99.0_4
21
  a = 999.0_4
22
  c = (/99.0_4, 999.0_4, 999.0_4, 99.0_4/)
23
  call foo ()
24
end program module_equiv
25
 
26
! { dg-final { cleanup-modules "test_equiv" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.