re PR fortran/47552 (CTIME: Valgrind warning "depends on uninitialised value")
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 12 Mar 2011 10:28:01 +0000 (10:28 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 12 Mar 2011 10:28:01 +0000 (10:28 +0000)
        PR fortran/47552
        * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
        the string length variable.

From-SVN: r170898

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

index a0b88054589dde63b8959242808736c0ed4f7f7c..62431317440d5bf641ec6b995e7639437ca8b6c6 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/47552
+       * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
+       the string length variable.
+
 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/47768
index 502a8153d5d39a272ac2223c239e00fdb51e1964..403aa3068b7731b4250af6d5606e92fc38ead45d 100644 (file)
@@ -1501,7 +1501,7 @@ gfc_conv_intrinsic_ctime (gfc_se * se, gfc_expr * expr)
   args = XALLOCAVEC (tree, num_args);
 
   var = gfc_create_var (pchar_type_node, "pstr");
-  len = gfc_create_var (gfc_get_int_type (8), "len");
+  len = gfc_create_var (gfc_charlen_type_node, "len");
 
   gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
   args[0] = gfc_build_addr_expr (NULL_TREE, var);