public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/110421] New: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548
@ 2023-06-26 22:26 gronki at gmail dot com
  2023-06-26 22:28 ` [Bug fortran/110421] " gronki at gmail dot com
  2023-06-26 23:23 ` kargl at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: gronki at gmail dot com @ 2023-06-26 22:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

* [Bug fortran/110421] internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548
  2023-06-26 22:26 [Bug fortran/110421] New: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548 gronki at gmail dot com
@ 2023-06-26 22:28 ` gronki at gmail dot com
  2023-06-26 23:23 ` kargl at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: gronki at gmail dot com @ 2023-06-26 22:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Dominik Gronkiewicz <gronki at gmail dot com> ---
Actually the minimal example can be cut down even further, to not introduce
confusion:

program main

    implicit none

    type :: typ1
    end type

    type, extends(typ1) :: typ1a
    end type

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

    type(typ2) :: t2

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

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

end program

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

* [Bug fortran/110421] internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548
  2023-06-26 22:26 [Bug fortran/110421] New: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548 gronki at gmail dot com
  2023-06-26 22:28 ` [Bug fortran/110421] " gronki at gmail dot com
@ 2023-06-26 23:23 ` kargl at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-06-26 23:23 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
Looks like a duplicate of PR110415

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

end of thread, other threads:[~2023-06-26 23:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 22:26 [Bug fortran/110421] New: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1548 gronki at gmail dot com
2023-06-26 22:28 ` [Bug fortran/110421] " gronki at gmail dot com
2023-06-26 23:23 ` kargl 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).