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/17588] New: segfault with multiply included module with uninitialized vector


The following and attached code produces a segmentation fault, every further
reduction resolved the problem. Code compiles fine with g95, pgf, nag, xlf

> gfortran -c inc_mod_definition.f90 && gfortran -c inc_mod_function.f90 &&
gfortran testcase_doubleincludedmodule.f90

Driving: gfortran -v -da -Q testcase_doubleincludedmodule.f90 -lgfortranbegin
-lgfortran -lm -shared-libgcc
Reading specs from /private/icg126/opt/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ./configure --prefix=/private/icg126/opt --enable-languages=f95
--enable-checking : (reconfigured) ./configure --prefix=/private/icg126/opt
--enable-languages=f95 --enable-checking
Thread model: posix
gcc version 4.0.0 20040921 (experimental)
 /private/icg126/opt/libexec/gcc/i686-pc-linux-gnu/4.0.0/f951
testcase_doubleincludedmodule.f90 -dumpbase testcase_doubleincludedmodule.f90
-da -mtune=pentiumpro -auxbase testcase_doubleincludedmodule -version -o
/tmp/ccoJeXiL.s
GNU F95 version 4.0.0 20040921 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.4.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed:  -mtune=pentiumpro -auxbase
options enabled:  -falign-loops -fargument-noalias-global
 -fbranch-count-reg -fcommon -feliminate-unused-debug-types -ffunction-cse
 -fgcse-las -fgcse-lm -fgcse-sm -fident -fivopts -fkeep-static-consts
 -fleading-underscore -floop-optimize2 -fmath-errno -fpcc-struct-return
 -fpeephole -fsched-interblock -fsched-spec -fsched-stalled-insns-dep
 -fsplit-ivs-in-unroller -ftrapping-math -ftree-loop-im
 -ftree-loop-optimize -fvar-tracking -fweb -fzero-initialized-in-bss
 -m80387 -mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387
 -maccumulate-outgoing-args -mno-red-zone -mtls-direct-seg-refs
 -mtune=pentiumpro -march=i386
testcase_doubleincludedmodule.f90:0: internal compiler error: Segmentation fault

!--------------------------- following sources ---------------------
MODULE inc_mod_definition

  INTEGER :: some_integer

END MODULE inc_mod_definition

!----------------------

MODULE  inc_mod_function
CONTAINS

SUBROUTINE some_function (real_vector)

   USE inc_mod_definition

   REAL   :: real_vector(some_integer)

 END SUBROUTINE SOME_FUNCTION

END MODULE inc_mod_function

!----------------------
PROGRAM testcase_doubleincludedmodule

   USE inc_mod_definition
   USE inc_mod_function

END PROGRAM testcase_doubleincludedmodule

!------------------------ END sources --------------------------------

-- 
           Summary: segfault  with multiply included module with
                    uninitialized vector
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: c dot lemmen at fz-juelich dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-linux-gnu


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


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