public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gronki at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/110421] New: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548
Date: Mon, 26 Jun 2023 22:26:46 +0000	[thread overview]
Message-ID: <bug-110421-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 110421
           Summary: internal compiler error: in gfc_get_symbol_decl, at
                    fortran/trans-decl.cc:1548
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gronki at gmail dot com
  Target Milestone: ---

Reporting an ICE I encounter.

Test code:

program main

    implicit none

    type :: typ1
        integer :: i
    end type

    type, extends(typ1) :: typ1a
    end type

    type :: typ2
        class(typ1), allocatable :: t1
    end type

    type(typ2) :: t2

    ! works
    t2 = typ2(t1=typ1(1))

    ! crash
    t2 = typ2(t1=typ1a(1))

end program

Error:

gfortran -v -save-temps test.f90 
Driving: gfortran -v -save-temps test.f90 -l gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --enable-libstdcxx-backtrace
--with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-13.1.1-20230614/obj-x86_64-redhat-linux/isl-install
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-offload-defaulted --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
--with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.1 20230614 (Red Hat 13.1.1-4) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-shared-libgcc' '-mtune=generic'
'-march=x86-64' '-dumpdir' 'a-'
 /usr/libexec/gcc/x86_64-redhat-linux/13/f951 test.f90 -quiet -dumpdir a-
-dumpbase test.f90 -dumpbase-ext .f90 -mtune=generic -march=x86-64 -version
-fintrinsic-modules-path /usr/lib/gcc/x86_64-redhat-linux/13/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h -o a-test.s
GNU Fortran (GCC) version 13.1.1 20230614 (Red Hat 13.1.1-4)
(x86_64-redhat-linux)
        compiled by GNU C version 13.1.1 20230614 (Red Hat 13.1.1-4), GMP
version 6.2.1, MPFR version 4.1.1-p1, MPC version 1.3.1, isl version
isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.f90:22:26:

   22 |     t2 = typ2(t1=typ1a(1))
      |                          1
internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

Thank you very much!
Dominik

             reply	other threads:[~2023-06-26 22:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 22:26 gronki at gmail dot com [this message]
2023-06-26 22:28 ` [Bug fortran/110421] " gronki at gmail dot com
2023-06-26 23:23 ` kargl 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-110421-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).