This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/21912] New: Wrong implied do-loop
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2005 14:29:58 -0000
- Subject: [Bug fortran/21912] New: Wrong implied do-loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat imploop.f90
program main
call foo(5)
end program main
subroutine foo(n)
implicit none
integer :: n, i
real, dimension(5) :: a,b
print *,n
a = (/(i,i=n,1,-1)/)
print *,a
b = (/(i,i=5,1,-1)/)
print *,b
end subroutine foo
$ gfortran imploop.f90
$ ./a.out
5
1.000000 -1.0737444E+09 4.000000 0.000000 1.0741898E+09
5.000000 4.000000 3.000000 2.000000 1.000000
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050523 (experimental)
$
--
Summary: Wrong implied do-loop
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21912