summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/eoshift.f90
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-30 20:51:39 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-30 20:51:39 +0000
commit077620f061371c3cb3b692441313cddb600dfc7a (patch)
treef70607dd292f60d2f1f11a474ace6c3d9490898c /gcc/testsuite/gfortran.dg/eoshift.f90
parent2f4609309fa969beb3c64f1b404d55301a579343 (diff)
downloadgcc-077620f061371c3cb3b692441313cddb600dfc7a.tar.gz
2005-04-30 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18958 libgfortran.h: Change typedef of index_type from size_t to ssize_t. 2005-04-30 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/18958 * gfortran.dg/eoshift.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99047 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/eoshift.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/eoshift.f906
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/eoshift.f90 b/gcc/testsuite/gfortran.dg/eoshift.f90
new file mode 100644
index 00000000000..bb1cba4712d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/eoshift.f90
@@ -0,0 +1,6 @@
+! { dg-do run }
+! PR 18958: We used to segfault for eoshifting off the end of an array.
+program main
+ character(len=20) line
+ write (line,'(I4)') eoshift((/1, 3/), 3)
+end program main