------- Comment #33 from =?ISO-8859-1?Q?Tobias_Schl=FCter?=
 <tobias dot schlueter at physik dot uni-muenchen dot de>  2009-08-15 10:17 
-------
Subject: Re:  Invariant DO loop variables and subroutines

jv244 at cam dot ac dot uk wrote:
> ------- Comment #32 from jv244 at cam dot ac dot uk  2009-08-15 10:05 -------
> (In reply to comment #29)
> 
>> It's the other way around:  If output were to modify any of its
>> arguments, the program would be illegal.  Therefore, the compiler can
>> assume that this doesn't happen.  Intent(in) would be redundant for this
>> particular case (though useful, so the compiler could easier detect
>> errors).
> that's true for pX, but value can be modified by output. I.e. this is (afaict)
> valid fortran that write the numbers from 1 to 10
> n=10
> DO i=1,n
> n=0
> write(6,*)i
> ENDDO

Actually, we're buggy there, and my patch fixes it.  I'm just now trying 
out testcases.


-- 


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

  • ... tkoenig at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... jv244 at cam dot ac dot uk
  • ... jv244 at cam dot ac dot uk
  • ... tkoenig at gcc dot gnu dot org
  • ... tkoenig at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... jv244 at cam dot ac dot uk
  • ... Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
  • ... tkoenig at gcc dot gnu dot org
  • ... Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
  • ... tobi at gcc dot gnu dot org
  • ... tkoenig at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org
  • ... tobi at gcc dot gnu dot org

Reply via email to