OSDN Git Service

* trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 May 2005 18:20:52 +0000 (18:20 +0000)
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 May 2005 18:20:52 +0000 (18:20 +0000)
  like types in comparsion.

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

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c

index face053..b5a4975 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-27  Steven G. Kargl  <kargls@comcast.net>
+
+       * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
+       like types in comparsion.
+
 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * data.c, parse.c, trans-array.c, trans-decl.c,
 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
 
        * data.c, parse.c, trans-array.c, trans-decl.c,
index 4d95b2e..6dc33d3 100644 (file)
@@ -4000,7 +4000,8 @@ gfc_trans_deferred_array (gfc_symbol * sym, tree body)
       deallocate = gfc_array_deallocate (descriptor);
 
       tmp = gfc_conv_descriptor_data (descriptor);
       deallocate = gfc_array_deallocate (descriptor);
 
       tmp = gfc_conv_descriptor_data (descriptor);
-      tmp = build2 (NE_EXPR, boolean_type_node, tmp, integer_zero_node);
+      tmp = build2 (NE_EXPR, boolean_type_node, tmp, 
+                   build_int_cst (TREE_TYPE (tmp), 0));
       tmp = build3_v (COND_EXPR, tmp, deallocate, build_empty_stmt ());
       gfc_add_expr_to_block (&block, tmp);
 
       tmp = build3_v (COND_EXPR, tmp, deallocate, build_empty_stmt ());
       gfc_add_expr_to_block (&block, tmp);