From adf3ed3f3812861d98f00dee10b00287703d88c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Fri, 5 Nov 2004 15:10:35 +0100 Subject: re PR fortran/15164 (trans-decl.c:411: gfc_finish_var_decl: Assertion failed) PR fortran/15164 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to module procedures as if they were module variables. From-SVN: r90125 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-decl.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index da75178c..88acec9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2004-11-05 Tobias Schlueter + + 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 PR fortran/17535 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 2ac3dcc..c3e2bf0 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -410,9 +410,9 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym) 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; -- cgit v1.1