https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114307
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Maxim Kuvyrkov <mkuvyr...@gcc.gnu.org>: https://gcc.gnu.org/g:b8e7aaaf350a4584d9b76e8dd69daa2203bac339 commit r14-9706-gb8e7aaaf350a4584d9b76e8dd69daa2203bac339 Author: Maxim Kuvyrkov <maxim.kuvyr...@linaro.org> Date: Wed Mar 13 06:48:47 2024 +0000 [testsuite] Fixup dg-options in {gcc,g++,gfortran}.dg/vect.exp tests Testsuites driven by vect.exp rely on check_vect_support_and_set_flags to set appropriate DEFAULT_VECTFLAGS for a given target (e.g., add -mfpu=neon for arm-linux-gnueabi). Unfortunately, these flags are overwritten by dg-options directive, which can cause tests to fail. Behavior of dg-options is documented in vect.exp files, but not all developers look at the .exp file when adding a new testcase. This caused a few dg-options directives to be used instead of the more appropriate dg-additional-options. This patch changes target-independent dg-options into dg-additional-options. This patch does not touch target-specific dg-options and target-specific tests to avoid disturbing the gentle balance of target-specific vectorization. This patch also removes a couple of unneeded "dg-do run" directives to avoid failures on compile-only targets. Default action is, again, set by check_vect_support_and_set_flags. Lastly, I avoided renaming tests that use -O<n> options to O<n>-* filename format because this support is not consistent between gcc.dg/vect/, g++.dg/vect/, and gfortran.dg/vect/ testsuites. It seems dg-additional-options is cleaner. This patch does the following, 1. do not change target-specific tests, e.g., gcc.dg/vect/costmodel/riscv/*; 2. do not change { dg-options FOO { target { target-*-pattern } } }; 3. do not remove { dg-do run { target { target-*-pattern } } }; 4. change { dg-options FOO } to { dg-additional-options FOO }; 5. remove { dg-do run } in several tests, where it is clearly not needed. gcc/testsuite/ChangeLog: PR testsuite/114307 * gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c: Remove dg-run. * gcc.dg/vect/complex/complex-operations-run.c: Likewise. * gcc.dg/vect/pr113576.c: Remove dg-run. Use dg-additional-options for test-specific flags. * gcc.dg/vect/gimplefe-40.c: Use dg-additional-options for test-specific flags. * gcc.dg/vect/gimplefe-41.c: Likewise. * gcc.dg/vect/pr101145inf.c: Likewise. * gcc.dg/vect/pr101145inf_1.c: Likewise. * gcc.dg/vect/pr108316.c: Likewise. * gcc.dg/vect/pr109011-1.c: Likewise. * gcc.dg/vect/pr109011-2.c: Likewise. * gcc.dg/vect/pr109011-3.c: Likewise. * gcc.dg/vect/pr109011-4.c: Likewise. * gcc.dg/vect/pr109011-5.c: Likewise. * gcc.dg/vect/pr111846.c: Likewise. * gcc.dg/vect/pr111860-2.c: Likewise. * gcc.dg/vect/pr111860-3.c: Likewise. * gcc.dg/vect/pr113002.c: Likewise. * gcc.dg/vect/pr84711.c: Likewise. * gcc.dg/vect/pr85597.c: Likewise. * gcc.dg/vect/pr88497-1.c: Likewise. * gcc.dg/vect/pr88497-2.c: Likewise. * gcc.dg/vect/pr88497-3.c: Likewise. * gcc.dg/vect/pr88497-4.c: Likewise. * gcc.dg/vect/pr88497-5.c: Likewise. * gcc.dg/vect/pr88497-7.c: Likewise. * gcc.dg/vect/pr92347.c: Likewise. * gcc.dg/vect/pr93069.c: Likewise. * gcc.dg/vect/pr97241.c: Likewise. * gcc.dg/vect/pr99102.c: Likewise. * gcc.dg/vect/vect-early-break_65.c: Likewise. * gcc.dg/vect/vect-fold-1.c: Likewise. * gcc.dg/vect/vect-ifcvt-19.c: Likewise. * gcc.dg/vect/vect-ifcvt-20.c: Likewise. * gcc.dg/vect/vect-reduc-epilogue-gaps.c: Likewise. * gcc.dg/vect/vect-singleton_1.c: Likewise. * g++.dg/vect/pr84556.cc: Likewise. * gfortran.dg/vect/fast-math-mgrid-resid.f: Likewise. * gfortran.dg/vect/pr77848.f: Likewise. * gfortran.dg/vect/pr90913.f90: Likewise.