https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116065
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Hongyu Wang <hong...@gcc.gnu.org>: https://gcc.gnu.org/g:a59c4e496fa916cb9a484a649aa1b4cebd6550f2 commit r15-2430-ga59c4e496fa916cb9a484a649aa1b4cebd6550f2 Author: Hongyu Wang <hongyu.w...@intel.com> Date: Fri Jul 26 08:27:01 2024 +0800 i386: Mark target option with optimization when enabled with opt level [PR116065] When introducing munroll-only-small-loops, the option was marked as Target Save and added to -O2 default which makes attribute(optimize) resets target option and causing error when cmdline has O1 and funciton attribute has O2 and other target options. Mark this option as Optimization to fix. gcc/ChangeLog PR target/116065 * config/i386/i386.opt (munroll-only-small-loops): Mark as Optimization instead of Save. gcc/testsuite/ChangeLog PR target/116065 * gcc.target/i386/pr116065.c: New test.