Commit 541eccad by Thomas Preud'homme Committed by Thomas Preud'homme

[testsuite] Fix sibcall-9 & sibcall-10 with -fPIC

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.

2018-10-25  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

gcc/testsuite/
    * gcc.dg/sibcall-9.c: Make v static.
    * gcc.dg/sibcall-10.c: Likewise.

From-SVN: r265482
parent 7852940e
2018-10-25 Thomas Preud'homme <thomas.preudhomme@linaro.org>
* gcc.dg/sibcall-9.c: Make v static.
* gcc.dg/sibcall-10.c: Likewise.
2018-10-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
......
......@@ -31,7 +31,7 @@ extern void exit (int);
static ATTR void recurser_void1 (void);
static ATTR void recurser_void2 (void);
extern void track (void);
volatile int v;
static volatile int v;
int n = 0;
int main ()
......
......@@ -31,7 +31,7 @@ extern void exit (int);
static ATTR void recurser_void1 (int);
static ATTR void recurser_void2 (int);
extern void track (int);
volatile int v;
static volatile int v;
int main ()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment