Issue 166224
Summary Undefined Behavior in compiler-rt
Labels new issue
Assignees
Reporter nvetrini
    In the implementation of `__divdf3`, which defines macro `DOUBLE_PRECISION`, the macro invocation `REP_C(-1)` is expanded (see https://github.com/llvm/llvm-project/blame/ca69a8d2f403de3617970dcfa2f84756f7f336dd/compiler-rt/lib/builtins/fp_div_impl.inc#L29). In this context `REP_C` is defined as `UINT64_C`, for which the behavior with the constant `-1` as argument is undefined for all versions of the C Standard. Given the intent of the problematic use of `REP_C`, `UINT64_MAX` could be used instead.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to