public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/99585] New: ICE with SIZE intrinsic on nested derived type components
Date: Sun, 14 Mar 2021 19:45:23 +0000	[thread overview]
Message-ID: <bug-99585-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99585
           Summary: ICE with SIZE intrinsic on nested derived type
                    components
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

As reported by Tobias Burnus in

https://gcc.gnu.org/pipermail/fortran/2021-March/055815.html

the following code ICEs with all gcc since at least 7:

module m
  type t
     class(*), pointer :: bar(:)
  end type
  type t2
     class(t), allocatable :: my(:)
  end type t2
contains
  function f (x, y) result(z)
    class(t) :: x(:)
    class(t) :: y(size(x(1)%bar))
    type(t)  :: z(size(x(1)%bar))
  end
  function g (x) result(z)
    class(t) :: x(:)
    type(t)  :: z(size(x(1)%bar))
  end
  subroutine s ()
    class(t2), allocatable :: a(:), b(:), c(:), d(:)
    class(t2), pointer     :: p(:)
    c(1)%my = f (a(1)%my, b(1)%my)
    d(1)%my = g (p(1)%my)
  end
end

             reply	other threads:[~2021-03-14 19:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 19:45 anlauf at gcc dot gnu.org [this message]
2021-03-14 19:46 ` [Bug fortran/99585] " anlauf at gcc dot gnu.org
2021-03-14 20:27 ` anlauf at gcc dot gnu.org
2021-03-14 21:06 ` anlauf at gcc dot gnu.org
2021-03-15  9:07 ` marxin at gcc dot gnu.org
2022-03-07 21:12 ` cvs-commit at gcc dot gnu.org
2022-03-19  7:49 ` cvs-commit at gcc dot gnu.org
2023-08-27 19:48 ` anlauf at gcc dot gnu.org

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-99585-4@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).