This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/28788] New: [gfortran: 4.1, 4.2 regression] ICE on valid code


Current gfortran (trunk and head of 4.1 branch) segfaults when compiling the
following code:

module Precision
  integer, parameter :: dl = KIND(1.d0)
end module Precision

module ModelParams
use precision

type CAMBparams
  real(dl)::omegab,h0,tcmb,yhe
end type

type (CAMBparams) :: CP

contains

subroutine CAMBParams_Set(P)
  type(CAMBparams), intent(in) :: P
end subroutine CAMBParams_Set

end module ModelParams

module TimeSteps
use precision
use ModelParams

end module TimeSteps

module ThermoData
use TimeSteps
contains
subroutine inithermo(taumin,taumax)
  use precision
  use ModelParams
  real(dl) taumin,taumax

  call InitRECFAST(CP%omegab,CP%h0,CP%tcmb,CP%yhe)
end subroutine inithermo

end module ThermoData

martin@linux:~/tmp> gfortran -v -c modules.F90
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/martin/software/gcc/configure --disable-multilib
--with-gmp=/home/martin/software/mygmp --with-mpfr=/home/martin/software/mympfr
--prefix=/home/martin/software/ugcc --enable-languages=c++,fortran
--enable-checking=release
Thread model: posix
gcc version 4.2.0 20060821 (experimental)
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/cc1 -E
-lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v modules.F90
-mtune=generic -o /tmp/ccNsJVqs.f95
ignoring nonexistent directory
"/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/martin/software/ugcc/include
 /home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include
 /usr/include
End of search list.
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951
/tmp/ccNsJVqs.f95 -ffree-form -quiet -dumpbase modules.F90 -mtune=generic
-auxbase modules -version -fpreprocessed -I
/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/finclude -o
/tmp/cciJjRCJ.s
GNU F95 version 4.2.0 20060821 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20060821 (experimental).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128005
 In file modules.F90:33

  use ModelParams
                1
modules.F90:16: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


This problem was not present a few days ago, and it is quite elusive. Even
adding or removing a few "!innocent" lines can change the error message,
e.g. to something like

 In file modules.F90:43

        use ModelParams
                      1
Error: The derived type 'p' at (1) is of type '', which has not been defined.

which makes no sense.


-- 
           Summary: [gfortran: 4.1, 4.2 regression] ICE on valid code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]