OSDN Git Service

PR fortran/19543
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Jan 2005 00:29:33 +0000 (00:29 +0000)
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Jan 2005 00:29:33 +0000 (00:29 +0000)
* trans-const.c (gfc_conv_constant_to_tree): Give logical
constants the correct type.

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

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

index d91bdbf..15f828d 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/19543
+       * trans-const.c (gfc_conv_constant_to_tree): Give logical
+       constants the correct type.
+
 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
 
        * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
index 7388853..382bbbe 100644 (file)
@@ -306,7 +306,8 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
       return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind);
 
     case BT_LOGICAL:
-      return build_int_cst (NULL_TREE, expr->value.logical);
+      return build_int_cst (gfc_get_logical_type (expr->ts.kind),
+                           expr->value.logical);
 
     case BT_COMPLEX:
       {