This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH TESTSUITE]: Fix gcc.target/arm/sibcall-1.c for -fpic/-fPIC passes


Testresults on arm (on all branches) shows that when adding -fpic/-fPIC
passes, we get additional errors from gcc.target/arm/sibcall-1.c.  E.g.
http://gcc.gnu.org/ml/gcc-testresults/2010-03/msg00952.html

The test is looking for an assembler pattern that matches "\tb\tfunc2\n".
With -fpic/-fPIC we get "\tb\tfunc2(PLT)\n".  I fixed it similar to what
long-calls-3.c does, which is to add "(PLT)" as an optional appendage
(with suitable backslashing.)

Tested via C-only "make check" on armv5tel-unknown-linux-gnueabi on 4.3.x.

Ok everywhere?

		Thanks,
		--Kaveh


2010-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* gcc.target/arm/sibcall-1.c: Allow PLT to appear with pic code.

diff -rup orig/egcc-SVN20100311/gcc/testsuite/gcc.target/arm/sibcall-1.c egcc-SVN20100311/gcc/testsuite/gcc.target/arm/sibcall-1.c
--- orig/egcc-SVN20100311/gcc/testsuite/gcc.target/arm/sibcall-1.c	2008-03-14 00:36:50.000000000 +0100
+++ egcc-SVN20100311/gcc/testsuite/gcc.target/arm/sibcall-1.c	2010-03-11 18:21:27.000000000 +0100
@@ -30,5 +30,6 @@ int main(int argc, const char *argv[])
   return result;
 }

-/* { dg-final { scan-assembler "\tb\tfunc2\n" } } */
+/* The PLT marker may appear if the test is run with -fpic/-fPIC.  */
+/* { dg-final { scan-assembler "\tb\tfunc2(\\(PLT\\))?\n" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]