2 * Date: Fri
, 17 Apr
1998 14:12:51 +0200
3 * From
: Jean
-Paul Jeannot
<jeannot@gx
-tech
.fr
>
4 * Organization
: GX Technology France
5 * To: egcs
-bugs@cygnus
.com
6 * Subject
: identified bug in g77 on Alpha
10 * You will find below the assembly code of a simple Fortran routine which
11 * crashes with segmentation fault when storing the first element
12 * in
( jT_f
-hd_T
) = Xsp
13 * whereas everything is fine when commenting this line
.
15 * The assembly code
(generated with
16 * -ffast
-math
-fexpensive
-optimizations
-fomit
-frame
-pointer
-fno
-inline
18 * uses a zapnot instruction
to copy an address
.
19 * BUT the zapnot
parameter is
15 (copuing
4 bytes
) instead of
255 (to copy
22 * I guess this is typically a
64 bit issue
. As
, from my understanding
,
23 * zapnots are used a lot
to copy registers
, this may create problems
26 * Thanks
for your help
30 subroutine simul_trace
( in
, Xsp
, Ysp
, Xrcv
, Yrcv
)
32 c Next declaration added on transfer to gfortran testsuite
33 integer hd_S
, hd_Z
, hd_T
35 common /Idim
/ jT_f
, jT_l
, nT
, nT_dim
36 common /Idim
/ jZ_f
, jZ_l
, nZ
, nZ_dim
37 common /Idim
/ jZ2_f
, jZ2_l
, nZ2
, nZ2_dim
38 common /Idim
/ jzs_f
, jzs_l
, nzs
, nzs_dim
, l_amp
39 common /Idim
/ hd_S
, hd_Z
, hd_T
40 common /Idim
/ nlay
, nlayz
42 common /Idim
/ nb_calls
44 real Xsp
, Ysp
, Xrcv
, Yrcv
45 real in
( jT_f
-hd_T
: jT_l
)
48 in
( jT_f
-hd_T
+ 1 ) = Ysp
49 in
( jT_f
-hd_T
+ 2 ) = Xrcv
50 in
( jT_f
-hd_T
+ 3 ) = Yrcv