public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/41951] [OOP] Not diagnosing ambiguous operators (TB vs. INTERFACE)
Date: Fri, 16 Nov 2012 12:33:00 -0000 [thread overview]
Message-ID: <bug-41951-4-447RyV0C87@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-41951-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41951
--- Comment #17 from janus at gcc dot gnu.org 2012-11-16 12:33:00 UTC ---
(In reply to comment #16)
> One way to reject the abstract case in comment 11, would be to just do the
> checking, but not add the procedure to the operator list:
The only problem with the patch in comment 16 is that the error message it
gives on comment 11 ...
generic :: assignment(=) => assign
1
Error: Entity 'assign_it' at (1) is already present in the interface
... is technically not correct. 'assign_it' is not added twice, but in one case
is just the interface of the deferred type-boud procedure 'assign'. Instead, it
might be better to complain about 'Ambiguous interfaces' (since any
non-abstract extension of the type 'sort_t' will have to override/implement the
type-bound 'assign' with a procedure which is ambiguous to 'assign_it').
However, such an error about 'Ambiguous interfaces' is also missing for the
following case (which is still accepted):
module m_sort
implicit none
type, abstract :: sort_t
contains
generic :: assignment(=) => assign
procedure(assign_ifc), deferred :: assign
end type
abstract interface
subroutine assign_ifc (lhs, rhs)
import
class(sort_t), intent(out) :: lhs
class(sort_t), intent(in) :: rhs
end subroutine
end interface
interface assignment(=)
subroutine assign_it (lhs, rhs)
import
class(sort_t), intent(out) :: lhs
class(sort_t), intent(in) :: rhs
end subroutine
end interface
end module
prev parent reply other threads:[~2012-11-16 12:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-41951-4@http.gcc.gnu.org/bugzilla/>
2011-01-23 11:17 ` [Bug fortran/41951] [OOP] ICE in gfc_match_varspec, at fortran/primary.c:1815 tkoenig at gcc dot gnu.org
2011-01-23 13:02 ` dominiq at lps dot ens.fr
2011-12-12 8:07 ` burnus at gcc dot gnu.org
2011-12-12 13:29 ` burnus at gcc dot gnu.org
2011-12-13 12:04 ` burnus at gcc dot gnu.org
2011-12-16 14:32 ` burnus at gcc dot gnu.org
2012-01-17 8:49 ` [Bug fortran/41951] [OOP] Not diagnosing ambiguous operators (TB vs. INTERFACE) burnus at gcc dot gnu.org
2012-06-19 15:53 ` janus at gcc dot gnu.org
2012-06-23 13:54 ` janus at gcc dot gnu.org
2012-06-27 17:38 ` janus at gcc dot gnu.org
2012-06-27 17:54 ` janus at gcc dot gnu.org
2012-06-27 18:18 ` burnus at gcc dot gnu.org
2012-11-16 12:04 ` janus at gcc dot gnu.org
2012-11-16 12:33 ` janus at gcc dot gnu.org [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-41951-4-447RyV0C87@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).