On 10/23/18 7:30 AM, Thomas Preudhomme wrote: > Hi, > > gcc.dg/sibcall-9.c and gcc.dg/sibcall-10.c give execution failure > on ARM when compiled with -fPIC due to the PIC access to volatile > variable v creating an extra spill which causes the frame size of the > two recursive functions to be different. Making the variable static > solve the issue because the variable can be access in a PC-relative way > and avoid the spill, while still testing sibling call as originally > intended. > > ChangeLog entry is as follows: > > *** gcc/testsuite/ChangeLog *** > > * gcc.dg/sibcall-9.c: Make v static. > * gcc.dg/sibcall-10.c: Likewise. > > Tested both testcase with and without -fPIC and it now passes in both > case when targeting arm-none-eabi. It also passes in both cases on > x86_64-linux-gnu. > > Is this ok for trunk? OK.
Jeff