From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20320 invoked by alias); 26 Apr 2010 20:34:47 -0000 Received: (qmail 20286 invoked by uid 48); 26 Apr 2010 20:34:35 -0000 Date: Mon, 26 Apr 2010 20:34:00 -0000 Message-ID: <20100426203435.20285.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43896] [fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fmartinez at gmv dot com" 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: 2010-04/txt/msg02775.txt.bz2 ------- Comment #7 from fmartinez at gmv dot com 2010-04-26 20:34 ------- Actually both ROTATION_MATRIX_TIMES_VECTOR are pure; the one in m_vector is elemental, therefore pure, and the one in m_rotation_matrix is pure. I have changed the one in m_rotation_matrix to ROTATION_MATRIX_TIMES_ARRAY to remove the names collision and the ICE remains (I guess as expected) I am a bit surprised about the NAG compiler behaviour. > Confirmed with 4.5.0 and 4.6.0. > > At least NAG f95 thinks that the current code is invalid; it writes for the > second file: > > Error: m_vector.f03, line 394: Reference via operator * to impure > ROTATION_MATRIX_TIMES_VECTOR from pure ROTATION_MATRIX_TIMES_VECTOR > which is in the following line: > > ! Compute result > res%x = rot * right%x > > * * * > > The assert fails at gfc_conv_variable for: > sym = expr->symtree->n.sym; > if (se->ss != NULL) > { > /* Check that something hasn't gone horribly wrong. */ > gcc_assert (se->ss != gfc_ss_terminator); > gcc_assert (se->ss->expr == expr); <<<<<<< ICE > > * * * > > My old "4.6.0 20100421 fortran-dev revision 158628" fails with another ICE: > ICE in gfc_build_null_descriptor, at fortran/trans-array.c:373 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43896