This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40276] Matching GENERIC procedure: Wrong INTENT should give directly an error message
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2009 21:40:23 -0000
- Subject: [Bug fortran/40276] Matching GENERIC procedure: Wrong INTENT should give directly an error message
- References: <bug-40276-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2009-05-27 21:40 -------
Created an attachment (id=17922)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17922&action=view)
Very initial draft patch
Some patch; now it prints:
call gen(sub)
1
Error: Type/rank mismatch in argument 'a' at (1)
Maybe together with the patch which gives better error messages this will
produce something useful. Currently it is better than before, but only
marginally. I think it should state somewhere that the generic procedure
matches a specific one (and only the INTENT goes wrong). I think it should
print somewhere the procedure name of the specific function. With all the
recursion, having a proper error message is not trivial.
I had to remove the intents_check() as it does not do recursive checks. And I
could not easily do a a recursive call as then one has two formal arguments
rather than a formal and an actual arguments.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40276