------- 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