aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2007-11-18 17:35:12 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2007-11-18 17:35:12 +0100
commitb5bf3e4d2eb38960cc2c6ac3b4b6dda7fe27fd43 (patch)
tree51b77ebaab1959061a8ea69ccc3d628c2212051f /gcc/fortran
parent4ba480060a2ab5473b699f57f6f22665c59bff28 (diff)
downloadgcc-b5bf3e4d2eb38960cc2c6ac3b4b6dda7fe27fd43.zip
gcc-b5bf3e4d2eb38960cc2c6ac3b4b6dda7fe27fd43.tar.gz
gcc-b5bf3e4d2eb38960cc2c6ac3b4b6dda7fe27fd43.tar.bz2
re PR fortran/34137 (Module function with ENTRY rejected)
2007-11-18 Tobias Burnus <burnus@net-b.de> PR fortran/34137 * primary.c (match_variable): Reject non-result entry symbols. * resolve.c (resolve_contained_fntype): Do not check entry * master functions. 2007-11-18 Tobias Burnus <burnus@net-b.de> PR fortran/34137 * gfortran.dg/entry_14.f90: New. * gfortran.dg/entry_15.f90: New. From-SVN: r130270
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/primary.c3
-rw-r--r--gcc/fortran/resolve.c6
3 files changed, 12 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 526d89c..f95ca66 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2007-11-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34137
+ * primary.c (match_variable): Reject non-result entry symbols.
+ * resolve.c (resolve_contained_fntype): Do not check entry master
+ functions.
+
2007-11-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* trans-types.c (gfc_init_types): Use wider buffer.
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index d5e4b64..7e3d539 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2525,8 +2525,7 @@ match_variable (gfc_expr **result, int equiv_flag, int host_flag)
case FL_PROCEDURE:
/* Check for a nonrecursive function result */
- if (sym->attr.function && (sym->result == sym || sym->attr.entry)
- && !sym->attr.external)
+ if (sym->attr.function && sym->result == sym && !sym->attr.external)
{
/* If a function result is a derived type, then the derived
type may still have to be resolved. */
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 586d601..0d5e36e 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -284,8 +284,10 @@ resolve_contained_fntype (gfc_symbol *sym, gfc_namespace *ns)
{
try t;
- /* If this namespace is not a function, ignore it. */
- if (! sym || !(sym->attr.function || sym->attr.flavor == FL_VARIABLE))
+ /* If this namespace is not a function or an entry master function,
+ ignore it. */
+ if (! sym || !(sym->attr.function || sym->attr.flavor == FL_VARIABLE)
+ || sym->attr.entry_master)
return;
/* Try to find out of what the return type is. */