On Tue, Oct 06, 2015 at 07:52:16PM +0200, Mikael Morin wrote:
> 
> Dominique noticed that the test coming with the preceding PR67758 patch 
> [1] was failing if compiled as free form.
> [1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00301.html
> 
> The problem is again an inconsistent state, but this time between the 
> in_common attribute and the common_block pointer.
> So, here is another iteration, hopefully fixing the remaining problems.
> The changes are:
>     - adding a symbol to a common block list in gfc_match_common is 
> delayed after the call to gfc_add_in_common.
>     - gfc_restore_latest_undo_checkpoint is changed to check the 
> common_block pointer directly instead of the in_common attribute.
> Both of these changes fix the testcase independently, but with some 
> regressions, so there is additionally:
>     - gfc_restore_old_symbol is changed to also restore the 
> common-related pointers.  This is done using a new function created to 
> factor the related memory management.
>     - In gfc_restore_last_undo_checkpoint, when a symbol has been 
> removed from the common block linked list, its common_next pointer is 
> cleared.
> 
> Regression tested on x86_64-linux.  OK for trunk?
> 

Hi Mikael,

I think the patch is OK

-- 
Steve

Reply via email to