public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105038] New: Improve error message for recursive type
@ 2022-03-23 20:23 vivekrao4 at yahoo dot com
  0 siblings, 0 replies; only message in thread
From: vivekrao4 at yahoo dot com @ 2022-03-23 20:23 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-23 20:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 20:23 [Bug fortran/105038] New: Improve error message for recursive type vivekrao4 at yahoo dot com

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).