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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.dg/] [g77/] [980701-0.f] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
c { dg-do run }
2
* g77 0.5.23 and previous had bugs involving too little space
3
* allocated for EQUIVALENCE and COMMON areas needing initial
4
* padding to meet alignment requirements of the system.
5
 
6
      call subr
7
      end
8
 
9
      subroutine subr
10
      implicit none
11
 
12
      real r1(5), r2(5), r3(5)
13
      real s1(2), s2(2), s3(2)
14
      double precision d1, d2, d3
15
      integer i1, i2, i3
16
      equivalence (r1, s1(2))
17
      equivalence (d1, r1(2))
18
      equivalence (r2, s2(2))
19
      equivalence (d2, r2(2))
20
      equivalence (r3, s3(2))
21
      equivalence (d3, r3(2))
22
 
23
      s1(1) = 1.
24
      r1(1) = 1.
25
      d1 = 10.
26
      r1(4) = 1.
27
      r1(5) = 1.
28
      i1 = 1
29
      s2(1) = 2.
30
      r2(1) = 2.
31
      d2 = 20.
32
      r2(4) = 2.
33
      r2(5) = 2.
34
      i2 = 2
35
      s3(1) = 3.
36
      r3(1) = 3.
37
      d3 = 30.
38
      r3(4) = 3.
39
      r3(5) = 3.
40
      i3 = 3
41
 
42
      call x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
43
 
44
      end
45
 
46
      subroutine x (s1, r1, d1, i1, s2, r2, d2, i2, s3, r3, d3, i3)
47
      implicit none
48
 
49
      real r1(5), r2(5), r3(5)
50
      real s1(2), s2(2), s3(2)
51
      double precision d1, d2, d3
52
      integer i1, i2, i3
53
 
54
      if (s1(1) .ne. 1.) call abort
55
      if (r1(1) .ne. 1.) call abort
56
      if (d1 .ne. 10.) call abort
57
      if (r1(4) .ne. 1.) call abort
58
      if (r1(5) .ne. 1.) call abort
59
      if (i1 .ne. 1) call abort
60
      if (s2(1) .ne. 2.) call abort
61
      if (r2(1) .ne. 2.) call abort
62
      if (d2 .ne. 20.) call abort
63
      if (r2(4) .ne. 2.) call abort
64
      if (r2(5) .ne. 2.) call abort
65
      if (i2 .ne. 2) call abort
66
      if (s3(1) .ne. 3.) call abort
67
      if (r3(1) .ne. 3.) call abort
68
      if (d3 .ne. 30.) call abort
69
      if (r3(4) .ne. 3.) call abort
70
      if (r3(5) .ne. 3.) call abort
71
      if (i3 .ne. 3) call abort
72
 
73
      end

powered by: WebSVN 2.1.0

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