aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2010-07-27 10:44:22 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2010-07-27 10:44:22 +0200
commitfb55ca75aed99996a52ea22ba5456c918e7e70c6 (patch)
tree806144f554b32c6d406d7bddc3f6676634069925 /gcc/fortran/trans.c
parentbec627e5aaa40fb2b5b11cb1e8bdda6b078e2b4c (diff)
downloadgcc-fb55ca75aed99996a52ea22ba5456c918e7e70c6.zip
gcc-fb55ca75aed99996a52ea22ba5456c918e7e70c6.tar.gz
gcc-fb55ca75aed99996a52ea22ba5456c918e7e70c6.tar.bz2
re PR fortran/40873 (-fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away)
2010-07-26 Tobias Burnus <burnus@net-b.de> PR fortran/40873 * trans-decl.c (gfc_get_extern_function_decl): Fix generation for functions which are later in the same file. (gfc_create_function_decl, build_function_decl, build_entry_thunks): Add global argument. * trans.c (gfc_generate_module_code): Update gfc_create_function_decl call. * trans.h (gfc_create_function_decl): Update prototype. * resolve.c (resolve_global_procedure): Also resolve for IFSRC_IFBODY. 2010-07-26 Tobias Burnus <burnus@net-b.de> PR fortran/40873 * gfortran.dg/whole_file_22.f90: New test. * gfortran.dg/whole_file_23.f90: New test. From-SVN: r162557
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 003f609..4bd4f3b 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1388,7 +1388,7 @@ gfc_generate_module_code (gfc_namespace * ns)
if (!n->proc_name)
continue;
- gfc_create_function_decl (n);
+ gfc_create_function_decl (n, false);
gcc_assert (DECL_CONTEXT (n->proc_name->backend_decl) == NULL_TREE);
DECL_CONTEXT (n->proc_name->backend_decl) = ns->proc_name->backend_decl;
gfc_module_add_decl (entry, n->proc_name->backend_decl);