From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18106 invoked by alias); 4 Jan 2012 17:28:39 -0000 Received: (qmail 18098 invoked by uid 22791); 4 Jan 2012 17:28:38 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Jan 2012 17:28:25 +0000 From: "abenson at caltech dot edu" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: abenson at caltech dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg00425.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D51754 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 =3D> self%componentB(1) end select return end function BGet end module test $ gfortran -v Using built-in specs. COLLECT_GCC=3D/opt/gcc-4.7/bin/gfortran COLLECT_LTO_WRAPPER=3D/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=3D/opt/gcc-4.7 --enable- languages=3Dc,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 =E2=80=98bget=E2=80=99: test.F90:19:0: internal compiler error: in gfc_conv_descriptor_offset, at=20 fortran/trans-array.c:210 Please submit a full bug report, with preprocessed source if appropriate. See 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 for instructions. If I remove the "dimension(:)" and change the pointer association to: BGet =3D> self%componentB then it compiles successfully.