------- Comment #10 from roger at eyesopen dot com 2007-04-23 20:54 -------
Many thanks to Paul for fixing this, and my apologies for being overloaded at
work and not being available to investigate it fully myself.
I believe that Paul's fix of explicitly checking expr1->ref->next is the
correct way to determine whether a reference is too complex. My confusion is
that this test should already be being checked/verified in the call to
gfc_full_array_ref_p on the line immediately following his change.
So on line 1124 of dependency.c in gfc_f_a_r_p is the clause
if (ref->next)
return false;
which should be doing exactly the same thing. The reason I mention this
is perhaps GCC is miscompiling itself, and this gfortran failure is the visible
manifestation. Alternatively, perhaps ref->next isn't getting set properly,
or is getting clobbered somehow.
Paul does your new testcase fail without your fix?
My apologies again if I'm missing something obvious.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31620