* optabs.c (expand_twoval_binop): Avoid undefined behaviour.
authorJan Hubicka <jh@suse.cz>
Fri, 15 Jun 2001 17:44:56 +0000 (19:44 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 15 Jun 2001 17:44:56 +0000 (17:44 +0000)
From-SVN: r43403

gcc/ChangeLog
gcc/optabs.c

index e7f08e8b9af599a48953099e7ad7b98572ed580e..eef09c8d9d56529c62e1e1e5129bd53229967035 100644 (file)
@@ -1,3 +1,7 @@
+Fri Jun 15 19:35:38 CEST 2001 Jan Hubicka  <jh@suse.cz>
+
+       * optabs.c (expand_twoval_binop): Avoid undefined behaviour.
+
 2001-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * doc/install.texi (Specific, alpha*-*-*): Fixed Tru64 UNIX
index 581fb9b95b21b8e8456cef08e5211a3c4107361e..0e135af12a01e086b88d20f74896465ab723d949 100644 (file)
@@ -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);