]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.c (get_unwidened): Reorder conditions so that the null pointer check is done...
authorRichard Sandiford <rsandifo@redhat.com>
Sat, 10 Jan 2004 12:02:34 +0000 (12:02 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 10 Jan 2004 12:02:34 +0000 (12:02 +0000)
* tree.c (get_unwidened): Reorder conditions so that the null pointer
check is done first.

From-SVN: r75639

gcc/ChangeLog
gcc/tree.c

index a4756335357687f645c2bbbb7d751bef89cf8079..13ee5f6b070260c7cafff621b839e2584b34b844 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-10  Richard Sandiford  <rsandifo@redhat.com>
+
+       * tree.c (get_unwidened): Reorder conditions so that the null pointer
+       check is done first.
+
 2004-01-09  Eric Christopher  <echristo@redhat.com>
 
        * toplev.c (rest_of_handle_cfg): Add reg_scan pass
index b252a67c354c0e815b0998653d8043d8ae0edc87..8fffffdca6d3f98bf4491e7fb0941a97fc0878ed 100644 (file)
@@ -4123,10 +4123,10 @@ get_unwidened (tree op, tree for_type)
         The resulting extension to its nominal type (a fullword type)
         must fit the same conditions as for other extensions.  */
 
-      if (INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (op)))
+      if (type != 0
+         && INT_CST_LT_UNSIGNED (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (op)))
          && (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1)))
-         && (! uns || final_prec <= innerprec || unsignedp)
-         && type != 0)
+         && (! uns || final_prec <= innerprec || unsignedp))
        {
          win = build (COMPONENT_REF, type, TREE_OPERAND (op, 0),
                       TREE_OPERAND (op, 1));