public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67933] New: [4.9/5/Trunk Regression] ICE for array of a derived type with allocatable class in derived type object
@ 2015-10-12 14:06 mandrew9 at vt dot edu
  2015-10-13  9:36 ` [Bug fortran/67933] [4.9/5/6 " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: mandrew9 at vt dot edu @ 2015-10-12 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67933
           Summary: [4.9/5/Trunk Regression] ICE for array of a derived
                    type with allocatable class in derived type object
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mandrew9 at vt dot edu
  Target Milestone: ---

Created attachment 36482
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36482&action=edit
small test case (source code)

Description: 
Create a derived type object (list_t) that contains an array of a derived type
(wrapper_t). This derived type (wrapper_t) contains an allocatable class
(class_t). Whenever the object is referenced (as in Method), an ICE is thrown.
Replacing the allocatable class in the derived type (wrapper_t) with an
allocatable derived type or primitive type allows the module to compile.

test_mod.f95 (Also attached):
========================================
module test_mod
  implicit none

  type :: class_t
  end type class_t

  type :: wrapper_t
    class(class_t), allocatable  :: class_var
!    type(class_t), allocatable  :: class_var
!    integer,       allocatable  :: class_id
  end type wrapper_t

  type :: list_t
    type(wrapper_t) :: classes(10)
  contains
    procedure :: Method
  end type list_t

contains
  subroutine Method(this)
    class(list_t) :: this
  contains
    ! Do stuff
  end subroutine Method
end module test_mod
========================================
Compiler:     gcc version 4.9.3/5/Trunk
System:       x86_64-redhat-linux
========================================
Command line: gfortran test_mod.f95
Output (with gcc 6.0.0 20151009 (experimental)): 
test_mod.f95:23:0:

 end module test_mod
1
internal compiler error: in gfc_conv_expr_descriptor, at
fortran/trans-array.c:6684
0x6aabeb gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
        ../../../packages/gcc_svn/gcc/fortran/trans-array.c:6684
0x6cf613 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
        ../../../packages/gcc_svn/gcc/fortran/trans-expr.c:7854
0x6cfd1e gfc_reset_vptr(stmtblock_t*, gfc_expr*)
        ../../../packages/gcc_svn/gcc/fortran/trans-expr.c:360
0x6fc495 gfc_trans_deallocate(gfc_code*)
        ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:6070
0x698937 trans_code
        ../../../packages/gcc_svn/gcc/fortran/trans.c:1802
0x6f1f63 gfc_trans_if_1
        ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1106
0x6f821a gfc_trans_if(gfc_code*)
        ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1137
0x698a27 trans_code
        ../../../packages/gcc_svn/gcc/fortran/trans.c:1740
0x6f9611 gfc_trans_simple_do
        ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1671
0x6f9611 gfc_trans_do(gfc_code*, tree_node*)
        ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1834
0x6989fa trans_code
        ../../../packages/gcc_svn/gcc/fortran/trans.c:1752
0x6bb963 gfc_generate_function_code(gfc_namespace*)
        ../../../packages/gcc_svn/gcc/fortran/trans-decl.c:5900
0x69bcc1 gfc_generate_module_code(gfc_namespace*)
        ../../../packages/gcc_svn/gcc/fortran/trans.c:2014
0x65554d translate_all_program_units
        ../../../packages/gcc_svn/gcc/fortran/parse.c:5533
0x65554d gfc_parse_file()
        ../../../packages/gcc_svn/gcc/fortran/parse.c:5752
0x695cf2 gfc_be_parse_file
        ../../../packages/gcc_svn/gcc/fortran/f95-lang.c:209
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
========================================
Configured with: ../../packages/gcc_svn/configure
--prefix=/l/mandrew9/Software/installs/gcc/gcc-trunk --with-cpu=generic
--build=x86_64-redhat-linux --enable-threads=posix --enable-checking=release
--enable-languages=fortran,c,c++ --disable-multilib


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

end of thread, other threads:[~2015-10-28 19:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 14:06 [Bug fortran/67933] New: [4.9/5/Trunk Regression] ICE for array of a derived type with allocatable class in derived type object mandrew9 at vt dot edu
2015-10-13  9:36 ` [Bug fortran/67933] [4.9/5/6 " rguenth at gcc dot gnu.org
2015-10-13  9:55 ` dominiq at lps dot ens.fr
2015-10-18 21:30 ` mikael at gcc dot gnu.org
2015-10-19 14:29 ` pault at gcc dot gnu.org
2015-10-20 15:06 ` mikael at gcc dot gnu.org
2015-10-26 18:01 ` [Bug fortran/67933] [5/6 " pault at gcc dot gnu.org
2015-10-28  9:10 ` [Bug fortran/67933] [5 " schwab@linux-m68k.org
2015-10-28  9:27 ` paul.richard.thomas at gmail dot com
2015-10-28 19:29 ` pault 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).