Re: RFA: MIPS: Fix race condition causing PR 69129

2016-01-21 Thread Nick Clifton

Hi Matthias,


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69129

this fixes the bootstrap errors for me, seen in both libgnat and libgfortran.


Great - I have gone ahead and checked the patch in.

Cheers
  Nick



Re: RFA: MIPS: Fix race condition causing PR 69129

2016-01-20 Thread Matthias Klose

On 19.01.2016 14:52, Nick Clifton wrote:

Hi Catherine, Hi Eric, Hi Matthew,

   GCC PR 69129 reports a problem with the MIPS backend:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69129

   I traced the problem down to a race condition in
   mips_compute_frame_info.  This calls mips_global_pointer, which
   through a torturous chain of inferior calls can end up with
   mips_get_cprestore_base_and_offset trying to use the information in
   the frame structure which has yet to be computed...

   The attached patch fixes the problem by moving the initialisation of
   the global_pointer field in the frame structure to after the args_size
   and hard_frame_pointer_offset fields have been initialised.

   Tested with no regressions on a mipsisa32-elf toolchain.  (I know that
   there are lots of different possible mips configurations.  I was not
   sure which one(s) I should test, so I chose one at random).


this fixes the bootstrap errors for me, seen in both libgnat and libgfortran.