Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-21 Thread Jakub Jelinek
On Wed, May 21, 2014 at 04:46:14PM +0200, Jakub Jelinek wrote: > Here is a testcase that (IMHO, not tested with your patch) should > test various boundary cases that shouldn't result in undefined behavior. > I've tried to keep it portable across various architectures, assumes > primarily two's comp

Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-21 Thread Joseph S. Myers
On Wed, 21 May 2014, Marek Polacek wrote: > On Tue, May 20, 2014 at 09:50:10PM +, Joseph S. Myers wrote: > > On Tue, 20 May 2014, Marek Polacek wrote: > > > > > * is missing tests for long doubles/-mlong-double-128, > > > > Also missing tests for float - as far as I can see, only double is t

Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-21 Thread Jakub Jelinek
On Wed, May 21, 2014 at 02:51:00PM +0200, Marek Polacek wrote: > On Tue, May 20, 2014 at 09:50:10PM +, Joseph S. Myers wrote: > > On Tue, 20 May 2014, Marek Polacek wrote: > > > > > * is missing tests for long doubles/-mlong-double-128, > > > > Also missing tests for float - as far as I can s

Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-21 Thread Marek Polacek
On Tue, May 20, 2014 at 09:50:10PM +, Joseph S. Myers wrote: > On Tue, 20 May 2014, Marek Polacek wrote: > > > * is missing tests for long doubles/-mlong-double-128, > > Also missing tests for float - as far as I can see, only double is tested. > Ideally all of float, double, long double, _

Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-20 Thread Joseph S. Myers
On Tue, 20 May 2014, Marek Polacek wrote: > * is missing tests for long doubles/-mlong-double-128, Also missing tests for float - as far as I can see, only double is tested. Ideally all of float, double, long double, __float128 (where supported), __float80 (where supported) would be tested (th

Re: [PATCH] Implement -fsanitize=float-cast-overflow (take 2)

2014-05-20 Thread Marek Polacek
Thanks for all your help. This is updated patch which: * uses mix/min handling that Jakub kindly wrote, * limited a test to ilp32 || lp64 + used sse2_runtime (but it's likely I screwed it up as usually), * adds a testcase for (unsigned) __int128, * adds testcases for C and C++ bit-fields, * mak