I think it'd be an issue irrespective of the architecture? Optimizations are generally expected to preserve semantics and those languages all specify IEEE 754 semantics which aren't necessarily associative. For instance, from the Java language spec [0]:
> Floating-point arithmetic is carried out in accordance with the rules of the IEEE 754 Standard, including for overflow and underflow (§15.4), with the exception of the remainder operator % (§15.17.3).
Or the .NET reference [1]:
> The Double type complies with the IEC 60559:1989 (IEEE 754) standard for binary floating-point arithmetic.
Or the ECMAScript 2027 spec [2]:
> Numeric operators such as +, ×, =, and ≥ refer to those operations as determined by the type of the operands. [] When applied to Numbers, the operators refer to the relevant operations within IEEE 754-2019.
[0]: https://docs.oracle.com/javase/specs/jls/se26/jls26.pdf
[1]: https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...