public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "abenson at caltech dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51754] New: [OOP] ICE on valid with class arrays Date: Wed, 04 Jan 2012 17:28:00 -0000 [thread overview] Message-ID: <bug-51754-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51754 Bug #: 51754 Summary: [OOP] ICE on valid with class arrays Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: abenson@caltech.edu This test case gives an ICE on valid related to class arrays: module test private type :: componentB end type componentB type :: treeNode class(componentB), allocatable, dimension(:) :: componentB end type treeNode contains function BGet(self) implicit none class(componentB), pointer :: BGet class(treeNode), intent(in) :: self select type (self) class is (treeNode) BGet => self%componentB(1) end select return end function BGet end module test $ gfortran -v Using built-in specs. COLLECT_GCC=/opt/gcc-4.7/bin/gfortran COLLECT_LTO_WRAPPER=/opt/gcc-4.7/libexec/gcc/x86_64-unknown-linux- gnu/4.7.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.7/configure --prefix=/opt/gcc-4.7 --enable- languages=c,c++,fortran --disable-multilib Thread model: posix gcc version 4.7.0 20120103 (experimental) (GCC) $ gfortran -c test.F90 -o test.o test.F90: In function ‘bget’: test.F90:19:0: internal compiler error: in gfc_conv_descriptor_offset, at fortran/trans-array.c:210 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. If I remove the "allocatable" I instead get: $ gfortran -c test.F90 -o test.o f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. If I remove the "dimension(:)" and change the pointer association to: BGet => self%componentB then it compiles successfully.
next reply other threads:[~2012-01-04 17:28 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-04 17:28 abenson at caltech dot edu [this message] 2012-01-21 19:22 ` [Bug fortran/51754] " burnus at gcc dot gnu.org 2012-01-21 20:19 ` burnus at gcc dot gnu.org 2012-01-27 23:06 ` dominiq at lps dot ens.fr 2012-01-28 10:06 ` burnus at gcc dot gnu.org 2012-01-28 12:04 ` dominiq at lps dot ens.fr 2012-01-28 12:39 ` dominiq at lps dot ens.fr 2012-01-28 14:20 ` burnus at gcc dot gnu.org 2012-01-29 15:55 ` mikael at gcc dot gnu.org 2012-01-29 16:15 ` mikael at gcc dot gnu.org 2012-01-29 19:42 ` burnus at gcc dot gnu.org 2012-02-02 23:12 ` mikael at gcc dot gnu.org 2012-02-05 10:37 ` burnus at gcc dot gnu.org 2012-02-06 4:14 ` abenson at caltech dot edu
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-51754-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: linkBe 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).