]> git.ipfire.org Git - thirdparty/gcc.git/commit
Use __builtin_mul_overflow in xmallocarray
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jun 2019 16:05:54 +0000 (16:05 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jun 2019 16:05:54 +0000 (16:05 +0000)
commit6bc936d3dfb950092c5ee24a197cc468ea70b55c
tree03bfc61b8b6fe932def2e36c89dae37cbdaeefc9
parent824e2c0e24daaef45aba7dbead0210bcba20885f
Use __builtin_mul_overflow in xmallocarray

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.

libgfortran/ChangeLog:

2019-06-14  Janne Blomqvist  <jb@gcc.gnu.org>

* runtime/memory.c (SIZE_MAX):Remove macro definition.
(xmallocarray): Use __builtin_mul_overflow.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272295 138bc75d-0d04-0410-961f-82ee72b054a4
libgfortran/ChangeLog
libgfortran/runtime/memory.c