summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/trans-const.c
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-05 20:14:52 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-05 20:14:52 +0000
commitf680b43ee143db4756e3789eb986393079b9801b (patch)
treead5d999530fe21a940190e71d5d397e47fb3ec3c /gcc/fortran/trans-const.c
parent12e2a142c73119a8a6216ec6319a9867c0ea4ccc (diff)
downloadppe42-gcc-f680b43ee143db4756e3789eb986393079b9801b.tar.gz
ppe42-gcc-f680b43ee143db4756e3789eb986393079b9801b.zip
* trans-const.c (gfc_conv_constant_to_tree): Use correct tree
type for COMPLEX constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r--gcc/fortran/trans-const.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 382bbbeee52..84a62e89e3b 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:
OpenPOWER on IntegriCloud