From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23736 invoked by alias); 23 Oct 2008 22:32:32 -0000 Received: (qmail 22069 invoked by uid 48); 23 Oct 2008 22:31:15 -0000 Date: Thu, 23 Oct 2008 22:32:00 -0000 Message-ID: <20081023223115.22068.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mikael dot morin at tele2 dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg01553.txt.bz2 ------- 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]==-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