------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-06-22 
11:41 -------
This can be made to fail on any architecture by increasing
the amount of shifting:

$ cat eoshift-really-fails.f90
program main
  character(len=20) line
  write (line,'(I4)') eoshift((/1, 3/), 1000)
end program main
$ gfortran eoshift-really-fails.f90
$ ./a.out
Segmentation fault
$ gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050618/configure --prefix=/home/zfkts --enable-
languages=c,f95
Thread model: posix
gcc version 4.1.0 20050618 (experimental)

The problem is that the code tries to overwrite more than it should
for shift > len.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21594

Reply via email to