trans-const.c (gfc_conv_constant_to_tree): Use correct tree type for COMPLEX constants.
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Sat, 5 Mar 2005 20:14:52 +0000 (21:14 +0100)
committerTobias Schlüter <tobi@gcc.gnu.org>
Sat, 5 Mar 2005 20:14:52 +0000 (21:14 +0100)
* trans-const.c (gfc_conv_constant_to_tree): Use correct tree
type for COMPLEX constants.

From-SVN: r95941

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

index db94aa67b27dab7042f63f528c73b97e3b8e29ab..1490ed1ebccd3e09ae70391953ff839c993714f5 100644 (file)
@@ -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
index 382bbbeee52bebd0f450719e0cc16aaaa157f5ef..84a62e89e3b680f453262318a5f1ac4e83fabd0d 100644 (file)
@@ -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: