2 c { dg-options "-std=legacy" }
4 c Tests the fix for PR32302, in which the resizing of 'aux32' would cause
5 c misalignment for double precision types and a wrong result would be obtained
6 c at any level of optimization except none.
8 c Contributed by Dale Ranta <dir@lanl.gov>
10 subroutine unpki
(ixp
,nwcon
,nmel
)
12 implicit double precision (a
-h
,o
-z
) dp
14 c unpack connection data
16 common/aux32
/kka
(lnv
),kkb
(lnv
),kkc
(lnv
), ! { dg
-warning
"shall be of the same size as elsewhere" }
17 1 kk1
(lnv
),kk2
(lnv
),kk3
(lnv
),dxy
(lnv
),
18 2 dyx
(lnv
),dyz
(lnv
),dzy
(lnv
),dzx
(lnv
),
19 3 dxz
(lnv
),vx17
(lnv
),vx28
(lnv
),vx35
(lnv
),
20 4 vx46
(lnv
),vy17
(lnv
),vy28
(lnv
),
21 5 vy35
(lnv
),vy46
(lnv
),vz17
(lnv
),vz28
(lnv
),vz35
(lnv
),vz46
(lnv
)
22 common/aux33
/ix1
(lnv
),ix2
(lnv
),ix3
(lnv
),ix4
(lnv
),ix5
(lnv
), ! { dg
-warning
"shall be of the same size as elsewhere" }
23 1 ix6
(lnv
),ix7
(lnv
),ix8
(lnv
),mxt
(lnv
)
24 dimension ixp
(nwcon
,*)
30 implicit double precision (a
-h
,o
-z
) dp
32 & x1
(lnv
),x2
(lnv
),x3
(lnv
),x4
(lnv
),
33 & x5
(lnv
),x6
(lnv
),x7
(lnv
),x8
(lnv
),
34 & y1
(lnv
),y2
(lnv
),y3
(lnv
),y4
(lnv
),
35 & y5
(lnv
),y6
(lnv
),y7
(lnv
),y8
(lnv
),
36 & z1
(lnv
),z2
(lnv
),z3
(lnv
),z4
(lnv
),
37 & z5
(lnv
),z6
(lnv
),z7
(lnv
),z8
(lnv
)
38 common/aux9
/vlrho
(lnv
),det
(lnv
)
40 1 px1
(lnv
),px2
(lnv
),px3
(lnv
),px4
(lnv
),
41 & px5
(lnv
),px6
(lnv
),px7
(lnv
),px8
(lnv
),
42 2 py1
(lnv
),py2
(lnv
),py3
(lnv
),py4
(lnv
),
43 & py5
(lnv
),py6
(lnv
),py7
(lnv
),py8
(lnv
),
44 3 pz1
(lnv
),pz2
(lnv
),pz3
(lnv
),pz4
(lnv
),
45 & pz5
(lnv
),pz6
(lnv
),pz7
(lnv
),pz8
(lnv
),
46 4 vx1
(lnv
),vx2
(lnv
),vx3
(lnv
),vx4
(lnv
),
47 5 vx5
(lnv
),vx6
(lnv
),vx7
(lnv
),vx8
(lnv
),
48 6 vy1
(lnv
),vy2
(lnv
),vy3
(lnv
),vy4
(lnv
),
49 7 vy5
(lnv
),vy6
(lnv
),vy7
(lnv
),vy8
(lnv
),
50 8 vz1
(lnv
),vz2
(lnv
),vz3
(lnv
),vz4
(lnv
),
51 9 vz5
(lnv
),vz6
(lnv
),vz7
(lnv
),vz8
(lnv
)
52 ! XFAILed here and below because of PRs
45045 and
45044
53 common/aux32
/ ! { dg
-warning
"shall be of the same size" "" { xfail
*-*-*} }
54 a a17
(lnv
),a28
(lnv
),dett
(lnv
),
55 1 aj1
(lnv
),aj2
(lnv
),aj3
(lnv
),aj4
(lnv
),
56 2 aj5
(lnv
),aj6
(lnv
),aj7
(lnv
),aj8
(lnv
),
57 3 aj9
(lnv
),x17
(lnv
),x28
(lnv
),x35
(lnv
),
58 4 x46
(lnv
),y17
(lnv
),y28
(lnv
),y35
(lnv
),
59 5 y46
(lnv
),z17
(lnv
),z28
(lnv
),z35
(lnv
),z46
(lnv
)
60 common/aux33
/ ! { dg
-warning
"shall be of the same size" "" { xfail
*-*-*} }
61 a ix1
(lnv
),ix2
(lnv
),ix3
(lnv
),ix4
(lnv
),ix5
(lnv
),
62 1 ix6
(lnv
),ix7
(lnv
),ix8
(lnv
),mxt
(lnv
),nmel
64 common/failu
/sieu
(lnv
),failu
(lnv
)
65 common/sand1
/ihf
,ibemf
,ishlf
,itshf
66 dimension aj5968
(lnv
),aj6749
(lnv
),aj4857
(lnv
),aji1
(lnv
),aji2
(lnv
),
67 1 aji3
(lnv
),aji4
(lnv
),aji5
(lnv
),
68 1 aji6
(lnv
),aji7
(lnv
),aji8
(lnv
),aji9
(lnv
),aj12
(lnv
),
69 2 aj45
(lnv
),aj78
(lnv
),b17
(lnv
),b28
(lnv
),c17
(lnv
),c28
(lnv
)
71 equivalence
(x17
,aj5968
),(x28
,aj6749
),(x35
,aj4857
),(x46
,aji1
),
72 1 (y17
,aji2
),(y28
,aji3
),(y35
,aji4
),(y46
,aji5
),(z17
,aji6
),
73 2 (z28
,aji7
),(z35
,aji8
),(z46
,aji9
),(aj1
,aj12
),(aj2
,aj45
),
74 3 (aj3
,aj78
),(px1
,b17
),(px2
,b28
),(px3
,c17
),(px4
,c28
)
93 aj1
(i
)=x17
(i
)+x28
(i
)-x35
(i
)-x46
(i
)
94 aj2
(i
)=y17
(i
)+y28
(i
)-y35
(i
)-y46
(i
)
95 aj3
(i
)=z17
(i
)+z28
(i
)-z35
(i
)-z46
(i
)
101 20 c28
(i
)=z28
(i
)+z35
(i
)
108 30 aj9
(i
)=c17
(i
)-c28
(i
)
113 aj5968
(i
)=aj5
(i
)*aj9
(i
)-aj6
(i
)*aj8
(i
)
114 aj6749
(i
)=aj6
(i
)*aj7
(i
)-aj4
(i
)*aj9
(i
)
115 40 aj4857
(i
)=aj4
(i
)*aj8
(i
)-aj5
(i
)*aj7
(i
)
118 50 det
(i
)=o64th*
(aj1
(i
)*aj5968
(i
)+aj2
(i
)*aj6749
(i
)+aj3
(i
)*aj4857
(i
))
121 det
(i
)=o64th*
(aj1
(i
)*aj5968
(i
)+aj2
(i
)*aj6749
(i
)+aj3
(i
)*aj4857
(i
))
122 1 *failu
(i
) + (1. - failu
(i
))
126 60 dett
(i
)=o64th
/det
(i
)
128 if (det
(lft
) .ne
. 1d0
) call abort
()
129 if (det
(llt
) .ne
. 1d0
) call abort
()
136 implicit double precision (a
-h
,o
-z
) dp
138 & x1
(lnv
),x2
(lnv
),x3
(lnv
),x4
(lnv
),
139 & x5
(lnv
),x6
(lnv
),x7
(lnv
),x8
(lnv
),
140 & y1
(lnv
),y2
(lnv
),y3
(lnv
),y4
(lnv
),
141 & y5
(lnv
),y6
(lnv
),y7
(lnv
),y8
(lnv
),
142 & z1
(lnv
),z2
(lnv
),z3
(lnv
),z4
(lnv
),
143 & z5
(lnv
),z6
(lnv
),z7
(lnv
),z8
(lnv
)
145 common/sand1
/ihf
,ibemf
,ishlf
,itshf