aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2011-04-17 09:34:35 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2011-04-17 09:34:35 +0200
commit0a826db38e1d2e64803226194b3648ce79badf88 (patch)
treee241bc83a7dce6b2cb047364129288463120e6ee /gcc
parentb183e9e0797c43ac6f8a87f044d385f4cd6dbed9 (diff)
downloadgcc-0a826db38e1d2e64803226194b3648ce79badf88.zip
gcc-0a826db38e1d2e64803226194b3648ce79badf88.tar.gz
gcc-0a826db38e1d2e64803226194b3648ce79badf88.tar.bz2
re PR fortran/48624 (gfortran DECL issues in function declaration)
2011-05-17 Tobias Burnus <burnus@net-b.de> PR fortran/48624 * trans-decl.c (gfc_get_extern_function_decl): Fix decl for external procedures with proc arguments. From-SVN: r172604
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c18
2 files changed, 6 insertions, 18 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 7742616..cdb53e7 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48624
+ * trans-decl.c (gfc_get_extern_function_decl): Fix decl
+ for external procedures with proc arguments.
+
2011-04-15 Michael Matz <matz@suse.de>
* trans-array.c (toplevel): Include gimple.h.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 784dfc8..866720f 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1527,7 +1527,6 @@ gfc_get_extern_function_decl (gfc_symbol * sym)
tree name;
tree mangled_name;
gfc_gsymbol *gsym;
- bool proc_formal_arg;
if (sym->backend_decl)
return sym->backend_decl;
@@ -1544,27 +1543,10 @@ gfc_get_extern_function_decl (gfc_symbol * sym)
return the backend_decl. */
gsym = gfc_find_gsymbol (gfc_gsym_root, sym->name);
- /* Do not use procedures that have a procedure argument because this
- can result in problems of multiple decls during inlining. */
- proc_formal_arg = false;
- if (gsym && gsym->ns && gsym->ns->proc_name)
- {
- gfc_formal_arglist *formal = gsym->ns->proc_name->formal;
- for (; formal; formal = formal->next)
- {
- if (formal->sym && formal->sym->attr.flavor == FL_PROCEDURE)
- {
- proc_formal_arg = true;
- break;
- }
- }
- }
-
if (gfc_option.flag_whole_file
&& (!sym->attr.use_assoc || sym->attr.if_source != IFSRC_DECL)
&& !sym->backend_decl
&& gsym && gsym->ns
- && !proc_formal_arg
&& ((gsym->type == GSYM_SUBROUTINE) || (gsym->type == GSYM_FUNCTION))
&& (gsym->ns->proc_name->backend_decl || !sym->attr.intrinsic))
{