This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran testsuite, committed] Re: gfortran.dg/forall_1.f90


FX Coudert wrote:
>>The test made the assumption that
>>  if (i /= 0) i = 0
>>means that even if i is uninitialized in the beginning it will be zero
>>afterwards.
> 
> 
> Isn't this true? I think that if optimization doesn't respect that, it 
> is a problem, isn't it?

That's what I thought when I wrote the testcase.  But then it occured to me
that the optimizers could assume that since i is undefined, i /= 0 is
undefined, and hence the compiler could probably validly assume that the
assignment will never be executed.  I don't know if that's what happened.
We'll see once you've run your various testers again.

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]