[Bug fortran/78443] [OOP] Incorrect behavior with non_overridable keyword
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 21 21:58:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78443
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |ASSIGNED
Resolution|FIXED |---
--- Comment #4 from janus at gcc dot gnu.org ---
Here is an improved patch:
===================================================================
--- gcc/fortran/class.c (Revision 242657)
+++ gcc/fortran/class.c (Arbeitskopie)
@@ -751,7 +751,7 @@ add_proc_comp (gfc_symbol *vtype, const char *name
{
gfc_component *c;
- if (tb->non_overridable)
+ if (tb->non_overridable && !tb->overridden)
return;
c = gfc_find_component (vtype, name, true, true, NULL);
It gives the same output and regtests cleanly as well.
More information about the Gcc-bugs
mailing list