This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/21594] FAIL: gfortran.dg/eoshift.f90 -O0 execution test


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]