]> git.ipfire.org Git - thirdparty/gcc.git/commit
Robustify REAL_MODE_FORMAT
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Oct 2015 13:42:27 +0000 (13:42 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Oct 2015 13:42:27 +0000 (13:42 +0000)
commitd803eb54e8be28f7bac73b3887633e6b11c7fe8a
treeea61f6c5d9733c823fab8c6df2bdd0114bcbfe15
parentfd396523e0d294a34c639d11b557a66d0f33fdaa
Robustify REAL_MODE_FORMAT

Make sure that REAL_MODE_FORMAT aborts if it is passed an invalid mode,
rather than stepping beyond the bounds of an array.  It turned out that
some code was passing non-float modes to the real.h routines.

Tested on x86_64-linux-gnu, arm-linux-gnueabi and aarch64-linux-gnu.

gcc/
* real.h (REAL_MODE_FORMAT): Abort if the mode isn't a
SCALAR_FLOAT_MODE_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229579 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/real.h