]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] Fix sibcall-9 & sibcall-10 with -fPIC
authorThomas Preud'homme <thomas.preudhomme@linaro.org>
Thu, 25 Oct 2018 10:19:49 +0000 (10:19 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Thu, 25 Oct 2018 10:19:49 +0000 (10:19 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/sibcall-10.c
gcc/testsuite/gcc.dg/sibcall-9.c

index 6a50e92905bec3112aa12911121f7a6d223deffa..23b21906534c869a64be3a5bda3d79db9f2e5e9b 100644 (file)
@@ -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
index 54cc604aecf61e675b295604497c24a6418f76ae..4acca50e3e4f18b4d7fce0d199d799ac8a10b1a3 100644 (file)
@@ -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 ()
index fc3bd9dcf1624ce1da2b653ca2583fbe10ede6f1..32b2e1d5d614c95c9da5f26e11b3349c6af850dc 100644 (file)
@@ -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 ()
 {