https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61876
ktkachov at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Component|tree-optimization |middle-end --- Comment #1 from ktkachov at gcc dot gnu.org --- This particular example is given for aarch64 but I imagine it could occur for any other target. >From what I understand lround can potentially set errno on a domain error whereas round is valid everywhere and the cast to long int could be undefined behaviour if the double is not valid, but undefined behaviour is not the same as setting errno...