public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/105807] ICE / error when defining a class containing polymorphic components
Date: Tue, 21 Jun 2022 18:48:30 +0000	[thread overview]
Message-ID: <bug-105807-4-RJW4T4j6nV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105807-4@http.gcc.gnu.org/bugzilla/>

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

G. Steinmetz <gscfq@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gscfq@t-online.de

--- Comment #2 from G. Steinmetz <gscfq@t-online.de> ---

Some simplified versions :


$ cat z1.f90
program p
    type, abstract :: t
    end type
    type, abstract :: t2
        integer :: n
        class(t), allocatable :: v
    end type
    type, extends(t2) :: elem2d
    end type
    type, extends(t) :: vect3d
    end type
    type(vect3d) :: b
    class(t2), allocatable :: e
    e = elem2d(10,b)
end program


$ cat z2.f90
program p
    type t
    end type
    type t2
        integer :: n
        class(t), allocatable :: v
    end type
    type, extends(t2) :: elem2d
    end type
    type, extends(t) :: vect3d
    end type
    type(vect3d) :: b
    class(t2), allocatable :: e
    e = elem2d(10,b)
end program


$ gfortran-13-20220619 -c z1.f90
z1.f90:14:20:

   14 |     e = elem2d(10,b)
      |                    1
internal compiler error: in fold_convert_loc, at fold-const.cc:2593
0x9c67b3 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.cc:2593
0x7eb806 gfc_trans_subcomponent_assign
        ../../gcc/fortran/trans-expr.cc:9004
0x7ec3bb gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
        ../../gcc/fortran/trans-expr.cc:9197
0x7ebec2 gfc_trans_subcomponent_assign
        ../../gcc/fortran/trans-expr.cc:9021
0x7ec3bb gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
        ../../gcc/fortran/trans-expr.cc:9197
0x7e4970 gfc_conv_structure(gfc_se*, gfc_expr*, int)
        ../../gcc/fortran/trans-expr.cc:9264
0x7e4cfc gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.cc:9432
0x7f5f91 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.cc:11700
0x7b3b67 trans_code
        ../../gcc/fortran/trans.cc:1950
0x7dd0be gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:7654
0x75f53e translate_all_program_units
        ../../gcc/fortran/parse.cc:6669
0x75f53e gfc_parse_file()
        ../../gcc/fortran/parse.cc:6956
0x7acb6f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

  parent reply	other threads:[~2022-06-21 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 18:45 [Bug fortran/105807] New: " bourdin at mcmaster dot ca
2022-06-16 12:53 ` [Bug fortran/105807] " marxin at gcc dot gnu.org
2022-06-21 18:48 ` gscfq@t-online.de [this message]
2022-06-23 15:38 ` gscfq@t-online.de
2023-01-25  3:42 ` abensonca 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-105807-4-RJW4T4j6nV@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).