public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [fortran, committed] Fix CTIME code generation
@ 2011-03-12 10:28 FX
  0 siblings, 0 replies; only message in thread
From: FX @ 2011-03-12 10:28 UTC (permalink / raw)
  To: gfortran List, gcc-patches

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  <fxcoudert@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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-12 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-12 10:28 [fortran, committed] Fix CTIME code generation FX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).