https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112707
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by HaoChen Gui <guih...@gcc.gnu.org>: https://gcc.gnu.org/g:ae226cb1ee17d61c416c9d4d8c5a142788b8afff commit r14-6392-gae226cb1ee17d61c416c9d4d8c5a142788b8afff Author: Haochen Gui <guih...@gcc.gnu.org> Date: Mon Dec 11 08:41:55 2023 +0800 rs6000: Guard fctid on PowerPC64 and PowerPC476 fctid is only supported on 64-bit Power processors and powerpc 476. It should be guarded by this condition. The patch fixes the issue. gcc/ PR target/112707 * config/rs6000/rs6000.h (TARGET_FCTID): Define. * config/rs6000/rs6000.md (lrint<mode>di2): Add guard TARGET_FCTID. * (lround<mode>di2): Replace TARGET_FPRND with TARGET_FCTID. gcc/testsuite/ PR target/112707 * gcc.target/powerpc/pr112707.h: New. * gcc.target/powerpc/pr112707-2.c: New. * gcc.target/powerpc/pr112707-3.c: New. * gcc.target/powerpc/pr88558-p7.c: Check fctid on ilp32 and has_arch_ppc64 as it's now guarded by powerpc64. * gcc.target/powerpc/pr88558-p8.c: Likewise. * gfortran.dg/nint_p7.f90: Add powerpc64 target requirement as lround<mode>di2 is now guarded by powerpc64.