aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2004-11-05 20:52:06 +0100
committerTobias Schlüter <tobi@gcc.gnu.org>2004-11-05 20:52:06 +0100
commitca0e9281da684a6f811dd602783dce9cbdbf1a7f (patch)
tree35e0a372f8a15728299a1415063229afbf1289db
parent88876c7cb434ed34d2293f1251769bfc3b4e7488 (diff)
downloadgcc-ca0e9281da684a6f811dd602783dce9cbdbf1a7f.zip
gcc-ca0e9281da684a6f811dd602783dce9cbdbf1a7f.tar.gz
gcc-ca0e9281da684a6f811dd602783dce9cbdbf1a7f.tar.bz2
re PR fortran/18111 (spurious warnings with -W -Wunused)
PR fortran/18111 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for hidden parameters. From-SVN: r90136
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 88acec9..fd89142 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+ PR fortran/18111
+ * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
+ hidden parameters.
+
+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.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index c3e2bf0..31ed219 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1135,6 +1135,7 @@ create_function_arglist (gfc_symbol * sym)
DECL_CONTEXT (parm) = fndecl;
DECL_ARG_TYPE (parm) = type;
TREE_READONLY (parm) = 1;
+ DECL_ARTIFICIAL (parm) = 1;
gfc_finish_decl (parm, NULL_TREE);
arglist = chainon (arglist, parm);
@@ -1162,6 +1163,7 @@ create_function_arglist (gfc_symbol * sym)
DECL_CONTEXT (length) = fndecl;
DECL_ARG_TYPE (length) = type;
TREE_READONLY (length) = 1;
+ DECL_ARTIFICIAL (length) = 1;
gfc_finish_decl (length, NULL_TREE);
}
}
@@ -1216,6 +1218,7 @@ create_function_arglist (gfc_symbol * sym)
arglist = chainon (arglist, length);
DECL_CONTEXT (length) = fndecl;
+ DECL_ARTIFICIAL (length) = 1;
DECL_ARG_TYPE (length) = type;
TREE_READONLY (length) = 1;
gfc_finish_decl (length, NULL_TREE);