public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102112] New: Cannot associate with component of associate target
@ 2021-08-27 23:01 everythingfunctional at protonmail dot com
  2023-06-01  8:14 ` [Bug fortran/102112] " pault at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: everythingfunctional at protonmail dot com @ 2021-08-27 23:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102112

            Bug ID: 102112
           Summary: Cannot associate with component of associate target
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: everythingfunctional at protonmail dot com
  Target Milestone: ---

I'm using version Ubuntu 11.1.0-1ubuntu1~21.04 on Pop!OS.

The compiler is rejecting valid code using associate, in this instance when
trying to associate to a component of a target in an associate. Note that this
also occurs when calling a type-bound procedure of the target.

program main
    implicit none

    type :: sub_t
        integer :: val
    end type

    type :: obj_t
        type(sub_t) :: sub_obj
    end type

    associate(initial_sub => sub_t(42))
        associate(obj => obj_t(initial_sub))
            associate(sub_obj => obj%sub_obj)
            end associate
        end associate
    end associate
end program

gives

app/main.f90:14:33:

   14 |             associate(sub_obj => obj%sub_obj)
      |                                 1
Error: Invalid association target at (1)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-27  8:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:01 [Bug fortran/102112] New: Cannot associate with component of associate target everythingfunctional at protonmail dot com
2023-06-01  8:14 ` [Bug fortran/102112] " pault at gcc dot gnu.org
2023-06-02  7:42 ` cvs-commit at gcc dot gnu.org
2023-06-02  8:41 ` pault at gcc dot gnu.org
2023-08-27  8:51 ` cvs-commit at gcc dot gnu.org

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