From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20329 invoked by alias); 2 Nov 2012 00:44:15 -0000 Received: (qmail 20019 invoked by uid 48); 2 Nov 2012 00:44:02 -0000 From: "john.harper at vuw dot ac.nz" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55174] New: internal compiler error: Segmentation fault with bad array reference Date: Fri, 02 Nov 2012 00:44: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: john.harper at vuw dot ac.nz 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" 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-11/txt/msg00102.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55174 Bug #: 55174 Summary: internal compiler error: Segmentation fault with bad array reference Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: john.harper@vuw.ac.nz This 4-line Fortran program has an error at line 3, where array(*) is of course not permitted as an argument of a function. implicit none integer:: array(2)=(/42,666/) print *, size(array(*)) end Other compilers (g95, ifort) correctly diagnose the error but gfortran 4.8.0 gives an internal compiler error: Segmentation fault and asks me to tell you. My compile-time output follows. cayley[~/Jfh] % /local/scratch/gf/bin/gfortran -v trybadstar.f90 Driving: /local/scratch/gf/bin/gfortran -v trybadstar.f90 -l gfortran -l m -shared-libgcc Using built-in specs. COLLECT_GCC=/local/scratch/gf/bin/gfortran COLLECT_LTO_WRAPPER=/local/scratch/gf/libexec/gcc/i686-pc-linux-gnu/4.8.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: /local/scratch/gcc-4.8-20120701/configure --prefix=/local/scratch/gf --enable-languages=c,fortran --disable-libada --with-local-prefix=/local/scratch --with-gmp=/local/scratch Thread model: posix gcc version 4.8.0 20120701 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /local/scratch/gf/libexec/gcc/i686-pc-linux-gnu/4.8.0/f951 trybadstar.f90 -quiet -dumpbase trybadstar.f90 -mtune=generic -march=pentiumpro -auxbase trybadstar -version -fintrinsic-modules-path /local/scratch/gf/lib/gcc/i686-pc-linux-gnu/4.8.0/finclude -o /tmp/cccgAIgM.s GNU Fortran (GCC) version 4.8.0 20120701 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.8.0 20120701 (experimental), GMP version 5.0.5, MPFR version 3.1.0, MPC version 0.9 warning: GMP header version 5.0.5 differs from library version 5.0.3. warning: MPFR header version 3.1.0 differs from library version 3.1.0-p3. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU Fortran (GCC) version 4.8.0 20120701 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.8.0 20120701 (experimental), GMP version 5.0.5, MPFR version 3.1.0, MPC version 0.9 warning: GMP header version 5.0.5 differs from library version 5.0.3. warning: MPFR header version 3.1.0 differs from library version 3.1.0-p3. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. cayley[~/Jfh] %