https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105038
Bug ID: 105038
Summary: Improve error message for recursive type
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: vivekrao4 at yahoo dot com
Target Milestone: ---
For the code
module m
implicit none
type :: t
integer :: i
type(t) :: x
end type t
end module m
gfortran says
recursive_type.f90:5:15:
5 | type(t) :: x
| 1
Error: Component at (1) must have the POINTER attribute
but the code compiles if x has either the POINTER or ALLOCATABLE attribute, and
the error message should reflect this.