https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122596
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Rainer Orth <[email protected]>: https://gcc.gnu.org/g:1927a43b1e824b591ffc750a49b22221796f4005 commit r16-5798-g1927a43b1e824b591ffc750a49b22221796f4005 Author: Rainer Orth <[email protected]> Date: Mon Dec 1 14:17:32 2025 +0100 testsuite: fortran: Fix gfortran.dg/alloc_comp_deep_copy_5.f90 etc. with non-gas/gld [PR122596] The gfortran.dg/alloc_comp_deep_copy_[56].f90 tests FAIL on Solaris: FAIL: gfortran.dg/alloc_comp_deep_copy_5.f90 -O0 (test for excess errors) UNRESOLVED: gfortran.dg/alloc_comp_deep_copy_5.f90 -O0 compilation failed to produce executable and many more when using either or both the native assembler or linker: Excess errors: Assembler: "", line 1 : Illegal flag (-) which is due to passing --noexecstack to the assembler. This is wrong in general unless GNU as is used. Likewise, -Wl,-z,noexecstack has the same issue. This is *not* a target issue: the tests PASS as-is when using gas/gld on Solaris (thus the current { target { ! *-*-darwin* } } is wrong, too). Instead, the gas and gld effective-target keywords should be used to control whether the flags are used, which is what this patch does. Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin25.1.0. 2025-11-27 Rainer Orth <[email protected]> gcc/testsuite: PR testsuite/122596 * gfortran.dg/alloc_comp_deep_copy_5.f90: Restrict -Wa,--noexecstack, -Wl,-z,noexecstack to gas, gld. * gfortran.dg/alloc_comp_deep_copy_6.f90: Likewise.
