[PATCH,MIPS,committed] Fix pr52125.c test when built as -mno-abicalls -mabi=64

Matthew Fortune Matthew.Fortune@imgtec.com
Thu Mar 30 22:49:00 GMT 2017


pr52125.c verifies that orphaned %hi relocs are deleted if they feed
an inline asm statement that never emits the %lo part. Orphaned %hi
relocs are only strictly a problem for o32 but are eliminated for
any ABI as long as 32-bit addressing is in use so force -msym32 as well
as require absolute addressing. This is necessary because -msym32 is
only applied for n64 as part of downgrading -mabicalls to absolute
addressing. I.e. this test was broken for bare metal n64 configs.

gcc/testsuite/
        * gcc.target/mips/pr52125.c: Add -msym32.

diff --git a/gcc/testsuite/gcc.target/mips/pr52125.c b/gcc/testsuite/gcc.target/mips/pr52125.c
index 2ac8067..46df940 100644
--- a/gcc/testsuite/gcc.target/mips/pr52125.c
+++ b/gcc/testsuite/gcc.target/mips/pr52125.c
@@ -1,4 +1,4 @@
-/* { dg-options "-mno-gpopt addressing=absolute" } */
+/* { dg-options "-mno-gpopt -msym32 addressing=absolute" } */

 int a, b, c, d;



More information about the Gcc-patches mailing list