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: 28 Oct 2008 18:27:06 -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 #10 from mikael dot morin at tele2 dot fr 2008-10-28 18:27 -------
Created an attachment (id=16574)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16574&action=view)
first fix
This patch tries to solve the problem by changing the (2) condition.
It tries to use an ss whose starting value is zero when there is one (In this
case it is that of (/1,1,1/)).
The regression tests pass with both this patch applied and that one
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31610#c21
reverted (ICEing is better than wrong-coding).
I was initially dissatisfied by this patch as it was not changing the beginning
of gfc_trans_create_temp_array, which was leaving room for another case where
the loop would not start at zero. I failed to find such a case though.
However, I believe it is still valuable as it produces a (just a little) better
code (see array indexes) than the other one.
Now I suggest we apply both patches.
Any comments ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37903