This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25071] dummy argument larger than actual argument
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 09:16:50 +0000
- Subject: [Bug fortran/25071] dummy argument larger than actual argument
- Auto-submitted: auto-generated
- References: <bug-25071-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-27 09:16:47 UTC ---
(In reply to comment #7)
> Sorry for being 'a bit' late with comments, but IMHO this should be an error
> and not just a warning, because
>
> 2) Other compilers reject it (so we can't argue that we must support this
> common extension)
Well, ifort and pathscale compile w/o warning and g95 with just a warning the
example at: gfortran.fortran-torture/execute/st_function.f90
Thus, for compare_actual_formal I would make a distinction between:
/* Special case for character arguments. For allocatable, pointer
and assumed-shape dummies, the string length needs to match
exactly. */
where I agree that at least for pointer and allocatable an error should be
printed - but probably also for assumed-shape dummies.
And to
if (actual_size != 0
&& actual_size < formal_size
&& a->expr->ts.type != BT_PROCEDURE)
which can be less problematic and where a warning might be sufficient.