public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "oliverjahn at proton dot me" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/102241] [PDT] ICE when declaring derived type with a parameterized derived type member
Date: Fri, 10 May 2024 17:30:53 +0000	[thread overview]
Message-ID: <bug-102241-4-y0IMUVQTQB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102241-4@http.gcc.gnu.org/bugzilla/>

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

Oliver Jahn <oliverjahn at proton dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliverjahn at proton dot me

--- Comment #4 from Oliver Jahn <oliverjahn at proton dot me> ---
Same error with gfortran 14.1.0 on x86_64-pc-linux-gnu.  Not sure it helps, but
I can get an error message instead of ICE if I use the pointer version of the
t2 type in a module subroutine:

    MODULE mo
      TYPE t1(n)
        INTEGER, LEN :: n
        INTEGER :: a(n)
      END TYPE

      TYPE t2
        TYPE(t1(1)), POINTER :: p_t1
      END TYPE

      type(t1(1)), target :: t
      type(t2) :: pt

    CONTAINS

      SUBROUTINE SR
        pt%p_t1 => t
      END SUBROUTINE
    END MODULE

gives

mo.f90:17:8:

   17 |         pt%p_t1 => t
      |        1
Error: Different types in pointer assignment at (1); attempted assignment of
TYPE(Pdtt1) to TYPE(t1)

and the same with deferred type parameter in t2.

      parent reply	other threads:[~2024-05-10 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 15:21 [Bug fortran/102241] New: " roland_wirth at web dot de
2022-10-21 10:24 ` [Bug fortran/102241] " massoustephane at gmail dot com
2022-10-21 17:07 ` [Bug fortran/102241] [PDT] " anlauf at gcc dot gnu.org
2023-06-30  8:25 ` pault at gcc dot gnu.org
2024-05-10 17:30 ` oliverjahn at proton dot me [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102241-4-y0IMUVQTQB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).