[patch, fortran] PR39239 Warning about EQUIVALENCE and VOLATILE

Nicolas Koenig koenigni@student.ethz.ch
Tue Mar 14 22:54:00 GMT 2017



On 03/14/2017 10:42 PM, Jerry DeLisle wrote:
> On 03/14/2017 01:17 PM, Nicolas Koenig wrote:
>> Hello everyone,
>>
>> a simple patch to throw a warning if not all and not none of the equivalence
>> objects are volatile. (And the according modification of
>> gfortran.dg/volatile11.f90)
>>
>> Nicolas
>>
>> Regression tested for:
>>
>> GNU Fortran (GCC) 7.0.1 20170311 (experimental)
>>
>> Changelog:
>>
>> 2017-03-13  Nicolas Koenig  <koenigni@student.ethz.ch>
>>
>>                  PR fortran/39239
>>                  * resolve.c (resolve_equivalence): Warn if not either none or
>> all equivalence objects are volatile
>>                  * gfortran.dg/volatile11.f90: Changed test to test for the new
>> warning
>>
>>
> Hi Nicolas,
>
> Thanks for starting in on this.
>
> Since this results in a warning, maybe change the wording from 'shall' to should.
>
> I did not dig into the Fortran Standards so I assume it need not be an error.
>
> Also when you submit a patch, please also let us know what platform you
> regression tested on, such as x86-64-linux, or Windows, or similar. (You can get
> the whole string from subdirectory names in build directory. On mine its
> x86_64-pc-linux-gnu) Sometimes we accidentally break things on different
> platforms. so this way we can see it tested ok over here and seems to fail over
> there.
>
> Your patch has changed some of the scan dumps and I am wondering if you have
> deleted something we use to check for?
>
> Jerry
>
Hello Jerry,
I have to thank for the kind feedback.
Attached is a reworked version of the patch with the changes applied. It 
also should  have the same scan dump now, one of the test cases was 
edited stupidly.
The regression tests for both the old as well as the new test have been 
performed on an x86-64-linux (x86_64-pc-linux-gnu).
Nicolas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p8.diff
Type: text/x-patch
Size: 2073 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170314/82857ff6/attachment.bin>


More information about the Gcc-patches mailing list