[Bug fortran/24168] Problems with SPREAD and/or scalarization
paul dot richard dot thomas at cea dot fr
gcc-bugzilla@gcc.gnu.org
Fri May 12 09:24:00 GMT 2006
------- Comment #1 from paul dot richard dot thomas at cea dot fr 2006-05-12 09:23 -------
I find this to be "surprising":
$ cat pr24168.f90;rm a.exe;/irun/bin/gfortran -fdump-tree-original pr24168.f90;
./a
program bug
implicit none
integer, parameter :: nx=2,ny=2
real, dimension(nx,ny) :: f
real, dimension(nx) :: x
integer, dimension(nx) :: p
integer :: i
x = real ((/ (i, i = 1, nx) /))
print '(A,2F4.1)', "x = ", x
print '(A,2F4.1)', "cshift( x, nx/2) * 2 = ",cshift( x, nx/2) * 2
print '(A,4F4.1)', "spread(cshift( x, nx/2) * 2, 2, ny) = ", spread(cshift( x,
nx/2) * 2, 2, ny)
end program bug
x = 1.0 2.0
cshift( x, nx/2) * 2 = 4.0 2.0
spread(cshift( x, nx/2) * 2, 2, ny) = 4.0 4.0 4.0 4.0
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24168
More information about the Gcc-bugs
mailing list