The patch below fixes PR 47552, where we generate a variable of wrong type for the string length argument passed to CTIME. Patch was approved in the PR, was regtested on x86_64-linux. Committed as revision 170898.
2011-03-12 Francois-Xavier Coudert <fxcoud...@gcc.gnu.org> PR fortran/47552 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of the string length variable. Index: trans-intrinsic.c =================================================================== --- trans-intrinsic.c (revision 170897) +++ trans-intrinsic.c (working copy) @@ -1501,7 +1501,7 @@ gfc_conv_intrinsic_ctime (gfc_se * se, g 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);