https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89067
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to Antony Lewis from comment #1) > The error message on this code > > subroutine test > type x > end type > type, extends(x):: y > integer ii > end type > type(y) yy > > yy%i=1 > end subroutine > > is > > > Error: 'i' at (1) is not a member of the 'x' structure > > But it should refer to the 'y' structure, not the base class 'x'. Obviously > minor and low priority, but more less helpful if y is a deep derived class. This error can be considered to be correct. During parsing 'i' is found not to be a component in 'y', so the compiler goes the next level up and find that 'i' is not a component in 'x'. So, the component is not found in the upper-most level and therefore is an invalid reference. This should be closed as WONTFIX.