------- Comment #5 from pault at gcc dot gnu dot org  2009-02-03 08:55 -------
(In reply to comment #4)

I would have said that the value of the integer component after the first
assignment is, at best, ill-defined. If L_TO_T assigns a value to it, gfortran
gives the same result as any other compiler.

> >> For what it's worth, the test case compiles
> >> successfully with a different compiler.  The larger program compiles with
> >> several other compilers.
> > And it compiles with gfortran too ;).

Indeed, all this is so.  Regardless of the legality of the testcase, this
highlights that gfortran is being too conservative in its dependency analysis
and is using a temporary in the WHERE assignements unnecessarily.  There is an
error of logic in gfc_dep_resolver that I haven't quite caught yet.  It has all
the hooks needed to detect that implicit and explicit full arrays are the same
but it is not working (remove the rhs array reference from the first assignment
and gfortran gets the "right" result).

Cheers

Paul

PS I might as well take it!


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-01-18 20:40:05         |2009-02-03 08:55:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38863

Reply via email to