On some targets, pr62026_0.C issues a warning about implicitly passing
-flinker-output=nolto-rel, which flags the test as a failure.  Pass
the flag explicitly to avoid the warning.

Regstrapped on x86_64-linux-gnu.  Also tested with aarch64-elf and
arm-eabi with gcc-15.  Ok to install?


for  gcc/testsuite/ChangeLog

        * g++.dg/lto/pr62026_0.C: Silence -flinker-output warning.
---
 gcc/testsuite/g++.dg/lto/pr62026_0.C |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/g++.dg/lto/pr62026_0.C 
b/gcc/testsuite/g++.dg/lto/pr62026_0.C
index d6445ee9b4d80..448a67c1db3f8 100644
--- a/gcc/testsuite/g++.dg/lto/pr62026_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr62026_0.C
@@ -1,5 +1,7 @@
 // { dg-lto-do link }
 // { dg-lto-options {{-flto -O3 -r -Wno-return-type}} }
+// { dg-extra-ld-options "-flinker-output=nolto-rel" }
+
 class C;
 class F {
   virtual C m_fn1();

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to