public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49472] New: [gfortran, 4.7 regression] Compiler segfault on valid code
@ 2011-06-20 11:05 martin@mpa-garching.mpg.de
  2011-06-20 11:31 ` [Bug fortran/49472] " dominiq at lps dot ens.fr
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: martin@mpa-garching.mpg.de @ 2011-06-20 11:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49472

           Summary: [gfortran, 4.7 regression] Compiler segfault on valid
                    code
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: martin@mpa-garching.mpg.de


When trying to compile the code below with gfortran 4.7 and a specific set of
flags, the compiler segfaults:

/scratch/martin/tmp/planck/lsclean>gfortran -v -g -O -ffast-math -c
CAMB/modules.f90
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /scratch/martin/gcc/configure --disable-bootstrap
--disable-graphite --enable-gold --enable-plugins
--prefix=/afs/mpa/data/martin/ugcc --with-libelf=/afs/mpa/data/martin/numlibs64
--enable-languages=c++,fortran --enable-target=all --enable-checking=release
Thread model: posix
gcc version 4.7.0 20110620 (experimental) [trunk revision 175202] (GCC) 
COLLECT_GCC_OPTIONS='-v' '-g' '-O' '-ffast-math' '-c' '-mtune=generic'
'-march=x86-64'
 /afs/mpa/data/martin/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/f951
CAMB/modules.f90 -quiet -dumpbase modules.f90 -mtune=generic -march=x86-64
-auxbase modules -g -O -version -ffast-math -fintrinsic-modules-path
/afs/mpa/data/martin/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/finclude -o
/tmp/ccHb3jKV.s
GNU Fortran (GCC) version 4.7.0 20110620 (experimental) [trunk revision 175202]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.7.0 20110620 (experimental) [trunk revision 175202]
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
gfortran: internal compiler error: Segmentation fault (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The code compiles without complaint with gfortran 4.5.2 and the head of the 4.6
branch.


    module MassiveNu
      implicit none
        private

      integer, parameter :: dl = KIND(1.d0)
          real(dl), dimension(:), allocatable ::  r1,p1,dr1,dp1,ddr1,qdn

          real(dl), parameter :: dq=1._dl
          integer, parameter :: nqmax0=15 !number of q to sample for each l

          integer nqmax

       contains

        subroutine Nu_derivs(am,adotoa,rhonu,rhonudot,shearnudot,psi2,psi2dot)
        real(dl) psi2(nqmax0),psi2dot(nqmax0)

        real(dl) g1(nqmax0+1)
        real(dl) adotoa,rhonu,rhonudot,shearnudot
        real(dl) aq,q,v,d,aqdot,vdot,g0
        real(dl), intent(IN) :: am
        integer iq

        do iq=2,(nqmax0+1)
            q=(iq-1.5d0)*dq
            aq=am/q
            aqdot=aq*adotoa
            v=1._dl/sqrt(1._dl+aq*aq)
            vdot=-aq*aqdot/(1._dl+aq*aq)**1.5d0
            g1(iq)=qdn(iq-1)*(psi2dot(iq-1)*v+psi2(iq-1)*vdot)
        end do
        call splint(g1,g0,nqmax0+1)

        end subroutine Nu_derivs

      end module MassiveNu


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

end of thread, other threads:[~2011-07-04 21:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-20 11:05 [Bug fortran/49472] New: [gfortran, 4.7 regression] Compiler segfault on valid code martin@mpa-garching.mpg.de
2011-06-20 11:31 ` [Bug fortran/49472] " dominiq at lps dot ens.fr
2011-06-20 11:55 ` [Bug rtl-optimization/49472] [4.7 " rguenth at gcc dot gnu.org
2011-06-20 12:13 ` janus at gcc dot gnu.org
2011-06-20 14:13 ` dominiq at lps dot ens.fr
2011-06-20 14:18 ` dominiq at lps dot ens.fr
2011-06-20 15:18 ` wschmidt at gcc dot gnu.org
2011-06-20 15:19 ` wschmidt at gcc dot gnu.org
2011-06-20 16:09 ` jakub at gcc dot gnu.org
2011-06-21  7:52 ` jakub at gcc dot gnu.org
2011-06-21  8:33 ` ebotcazou at gcc dot gnu.org
2011-07-04 10:28 ` jakub at gcc dot gnu.org
2011-07-04 18:54 ` jakub at gcc dot gnu.org
2011-07-04 18:57 ` jakub at gcc dot gnu.org
2011-07-04 21:12 ` jakub at gcc dot gnu.org

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