public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mandrew9 at vt dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67933] New: [4.9/5/Trunk Regression] ICE for array of a derived type with allocatable class in derived type object
Date: Mon, 12 Oct 2015 14:06:00 -0000	[thread overview]
Message-ID: <bug-67933-4@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2015-10-12 14:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 14:06 mandrew9 at vt dot edu [this message]
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

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-67933-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).