mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:40:32 +08:00
re PR fortran/25071 (dummy argument larger than actual argument)
2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/25071 * interface.c (compare_actual_formal): Change warnings to errors when "Actual argument contains too few elements for dummy argument", unless -std=legacy is used. From-SVN: r253286
This commit is contained in:
parent
20ad05861e
commit
37d92a7e0e
@ -1,3 +1,10 @@
|
||||
2017-09-29 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/25071
|
||||
* interface.c (compare_actual_formal): Change warnings to errors
|
||||
when "Actual argument contains too few elements for dummy
|
||||
argument", unless -std=legacy is used.
|
||||
|
||||
2017-09-27 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* lang.opt <Wdo-subscript>: End help text with a period.
|
||||
|
@ -2991,11 +2991,20 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
|
||||
f->sym->name, actual_size, formal_size,
|
||||
&a->expr->where);
|
||||
else if (where)
|
||||
gfc_warning (OPT_Wargument_mismatch,
|
||||
"Actual argument contains too few "
|
||||
"elements for dummy argument %qs (%lu/%lu) at %L",
|
||||
f->sym->name, actual_size, formal_size,
|
||||
&a->expr->where);
|
||||
{
|
||||
/* Emit a warning for -std=legacy and an error otherwise. */
|
||||
if (gfc_option.warn_std == 0)
|
||||
gfc_warning (OPT_Wargument_mismatch,
|
||||
"Actual argument contains too few "
|
||||
"elements for dummy argument %qs (%lu/%lu) "
|
||||
"at %L", f->sym->name, actual_size,
|
||||
formal_size, &a->expr->where);
|
||||
else
|
||||
gfc_error_now ("Actual argument contains too few "
|
||||
"elements for dummy argument %qs (%lu/%lu) "
|
||||
"at %L", f->sym->name, actual_size,
|
||||
formal_size, &a->expr->where);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user