This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran, committed] Fix fallout from previous patch


The fix for PRs 17535, 17583, 17713 introduced a failure in the testcase from
PR 15164. I don't know how I missed it, maybe I added the testcase after I had
tested the patch. My apologies in any case.

I'm committing this patch under the obviously correct rule: with my previous
patch we used to take the wrong path in gfc_finish_var_decl, because now the
sym->module is set for a dummy argument, where it previously wasn't.

Bubblestrapped and tested (with the failure disappearing again) on
i686-pc-linux, committed.

- Tobi

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.247
diff -u -p -r1.247 ChangeLog
--- ChangeLog   3 Nov 2004 00:53:57 -0000       1.247
+++ ChangeLog   5 Nov 2004 13:55:25 -0000
@@ -1,3 +1,9 @@
+2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/15164
+       * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
+       module procedures as if they were module variables.
+
 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

        PR fortran/17535
Index: trans-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-decl.c,v
retrieving revision 1.46
diff -u -p -r1.46 trans-decl.c
--- trans-decl.c        13 Oct 2004 22:37:12 -0000      1.46
+++ trans-decl.c        5 Nov 2004 13:55:25 -0000
@@ -410,9 +410,9 @@ gfc_finish_var_decl (tree decl, gfc_symb
       DECL_EXTERNAL (decl) = 1;
       TREE_PUBLIC (decl) = 1;
     }
-  else if (sym->module[0] && !sym->attr.result)
+  else if (sym->module[0] && !sym->attr.result && !sym->attr.dummy)
     {
-      /* TODO: Don't set sym->module for result variables.  */
+      /* TODO: Don't set sym->module for result or dummy variables.  */
       gcc_assert (current_function_decl == NULL_TREE);
       /* This is the declaration of a module variable.  */
       TREE_PUBLIC (decl) = 1;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]