diff options
author | Jan Hubicka <jh@suse.cz> | 2001-06-15 19:44:56 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-06-15 17:44:56 +0000 |
commit | 76791f3d9585c62d1705533e4301e0199358d49b (patch) | |
tree | f18da83867208f6cd1c7b872c2fccabc8925a9af /gcc/optabs.c | |
parent | f254110619099179473e58a4cda8558ceb445c6f (diff) | |
download | gcc-76791f3d9585c62d1705533e4301e0199358d49b.zip gcc-76791f3d9585c62d1705533e4301e0199358d49b.tar.gz gcc-76791f3d9585c62d1705533e4301e0199358d49b.tar.bz2 |
* optabs.c (expand_twoval_binop): Avoid undefined behaviour.
From-SVN: r43403
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 581fb9b..0e135af 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); |