public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96909] New: ICE with nested polymorphic allocatable component
@ 2020-09-02 21:57 dlhough at gmail dot com
  2020-09-03  6:20 ` [Bug fortran/96909] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: dlhough at gmail dot com @ 2020-09-02 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96909
           Summary: ICE with nested polymorphic allocatable component
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dlhough at gmail dot com
  Target Milestone: ---

The following code compiles successfully if the "nest" component is declared as
type() rather than class().


module Test_m
   implicit none
   private

   type, public :: Test_t
      class(Test_t), allocatable :: nest 
   end type

end module



Command line output:

gfortran -v -save-temps -Wall -Wextra -c ../../test/TestAllocatableCopy.f90 
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl
--with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit
--enable-cet=auto --enable-checking=release --enable-clocale=gnu
--enable-default-pie --enable-default-ssp --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id
--enable-lto --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-libunwind-exceptions --disable-werror
gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-c' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/f951
../../test/TestAllocatableCopy.f90 -quiet -dumpbase TestAllocatableCopy.f90
-mtune=generic -march=x86-64 -auxbase TestAllocatableCopy -Wall -Wextra
-version -fintrinsic-modules-path
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h -o
TestAllocatableCopy.s
GNU Fortran (GCC) version 10.2.0 (x86_64-pc-linux-gnu)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.1.0, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 10.2.0 (x86_64-pc-linux-gnu)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.1.0, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
gfortran: internal compiler error: Segmentation fault signal terminated program
f951
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

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

* [Bug fortran/96909] ICE with nested polymorphic allocatable component
  2020-09-02 21:57 [Bug fortran/96909] New: ICE with nested polymorphic allocatable component dlhough at gmail dot com
@ 2020-09-03  6:20 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-03  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-09-03

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000bd20b4 in gfc_get_derived_type (derived=0x3812f20, codimen=0)
    at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2611
2611          if (TYPE_FIELDS (derived->backend_decl))
Missing separate debuginfos, use: zypper install
libgmp10-debuginfo-6.1.2-lp152.5.26.x86_64
libisl15-debuginfo-0.18-lp152.3.114.x86_64
libmpc3-debuginfo-1.1.0-lp152.3.114.x86_64
libmpfr6-debuginfo-4.0.1-lp152.3.113.x86_64
(gdb) bt
#0  0x0000000000bd20b4 in gfc_get_derived_type (derived=0x3812f20, codimen=0)
    at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2611
#1  0x0000000000bd2433 in gfc_get_derived_type (derived=0x3814070, codimen=0)
    at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2672
#2  0x0000000000bd2433 in gfc_get_derived_type (derived=0x3812f20, codimen=0)
    at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2672
#3  0x0000000000bd2433 in gfc_get_derived_type (derived=0x3814070, codimen=0)
    at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2672
....
#200000 0x0000000000bd2433 in gfc_get_derived_type (derived=0x3812f20, 
    codimen=0) at /home/rguenther/src/gcc2/gcc/fortran/trans-types.c:2672
2672              c->ts.u.derived->backend_decl = gfc_get_derived_type
(c->ts.u.derived,

endless recursion via this line.

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

end of thread, other threads:[~2020-09-03  6:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 21:57 [Bug fortran/96909] New: ICE with nested polymorphic allocatable component dlhough at gmail dot com
2020-09-03  6:20 ` [Bug fortran/96909] " rguenth 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).