Branchless conditional arithmetic oddities

Yes, I misspoke - c_bool is a logical kind. However, ifort’s LOGICAL(c_bool) doesn’t interoperate with C unless you use -standard-semantics (or -fpscomp logicals)

If you don’t use -standard-semantics, then some defaults deviate from the standard - that’s the whole point of that option in that omitting it continues default behavior from the compiler’s history so as to not break programs. Over the years, some of the individual choices under this umbrella have become new defaults, such as reallocating the LHS on assignment.