]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/37926 (Program gives wrong output (connected to char len))
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 16 Nov 2008 12:00:44 +0000 (12:00 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 16 Nov 2008 12:00:44 +0000 (12:00 +0000)
2008-11-16  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/37926
* trans-expr.c (gfc_free_interface_mapping): Null sym->formal
(gfc_add_interface_mapping): Copy the pointer to the formal
arglist, rather than using copy_formal_args.

From-SVN: r141914

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

index 35466d421847fcd10b5dc31d0aa035e0a2fc5e34..ca9f86576b42cfeac90a8c3986aea03955a82631 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-16  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/37926
+       * trans-expr.c (gfc_free_interface_mapping): Null sym->formal
+       (gfc_add_interface_mapping): Copy the pointer to the formal
+       arglist, rather than using copy_formal_args - fixes regression.
+
 2008-11-15  Paul Thomas  <pault@gcc.gnu.org>
 
         PR fortran/37926
index ff74928d63e13051fc4cb4b53f76af1e291be36d..2e148f2c765a6bec29d7a9786b09a936cc7e23f9 100644 (file)
@@ -1583,6 +1583,7 @@ gfc_free_interface_mapping (gfc_interface_mapping * mapping)
   for (sym = mapping->syms; sym; sym = nextsym)
     {
       nextsym = sym->next;
+      sym->new_sym->n.sym->formal = NULL;
       gfc_free_symbol (sym->new_sym->n.sym);
       gfc_free_expr (sym->expr);
       gfc_free (sym->new_sym);
@@ -1715,7 +1716,7 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
      descriptors are passed for array actual arguments.  */
   if (sym->attr.flavor == FL_PROCEDURE)
     {
-      copy_formal_args (new_sym, expr->symtree->n.sym);
+      new_sym->formal = expr->symtree->n.sym->formal;
       new_sym->attr.always_explicit
            = expr->symtree->n.sym->attr.always_explicit;
     }
This page took 0.07235 seconds and 5 git commands to generate.