This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41951] [OOP] ICE in gfc_match_varspec, at fortran/primary.c:1815
- 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: Tue, 13 Dec 2011 11:40:51 +0000
- Subject: [Bug fortran/41951] [OOP] ICE in gfc_match_varspec, at fortran/primary.c:1815
- Auto-submitted: auto-generated
- References: <bug-41951-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41951
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-13 11:40:51 UTC ---
(In reply to comment #6)
> Given that NAG 5.2 compiles it and as "assign" is only called via
> "assignment(=)", there must be some issue with the assignment resolution.
Actually, I wonder whether the code is valid. One has:
type, abstract :: sort_t
contains
generic :: assignment(=) => assign
...
interface assignment(=)
procedure assign
end interface
Thus, one defines twice a generic name with the same (= identical) interface,
once as TBP and once as external procedure. Thus, when one encounters:
tmp = a(i)
the compiler has the choice between "assign_" and "tmp->_vtab->assign".
I failed to nail it in the standard, but I am sure that "12.4.3.4.5
Restrictions on generic declarations" somehow must apply.