From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18844 invoked by alias); 26 Aug 2006 12:15:27 -0000 Received: (qmail 18453 invoked by uid 48); 26 Aug 2006 12:15:15 -0000 Date: Sat, 26 Aug 2006 12:15:00 -0000 Message-ID: <20060826121515.18452.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/28788] [gfortran: 4.1, 4.2 regression] ICE on valid code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "aovb94 at dsl dot pipex dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg02273.txt.bz2 List-Id: ------- Comment #13 from aovb94 at dsl dot pipex dot com 2006-08-26 12:15 ------- I'm getting an ICE and segmentation fault in the following code. I think it may be related to Paul Thomas's observation about pointers to components of derived type arrays. However, it does compile under these circumstances: * when foo and bar are not in the module * when the module contains foo or bar but not both * when the types a and b have no reference to each other * when ", only, a (or b)" is not used on the use statement MODULE type_mod TYPE a INTEGER :: n(10) END TYPE a ! TYPE b TYPE (a), POINTER :: m(:) => NULL () END TYPE b END MODULE type_mod MODULE seg_mod CONTAINS SUBROUTINE foo (x) USE type_mod, ONLY : a ! fails ! USE type_mod ! works IMPLICIT NONE TYPE (a) :: x ! RETURN END SUBROUTINE foo ! SUBROUTINE bar (x) USE type_mod, ONLY : b ! fails ! USE type_mod ! works IMPLICIT NONE TYPE (b) :: x ! RETURN END SUBROUTINE bar END MODULE seg_mod gfc -c type_mod.f95 seg_mod.f95 seg_mod.f95:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gfc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc/configure --enable-languages=c,fortran --prefix=/home/martin/GCC/usr/local --disable-nls --disable-multilib --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exception Thread model: posix gcc version 4.2.0 20060825 (experimental) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28788