aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2019-07-14 22:52:58 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2019-07-14 22:52:58 +0000
commit1b034a958d4255f1cf57463655b9c74ec1e329bb (patch)
treef8fb10ad522b358bed6b32e200069c3a57d816db /gcc/fortran/expr.c
parentc5e02838afa5a79091dc22b480951fc5effb42e6 (diff)
downloadgcc-1b034a958d4255f1cf57463655b9c74ec1e329bb.zip
gcc-1b034a958d4255f1cf57463655b9c74ec1e329bb.tar.gz
gcc-1b034a958d4255f1cf57463655b9c74ec1e329bb.tar.bz2
re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))
2019-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/87233 * expr.c (check_restricted): Relax constraint C1279 which was removed from F2008 and above. * gfortran.dg/initialization_14.f90: Modify to now pass by removing two dg-error commands. Added comments. * gfortran.dg/initialization_30.f90: New test that includes the two tests removed above with the 'dg-options -std=f95'. From-SVN: r273484
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index ec9e328..a164370 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3305,12 +3305,14 @@ check_restricted (gfc_expr *e)
restricted expression in an elemental procedure, it will have
already been simplified away once we get here. Therefore we
don't need to jump through hoops to distinguish valid from
- invalid cases. */
- if (sym->attr.dummy && sym->ns == gfc_current_ns
+ invalid cases. Allowed in F2008 and F2018. */
+ if (gfc_notification_std (GFC_STD_F2008)
+ && sym->attr.dummy && sym->ns == gfc_current_ns
&& sym->ns->proc_name && sym->ns->proc_name->attr.elemental)
{
- gfc_error ("Dummy argument %qs not allowed in expression at %L",
- sym->name, &e->where);
+ gfc_error_now ("Dummy argument %qs not "
+ "allowed in expression at %L",
+ sym->name, &e->where);
break;
}