On Tue, 29 Apr 2014, Jakub Jelinek wrote:
To my surprise, the wording in C99 or C++11 make even floating point
division by zero undefined behavior, but I think generally at least for IEEE
floating point semantics it is well defined, thus I think we shouldn't
include it in
On Tue, Apr 29, 2014 at 11:34:50AM +0200, Marek Polacek wrote:
Ran ubsan testsuite (-m32/-m64) + bootstrap-ubsan on x86_64-linux, ok now?
2014-04-29 Marek Polacek pola...@redhat.com
* gcc.c (sanitize_spec_function): Handle SANITIZE_FLOAT_DIVIDE.
* builtins.def: Initialize
On Wed, Apr 30, 2014 at 08:55:10AM +0200, Jakub Jelinek wrote:
Please assign the result of the divisions to some other volatile variables,
otherwise I don't see why the compiler couldn't optimize them away all.
Otherwise looks good to me.
Done, thanks.
Marek
Marc Glisse wrote:
On Mon, 28 Apr 2014, Marek Polacek wrote:
This patch implements -fsanitize=float-divide-by-zero option that can
be used to detect division by zero even when using floating types.
Most of the code in ubsan_instrument_division was ready for this
so this was mainly about
On Tue, Apr 29, 2014 at 10:27:58AM +0200, Tobias Burnus wrote:
Thus, I think Fortran users would also prefer not to have
-fsanitize=undefined implying trapping dividing by zero.
Thus, I wonder whether it wouldn't be more useful to provide a command-line
option
to make the floating-point
On Tue, Apr 29, 2014 at 10:46:06AM +0200, Jakub Jelinek wrote:
On Tue, Apr 29, 2014 at 10:27:58AM +0200, Tobias Burnus wrote:
Thus, I think Fortran users would also prefer not to have
-fsanitize=undefined implying trapping dividing by zero.
Thus, I wonder whether it wouldn't be more
This patch implements -fsanitize=float-divide-by-zero option that can
be used to detect division by zero even when using floating types.
Most of the code in ubsan_instrument_division was ready for this
so this was mainly about handling REAL_TYPE there.
Since division by a floating point zero can
On Mon, 28 Apr 2014, Marek Polacek wrote:
This patch implements -fsanitize=float-divide-by-zero option that can
be used to detect division by zero even when using floating types.
Most of the code in ubsan_instrument_division was ready for this
so this was mainly about handling REAL_TYPE there.