This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts
- From: "mikael dot morin at tele2 dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2008 22:31:15 -0000
- Subject: [Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts
- References: <bug-37903-14266@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from mikael dot morin at tele2 dot fr 2008-10-23 22:31 -------
There is this comment at the beginning of gfc_trans_create_temp_array.
/* TODO: Investigate why "if (n < loop->temp_dim)
gcc_assert (integer_zerop (loop->from[n]));" fails here. */
This is the case here: n=0, loop->temp_dim=1, loop.from[0]=<lbound(i)>=-1
I don't understand the use of the (n >= loop->temp_dim) condition preventing
the loop bounds from being moved (to be zero-based).
The problem arises farther in the function, when gfc_index_zero_node is used
instead of loop.from, and only the (wrong) loop.to is taken into account.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37903