summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-22 00:29:33 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-22 00:29:33 +0000
commit9beba3020fcc1dd13626451eb5293bdde1ebd7c3 (patch)
tree03cde2062509310ae98afee340f8ecbce24fc7aa /gcc
parentdae0a3e6fe533e827cb935d740e5208a6c2c6999 (diff)
downloadgcc-9beba3020fcc1dd13626451eb5293bdde1ebd7c3.tar.gz
PR fortran/19543
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-const.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d91bdbf35b9..15f828df60a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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,
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 7388853fc54..382bbbeee52 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -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:
{