aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2005-03-05 21:14:52 +0100
committerTobias Schlüter <tobi@gcc.gnu.org>2005-03-05 21:14:52 +0100
commit19db01bb4587701a48494f8ec1ef18933652a614 (patch)
treead5d999530fe21a940190e71d5d397e47fb3ec3c /gcc/fortran
parent12bcfaa1cb344664bb0123afb3d044b7752dbab5 (diff)
downloadgcc-19db01bb4587701a48494f8ec1ef18933652a614.zip
gcc-19db01bb4587701a48494f8ec1ef18933652a614.tar.gz
gcc-19db01bb4587701a48494f8ec1ef18933652a614.tar.bz2
trans-const.c (gfc_conv_constant_to_tree): Use correct tree type for COMPLEX constants.
* trans-const.c (gfc_conv_constant_to_tree): Use correct tree type for COMPLEX constants. From-SVN: r95941
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-const.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index db94aa6..1490ed1 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
+ type for COMPLEX constants.
+
2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/19673
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 382bbbe..84a62e8 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -316,7 +316,8 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
tree imag = gfc_conv_mpfr_to_tree (expr->value.complex.i,
expr->ts.kind);
- return build_complex (NULL_TREE, real, imag);
+ return build_complex (gfc_typenode_for_spec (&expr->ts),
+ real, imag);
}
case BT_CHARACTER: