| 1 |
c { dg-do compile } |
| 2 |
* Date: Fri, 17 Apr 1998 14:12:51 +0200 |
| 3 |
* From: Jean-Paul Jeannot <[email protected]> |
| 4 |
* Organization: GX Technology France |
| 5 |
* To: [email protected] |
| 6 |
* Subject: identified bug in g77 on Alpha |
| 7 |
* |
| 8 |
* Dear Sir, |
| 9 |
* |
| 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. |
| 14 |
* |
| 15 |
* The assembly code (generated with |
| 16 |
* -ffast-math -fexpensive-optimizations -fomit-frame-pointer -fno-inline |
| 17 |
* or with -O5) |
| 18 |
* uses a zapnot instruction to copy an address. |
| 19 |
* BUT the zapnot parameter is 15 (copuing 4 bytes) instead of 255 (to copy |
| 20 |
* 8 bytes). |
| 21 |
* |
| 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 |
| 24 |
* elsewhere. |
| 25 |
* |
| 26 |
* Thanks for your help |
| 27 |
* |
| 28 |
* Jean-Paul Jeannot |
| 29 |
* |
| 30 |
subroutine simul_trace( in, Xsp, Ysp, Xrcv, Yrcv ) |
| 31 |
|
| 32 |
c Next declaration added on transfer to gfortran testsuite |
| 33 |
integer hd_S, hd_Z, hd_T |
| 34 |
|
| 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 |
| 41 |
common /Idim/ n_work |
| 42 |
common /Idim/ nb_calls |
| 43 |
|
| 44 |
real Xsp, Ysp, Xrcv, Yrcv |
| 45 |
real in( jT_f-hd_T : jT_l ) |
| 46 |
|
| 47 |
in( jT_f-hd_T ) = Xsp |
| 48 |
in( jT_f-hd_T + 1 ) = Ysp |
| 49 |
in( jT_f-hd_T + 2 ) = Xrcv |
| 50 |
in( jT_f-hd_T + 3 ) = Yrcv |
| 51 |
end |