``When -ftrapv is in effect, libcalls are "necessary" so that the results of an operation can be propagated without making the call to the libgcc functions dead. The attached patch causes a failure in pr30286.c.''
This has to be investigated before libcall notes can be removed from the compiler.
-ftrapv is seriously broken and nobody wants to fix it; so the most appealing
solution is to remove support for -ftrapv. See PR19020, especially the
libcall part is broken as well.
PR19020 shows that -ftrapv vs. libcalls is broken even without Paolo's patch.
Well, regression is a big word because -ftrapv is broken in general. I guess the RM will lower the priority.
Not a regression. $Summary was true always.
Not a regression, removing milestone.
*** Bug 39771 has been marked as a duplicate of this bug. ***
I'm reopening this report. -ftrapv is still documented, so can be expected to work by users.
For the particular problem I have right now, a functional version of this option would be a great thing to have.
*** Bug 40143 has been marked as a duplicate of this bug. ***
Please fix. Per the documentation available `-fsantize=undefined` provides some of the missing functionality but does not allow the program's flow to be altered.
I wonder what's the status of this bug. It has been 15 years.
As far as I know, Clang doesn't have this bug, so it should not be impossible to implement.
And, does -fsantize=undefined really provides the same functionality of this switch? I have always assumed that santizers are not to be used in production, right?
(In reply to dingd from comment #10)
> I wonder what's the status of this bug. It has been 15 years.
It still is a bug.
> As far as I know, Clang doesn't have this bug, so it should not be
> impossible to implement.
Yes clang/LLVM does not have this bug because the internals of them and GCC are way different.
> And, does -fsantize=undefined really provides the same functionality of this
> switch? I have always assumed that santizers are not to be used in
> production, right?
See PR 101521 for some ideas of how to implement this using the same infrastructure as -fsantize=undefined .