aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@linaro.org>2018-10-25 10:19:49 +0000
committerThomas Preud'homme <thomas.preudhomme@linaro.org>2018-10-25 10:19:49 +0000
commitd11f776df1b81d4add8cf8a79d840a9bc88f00e1 (patch)
tree2af6730900abf22c291c54691070c865ef1294c8
parentdf2e23cb20d086f967ef75c8d428d9fc4d6339d0 (diff)
[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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@265482 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-10.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-9.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6a50e92905b..23b21906534 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/gcc/testsuite/gcc.dg/sibcall-10.c b/gcc/testsuite/gcc.dg/sibcall-10.c
index 54cc604aecf..4acca50e3e4 100644
--- a/gcc/testsuite/gcc.dg/sibcall-10.c
+++ b/gcc/testsuite/gcc.dg/sibcall-10.c
@@ -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 ()
diff --git a/gcc/testsuite/gcc.dg/sibcall-9.c b/gcc/testsuite/gcc.dg/sibcall-9.c
index fc3bd9dcf16..32b2e1d5d61 100644
--- a/gcc/testsuite/gcc.dg/sibcall-9.c
+++ b/gcc/testsuite/gcc.dg/sibcall-9.c
@@ -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 ()
{