diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-15 17:44:56 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-15 17:44:56 +0000 |
commit | 4427eb38eab8181f88f7a1f378e60a962719369e (patch) | |
tree | f18da83867208f6cd1c7b872c2fccabc8925a9af /gcc/optabs.c | |
parent | 8401088de992522d49e36cdab7985bf31a459c03 (diff) | |
download | gcc-4427eb38eab8181f88f7a1f378e60a962719369e.tar.gz |
* optabs.c (expand_twoval_binop): Avoid undefined behaviour.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 581fb9b95b2..0e135af12a0 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1992,12 +1992,10 @@ expand_twoval_binop (binoptab, op0, op1, targ0, targ1, unsignedp) { register rtx t0 = gen_reg_rtx (wider_mode); register rtx t1 = gen_reg_rtx (wider_mode); + rtx cop0 = convert_modes (wider_mode, mode, op0, unsignedp); + rtx cop1 = convert_modes (wider_mode, mode, op1, unsignedp); - if (expand_twoval_binop (binoptab, - convert_modes (wider_mode, mode, op0, - unsignedp), - convert_modes (wider_mode, mode, op1, - unsignedp), + if (expand_twoval_binop (binoptab, cop0, cop1, t0, t1, unsignedp)) { convert_move (targ0, t0, unsignedp); |