testsuite: Require lto-plugin support in gcc.dg/lto/modref-3 etc. [PR98237]
gcc.dg/lto/modref-3 etc. FAIL on Solaris with the native linker: FAIL: gcc-dg-lto-modref-3-01.exe scan-wpa-ipa-dump modref "parm 1 flags: no_direct_clobber no_direct_escape" FAIL: gcc-dg-lto-modref-4-01.exe scan-wpa-ipa-dump modref "parm 1 flags: no_direct_clobber no_direct_escape" FAIL: gcc.dg/lto/modref-3 c_lto_modref-3_0.o-c_lto_modref-3_1.o execute -O2 -flto-partition=max -fdump-ipa-modref -fno-ipa-sra -fno-ipa-cp -flto FAIL: gcc.dg/lto/modref-4 c_lto_modref-4_0.o-c_lto_modref-4_1.o execute -O2 -flto-partition=max -fdump-ipa-modref -fno-ipa-sra -flto The issue is that the tests require the linker plugin, which isn't available with Solaris ld. Thus, it also FAILs when gcc is configured with --disable-lto-plugin. This patch thus declares the requirement. As it turns out, there's an undocumented dg-require-linker-plugin already, but I introduce and use the corresponding effective-target keyword and document both. Given that the effective-target form is more flexible, I'm tempted to remove dg-require-* with an empty arg as already mentioned in sourcebuild.texi. That is not this patch, however. Tested on i386-pc-solaris2.11 with ld and gld. 2024-02-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/testsuite: PR ipa/98237 * lib/target-supports.exp (is-effective-target): Handle linker_plugin. * gcc.dg/lto/modref-3_0.c: Require linker_plugin support. * gcc.dg/lto/modref-4_0.c: Likewise. gcc: * doc/sourcebuild.texi (Effective-Target Keywords, Other attribugs): Document linker_plugin. (Require Support): Document dg-require-linker-plugin.
Showing
- gcc/doc/sourcebuild.texi 7 additions, 0 deletionsgcc/doc/sourcebuild.texi
- gcc/testsuite/gcc.dg/lto/modref-3_0.c 1 addition, 0 deletionsgcc/testsuite/gcc.dg/lto/modref-3_0.c
- gcc/testsuite/gcc.dg/lto/modref-4_0.c 1 addition, 0 deletionsgcc/testsuite/gcc.dg/lto/modref-4_0.c
- gcc/testsuite/lib/target-supports.exp 1 addition, 0 deletionsgcc/testsuite/lib/target-supports.exp
Loading
Please register or sign in to comment