Thanks for the clarification, I managed to reproduce the fail.  The
problem comes from the fact that we do not generate code for a scalar
reduction that is not detected as a scalar reduction with the variable
connection$dim$1$lbound.

In the attached output from debug_loops (3) I selected the region of
code containing both the original loops: loop_3 and loop_4 and the
code generated by graphite with -fgraphite-identity: loop_22, loop_23.

In loop_22 the computation on connection$dim$1$lbound disappears.
I wonder what this variable stands for: it is not used elsewhere in the
debug_loops (3) output of change_bond_length function, and I suspect
that this is a global variable whose value is needed elsewhere outside
the change_bond_length function.

The bug is in the detection of scalar reductions.

Sebastian

Attachment: 2
Description: Binary data

Reply via email to