aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2016-06-01 14:30:00 +0000
committerPaul Thomas <pault@gcc.gnu.org>2016-06-01 14:30:00 +0000
commit6442a6f43b4525a08526f9e55419f567a1af776c (patch)
treef09700eb58e6a8b3d0e9f95544d3f416715aad97 /gcc/fortran/resolve.c
parentab62397a1b51a925abf062999a96556241dc3478 (diff)
downloadgcc-6442a6f43b4525a08526f9e55419f567a1af776c.zip
gcc-6442a6f43b4525a08526f9e55419f567a1af776c.tar.gz
gcc-6442a6f43b4525a08526f9e55419f567a1af776c.tar.bz2
re PR fortran/71156 (PURE interface/definition inconsistency: accepts invalid, rejects valid)
2016-06-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/71156 * decl.c (copy_prefix): Add checks that the module procedure declaration prefixes are compliant with the interface. Invert order of existing elemental and pure checks. * resolve.c (resolve_fl_procedure): Invert order of elemental and pure errors. 2016-06-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/71156 * gfortran.dg/submodule_14.f08: Add missing recursive prefix to the module procedure declaration. * gfortran.dg/submodule_16.f08: New test. From-SVN: r236996
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 2c68af2..77f8c10 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -11965,17 +11965,17 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
goto check_formal;
/* Check the procedure characteristics. */
- if (sym->attr.pure != iface->attr.pure)
+ if (sym->attr.elemental != iface->attr.elemental)
{
- gfc_error ("Mismatch in PURE attribute between MODULE "
+ gfc_error ("Mismatch in ELEMENTAL attribute between MODULE "
"PROCEDURE at %L and its interface in %s",
&sym->declared_at, module_name);
return false;
}
- if (sym->attr.elemental != iface->attr.elemental)
+ if (sym->attr.pure != iface->attr.pure)
{
- gfc_error ("Mismatch in ELEMENTAL attribute between MODULE "
+ gfc_error ("Mismatch in PURE attribute between MODULE "
"PROCEDURE at %L and its interface in %s",
&sym->declared_at, module_name);
return false;