Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-16 Thread Janne Blomqvist
On Sat, Jun 15, 2019 at 2:23 AM Steve Kargl wrote: > > On Fri, Jun 14, 2019 at 08:07:36AM -0700, Steve Kargl wrote: > > On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > > > As GCC now provides builtins for doing integer overflow checking, lets > > > use it when checking for

Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Steve Kargl
On Fri, Jun 14, 2019 at 08:07:36AM -0700, Steve Kargl wrote: > On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > > As GCC now provides builtins for doing integer overflow checking, lets > > use it when checking for overflow in xmallocarray. > > > > Regtested on

Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Steve Kargl
On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > As GCC now provides builtins for doing integer overflow checking, lets > use it when checking for overflow in xmallocarray. > > Regtested on x86_64-pc-linux-gnu, Ok for trunk? > OK -- Steve

[PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Janne Blomqvist
As GCC now provides builtins for doing integer overflow checking, lets use it when checking for overflow in xmallocarray. Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2019-06-14 Janne Blomqvist * runtime/memory.c (SIZE_MAX):Remove macro definition.