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;