This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28914] Code inside loop hangs; outside loop runs normally; runs OK on other compilers
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 02:47:50 -0000
- Subject: [Bug fortran/28914] Code inside loop hangs; outside loop runs normally; runs OK on other compilers
- References: <bug-28914-13180@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from kargl at gcc dot gnu dot org 2006-08-31 02:47 -------
Well, you do need to upgrade your compiler, but there appears to be
a bug :(
If n <= 65000, the program works fine. For larger n, the combination
of
do i = 1, 1
a = (/ (i, i = 1, n) /)
end do
i as the do-loop index and i as the implied-do-loop index is
causing problems. Normally, one cannot alter the do-loop
index within the body of the loop. ISTR from the F95 standard,
that the i in the implied-do-loop has the scope of only the
implied-do-loop. Thus, the above code is legal.
Why there is a change in behavior at i = 65000 (or so), I have
no idea.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|0000-00-00 00:00:00 |2006-08-31 02:47:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28914