This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran testsuite, committed] Re: gfortran.dg/forall_1.f90
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: Andreas Jaeger <aj at suse dot de>, fortran at gcc dot gnu dot org,patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 05 Jun 2005 21:12:23 +0200
- Subject: Re: [gfortran testsuite, committed] Re: gfortran.dg/forall_1.f90
- References: <m33brxys7i.fsf@gromit.moeb> <42A34AF5.8020904@physik.uni-muenchen.de> <42A34C56.5010205@gmail.com>
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