public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55174] New: internal compiler error: Segmentation fault with bad array reference
@ 2012-11-02  0:44 john.harper at vuw dot ac.nz
  2012-11-02  2:57 ` [Bug fortran/55174] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: john.harper at vuw dot ac.nz @ 2012-11-02  0:44 UTC (permalink / raw)
  To: gcc-bugs


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 <http://gcc.gnu.org/bugs.html> for instructions.
cayley[~/Jfh] %


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-05  0:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02  0:44 [Bug fortran/55174] New: internal compiler error: Segmentation fault with bad array reference john.harper at vuw dot ac.nz
2012-11-02  2:57 ` [Bug fortran/55174] " kargl at gcc dot gnu.org
2012-11-02 10:55 ` [Bug fortran/55174] [4.6 Regression] " janus at gcc dot gnu.org
2012-11-04 20:41 ` harper at msor dot vuw.ac.nz
2012-11-04 22:23 ` janus at gcc dot gnu.org
2012-11-05  0:03 ` harper at msor dot vuw.ac.nz
2012-11-05  0:52 ` harper at msor dot vuw.ac.nz

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