https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107723
Bug ID: 107723 Summary: RISC-V lround/ceil/floor with -fno-fp-int-builtin-inexact Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: kevinl at rivosinc dot com Target Milestone: --- This was observed when solving https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605481.html. For example, int ceil(double i) { return __builtin_lceil(i); } -march=rv64gc -mabi=lp64d -fno-fp-int-builtin-inexact generates ceil1: addi sp,sp,-16 sd ra,8(sp) call ceil ld ra,8(sp) fcvt.l.d a0,fa0,rtz addi sp,sp,16 sext.w a0,a0 jr ra fcvt can possibly set the inexact exception flag, so this seems to be a violation.