https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115713
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kewen Lin <li...@gcc.gnu.org>: https://gcc.gnu.org/g:e6db8848d956f5e712dd621d33630b799ff60a72 commit r15-2215-ge6db8848d956f5e712dd621d33630b799ff60a72 Author: Kewen Lin <li...@linux.ibm.com> Date: Tue Jul 23 00:48:00 2024 -0500 rs6000: Consider explicitly set options in target option parsing [PR115713] In rs6000_inner_target_options, when enabling VSX we enable altivec and disable -mavoid-indexed-addresses implicitly, but it doesn't consider the case that the options altivec and avoid-indexed-addresses can be explicitly disabled. As the test case in PR115713#c1 shows, with target attribute "no-altivec,vsx", it results in that VSX unexpectedly set altivec flag and there isn't an expected error. This patch is to avoid the automatic enablement when they are explicitly specified. With this change, an existing test case ppc-target-4.c also requires an adjustment by specifying explicit altivec in target attribute (since it requires altivec feature and command line is specifying no-altivec). PR target/115713 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_inner_target_options): Avoid to enable altivec or disable avoid-indexed-addresses automatically when they get specified explicitly. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr115713-1.c: New test. * gcc.target/powerpc/ppc-target-4.c: Adjust by specifying altivec in target attribute.