aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/pr67524.f9020
4 files changed, 35 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e309724..e01c4bf 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-05 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/67524
+ * resolve.c (resolve_symbol): Don't apply default type rules to
+ mixed-entry master created for function entry points.
+
2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66643
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 7b068f9..ddd9d74 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -13886,7 +13886,10 @@ resolve_symbol (gfc_symbol *sym)
/* The specific case of an external procedure should emit an error
in the case that there is no implicit type. */
if (!mp_flag)
- gfc_set_default_type (sym, sym->attr.external, NULL);
+ {
+ if (!sym->attr.mixed_entry_master)
+ gfc_set_default_type (sym, sym->attr.external, NULL);
+ }
else
{
/* Result may be in another namespace. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 54d64ee..653dee5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-05 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/67524
+ * gfortran.dg/pr67524.f90: New test.
+
2016-10-05 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/77823
diff --git a/gcc/testsuite/gfortran.dg/pr67524.f90 b/gcc/testsuite/gfortran.dg/pr67524.f90
new file mode 100644
index 0000000..6f5440f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr67524.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+module m
+ implicit character(8) (a-z)
+contains
+ function f(x)
+ integer :: x
+ integer :: f
+ real :: e
+ f = x
+ return
+ entry e(x)
+ e = x
+ end
+end module
+
+program p
+ use m
+ if (f(1) /= 1) call abort
+ if (e(1) /= 1.0) call abort
+end