summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/g77/980519-2.f
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/g77/980519-2.f
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/g77/980519-2.f')
-rw-r--r--gcc/testsuite/gfortran.dg/g77/980519-2.f51
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/g77/980519-2.f b/gcc/testsuite/gfortran.dg/g77/980519-2.f
new file mode 100644
index 000000000..3134a00b5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/980519-2.f
@@ -0,0 +1,51 @@
+c { dg-do compile }
+* Date: Fri, 17 Apr 1998 14:12:51 +0200
+* From: Jean-Paul Jeannot <jeannot@gx-tech.fr>
+* Organization: GX Technology France
+* To: egcs-bugs@cygnus.com
+* Subject: identified bug in g77 on Alpha
+*
+* Dear Sir,
+*
+* You will find below the assembly code of a simple Fortran routine which
+* crashes with segmentation fault when storing the first element
+* in( jT_f-hd_T ) = Xsp
+* whereas everything is fine when commenting this line.
+*
+* The assembly code (generated with
+* -ffast-math -fexpensive-optimizations -fomit-frame-pointer -fno-inline
+* or with -O5)
+* uses a zapnot instruction to copy an address.
+* BUT the zapnot parameter is 15 (copuing 4 bytes) instead of 255 (to copy
+* 8 bytes).
+*
+* I guess this is typically a 64 bit issue. As, from my understanding,
+* zapnots are used a lot to copy registers, this may create problems
+* elsewhere.
+*
+* Thanks for your help
+*
+* Jean-Paul Jeannot
+*
+ subroutine simul_trace( in, Xsp, Ysp, Xrcv, Yrcv )
+
+c Next declaration added on transfer to gfortran testsuite
+ integer hd_S, hd_Z, hd_T
+
+ common /Idim/ jT_f, jT_l, nT, nT_dim
+ common /Idim/ jZ_f, jZ_l, nZ, nZ_dim
+ common /Idim/ jZ2_f, jZ2_l, nZ2, nZ2_dim
+ common /Idim/ jzs_f, jzs_l, nzs, nzs_dim, l_amp
+ common /Idim/ hd_S, hd_Z, hd_T
+ common /Idim/ nlay, nlayz
+ common /Idim/ n_work
+ common /Idim/ nb_calls
+
+ real Xsp, Ysp, Xrcv, Yrcv
+ real in( jT_f-hd_T : jT_l )
+
+ in( jT_f-hd_T ) = Xsp
+ in( jT_f-hd_T + 1 ) = Ysp
+ in( jT_f-hd_T + 2 ) = Xrcv
+ in( jT_f-hd_T + 3 ) = Yrcv
+ end