https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108240
--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #4) > (In reply to Kewen Lin from comment #3) > > With the culprit commit r13-4894, we always implicitly enable powerpc64 for > > both explicit and implicit 64 bit, it's the same as before for the explicit > > 64 bit case, but for the implicit 64 bit case, there is no chance for the > > used cpu to unset powerpc64 (like this case). To keep it consistent with the > > previous, the fix can be to only enable powerpc64 implicitly for explicit 64 > > bit, while let it be for implicit 64 bit. > > No? If the user says to use a CPU without 64-bit instructions, while the > user also says we require 64-bit insns (via -m64), we should just error. But both the previous behavior (before r13-4894) and the current behavior (starting from r13-4894) honour the given explicit -m64, it would always enable -mpowerpc64 at the same time without any errors/warnings. > Not hide the problem (and cause many more problems!) > The behavior change is for the case without any explicit -m64 but the TARGET_DEFAULT has 64 bit set (implicit -m64). And yes, different from the previous behavior, the current behavior hides the error/warning and force the -mpower64, so I posted one patch at: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609492.html It would allow that powerpc64 gets unset if the user says to use a CPU without 64-bit instructions and with implicit 64 bit.