This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed, PATCH] PR target/67110: gcc.target/i386/iamcu/test_struct_returning.c execution test FAILs with -fpic
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Tue, 4 Aug 2015 04:54:30 -0700
- Subject: [committed, PATCH] PR target/67110: gcc.target/i386/iamcu/test_struct_returning.c execution test FAILs with -fpic
- Authentication-results: sourceware.org; auth=none
Since IAMCU tests clear all scratch integer registers with:
asm __volatile__ ("xor %%eax, %%eax\n\t" \
"xor %%edx, %%edx\n\t" \
"xor %%ecx, %%ecx\n\t" \
::: "eax", "edx", "ecx");
PIC register may be trashed between setting PIC register and using it.
This patch compiles AMCU tests with -fno-pie -no-pie.
H.J.
--
PR target/67110
* gcc.target/i386/iamcu/abi-iamcu.exp (additional_flags): Add
-fno-pie -no-pie.
---
gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
index b5b3261..8bcee0f 100644
--- a/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
+++ b/gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp
@@ -29,7 +29,7 @@ if { (![istarget x86_64-*-linux*] && ![istarget i?86-*-linux*])
torture-init
set-torture-options $C_TORTURE_OPTIONS
-set additional_flags "-miamcu -W -Wall -Wno-abi"
+set additional_flags "-miamcu -W -Wall -Wno-abi -fno-pie -no-pie"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
if {[runtest_file_p $runtests $src]} {
--
2.4.3