[PATCH, Fortran] Fix Automatics in equivalence test cases was Re: Automatics in Equivalences failures
Mark Eggleston
mark.eggleston@codethink.co.uk
Wed Oct 2 13:37:00 GMT 2019
Please find attached a patch to replace the test cases for "Automatic in
equivalence".
ChangeLog:
   Mark Eggleston <mark.eggleston@codethink.com>
   * gfortran.dg/auto_in_equiv_1.f90: Deleted.
   * gfortran.dg/auto_in_equiv_2.f90: Deleted.
   * gfortran.dg/auto_in_equiv_3.f90: Deleted.
   * gfortran.dg/automatics_in_equivalence_1.f90: New test.
   * gfortran.dg/automatics_in_equivalence_2.f90: New test.
OK to commit?
regards,
Mark
On 30/09/2019 13:18, Mark Eggleston wrote:
>
> On 30/09/2019 10:06, Mark Eggleston wrote:
>> Thanks to Tobias Burnius for fixing the dg directives in test cases.
>>
>> Now that the test cases for "Automatics in equivalence" (svn revision
>> 274565) are actually being run, test failures are occurring.
>>
>> I've investigated the test failures for auto-in-equiv_3.f90:
>>
>> - -O1, -O2, -O3 and -Os fail
>> - -O1 fails because the check of address fails due to a 40 byte
>> difference in location of the stack
>> - -O2, -O3 and -Os fail due the evaluation of an .and. operation
>> returning .false. when both operands are .true..
>>
>> The test case could be better and should probably be replaced with a
>> better one.
>>
>> I've discovered that -finit-local-zero doesn't work if the local
>> variable is in an equivalence statement where at least one the
>> variables has an AUTOMATIC attribute.
> On further investigation I find that local variables are not
> initialised if the EQUIVALENCE attribute is set
> (build_default_init_expr). So this is expected behaviour. So back to
> the drawing board for a suitable test case.
>>
>> What is the best way of dealing with this? Reverting the commit and
>> resubmitting a corrected patch when it's been fixed?
>>
>> regards,
>>
>> Mark
>>
>>
--
https://www.codethink.co.uk/privacy.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Replace-test-cases-for-Automatics-in-equivalence.patch
Type: text/x-patch
Size: 7399 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191002/5c13a764/attachment.bin>
More information about the Gcc-patches
mailing list