OSDN Git Service

* gcc.c-torture/execute/ieee/rbug.c: Force FP to extended-precision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g77.f-torture / compile / 980519-2.f
1 * Date: Fri, 17 Apr 1998 14:12:51 +0200
2 * From: Jean-Paul Jeannot <jeannot@gx-tech.fr>
3 * Organization: GX Technology France
4 * To: egcs-bugs@cygnus.com
5 * Subject: identified bug in g77 on Alpha
6
7 * Dear Sir,
8
9 * You will find below the assembly code of a simple Fortran routine which
10 * crashes with segmentation fault when storing the first element 
11 *       in( jT_f-hd_T     ) = Xsp
12 * whereas everything is fine when commenting this line.
13
14 * The assembly code (generated with 
15 * -ffast-math -fexpensive-optimizations -fomit-frame-pointer -fno-inline
16 * or with -O5)
17 * uses a zapnot instruction to copy an address.
18 * BUT the zapnot parameter is 15 (copuing 4 bytes) instead of 255 (to copy
19 * 8 bytes). 
20
21 * I guess this is typically a 64 bit issue. As, from my understanding,
22 * zapnots are used a lot to copy registers, this may create problems
23 * elsewhere.
24
25 * Thanks for your help
26
27 * Jean-Paul Jeannot
28
29       subroutine simul_trace( in, Xsp, Ysp, Xrcv, Yrcv )
30
31       common /Idim/ jT_f, jT_l, nT, nT_dim
32       common /Idim/ jZ_f, jZ_l, nZ, nZ_dim
33       common /Idim/ jZ2_f, jZ2_l, nZ2, nZ2_dim
34       common /Idim/ jzs_f, jzs_l, nzs, nzs_dim, l_amp
35       common /Idim/ hd_S, hd_Z, hd_T
36       common /Idim/ nlay, nlayz
37       common /Idim/ n_work
38       common /Idim/ nb_calls
39         
40       real     Xsp, Ysp, Xrcv, Yrcv
41       real     in( jT_f-hd_T : jT_l )
42         
43       in( jT_f-hd_T     ) = Xsp
44       in( jT_f-hd_T + 1 ) = Ysp 
45       in( jT_f-hd_T + 2 ) = Xrcv
46       in( jT_f-hd_T + 3 ) = Yrcv
47       end