When trying to build some data processing stuff (using an interface for some median functions in a module), I get an "internal compiler error: Segmentation fault". This code snippet should *not* compile anyway (there being no median function taking two arguments) but I think a compiler segfault is a rather drastic way of telling me :-)
---------------- Command line: ---------------- gfortran -v -save-temps -c main.f90 -------------------- Compiler output: -------------------- Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/dwassel/Installationen/gcc-4.2.3/configure --prefix=/home/dwassel --program-suffix=-4.2.3 --enable-languages=c,c++,fortran --with-gmp=/home/dwassel --with-mpfr=/home/dwassel --with-arch=i686 --with-tune=i686 Thread model: posix gcc version 4.2.3 /localdata/bin/../libexec/gcc/i686-pc-linux-gnu/4.2.3/f951 main.f90 -quiet -dumpbase main.f90 -mtune=i686 -march=i686 -auxbase main -version -I /localdata/bin/../lib/gcc/i686-pc-linux-gnu/4.2.3/finclude -o main.s GNU F95 version 4.2.3 (i686-pc-linux-gnu) compiled by GNU C version 4.2.3. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 main.f90:46.9: data = median(rawData, work) 1 Error: There is no specific function for the generic 'median' at (1) main.f90:19: 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. ------------- My System: ------------- Linux version 2.6.18-6-k7 (Debian 2.6.18.dfsg.1-18etch1) ([EMAIL PROTECTED]) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Sun Feb 10 22:16:15 UTC 2008 --------------------------------------- The original source code (main.f90): --------------------------------------- MODULE auxiliary IMPLICIT NONE INTEGER, PARAMETER, PRIVATE :: dp = SELECTED_REAL_KIND(15) INTERFACE median MODULE PROCEDURE R_valmed, I_valmed, D_valmed END INTERFACE PUBLIC :: median PRIVATE :: R_valmed, I_valmed, D_valmed CONTAINS RECURSIVE FUNCTION D_valmed (XDONT) RESULT (res_med) Real (kind=dp), Dimension (:), Intent (In) :: XDONT Real (kind=dp) :: res_med res_med = 0.0d0 END FUNCTION D_valmed RECURSIVE FUNCTION R_valmed (XDONT) RESULT (res_med) Real, Dimension (:), Intent (In) :: XDONT Real :: res_med res_med = 0.0 END FUNCTION R_valmed RECURSIVE FUNCTION I_valmed (XDONT) RESULT (res_med) Integer, Dimension (:), Intent (In) :: XDONT Integer :: res_med res_med = 0 END FUNCTION I_valmed END MODULE auxiliary PROGRAM main USE auxiliary IMPLICIT NONE INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15) REAL(kind=dp) :: rawData(2), data, work(3) data = median(rawData, work) END PROGRAM main ------------------------------- -save-temp output (main.s): ------------------------------- .file "main.f90" .text .globl __auxiliary__i_valmed .type __auxiliary__i_valmed, @function __auxiliary__i_valmed: pushl %ebp movl %esp, %ebp subl $16, %esp movl $0, -4(%ebp) movl -4(%ebp), %eax leave ret .size __auxiliary__i_valmed, .-__auxiliary__i_valmed .globl __auxiliary__r_valmed .type __auxiliary__r_valmed, @function __auxiliary__r_valmed: pushl %ebp movl %esp, %ebp subl $20, %esp movl $0x00000000, %eax movl %eax, -4(%ebp) movl -4(%ebp), %eax movl %eax, -20(%ebp) flds -20(%ebp) leave ret .size __auxiliary__r_valmed, .-__auxiliary__r_valmed .globl __auxiliary__d_valmed .type __auxiliary__d_valmed, @function __auxiliary__d_valmed: pushl %ebp movl %esp, %ebp subl $16, %esp fldz fstpl -8(%ebp) fldl -8(%ebp) leave ret .size __auxiliary__d_valmed, .-__auxiliary__d_valmed -- Summary: internal compiler error: Segmentation fault Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dennis dot wassel at googlemail dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35478