This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran 4.1.2: "internal compiler error: Segmentation fault"
- From: Bernhard Fischer <rep dot nop at aon dot at>
- To: Rob <spamrefuse at yahoo dot com>
- Cc: fortran at gcc dot gnu dot org, Paul THOMAS <paulthomas2 at wanadoo dot fr>
- Date: Sat, 30 Sep 2006 19:10:17 +0200
- Subject: Re: gfortran 4.1.2: "internal compiler error: Segmentation fault"
- References: <20060929224937.98295.qmail@web33301.mail.mud.yahoo.com>
On Fri, Sep 29, 2006 at 03:49:37PM -0700, Rob wrote:
>
>Hi,
>
>I have compile GCC 4.1.2 (prerelease) on an Alpha
>system with CentOS 4 (clone of Redhat Enterprise).
>
>The required file to reproduce this problem are
>here: http://surfion.snu.ac.kr/~lahaye/gcc/
Please reduce this to something that doesn't look like parts of vasp ;)
I compiled (and ran) a current vasp.4.6 with gfortran a while ago and
it did work fine.
I can confirm that, however, it currently fails for this reduced (and
not vasp related) testcase:
$ cat no.f90
MODULE MOD1
CONTAINS
SUBROUTINE SUB1(arg)
IMPLICIT NONE
CHARACTER (LEN=*), OPTIONAL :: arg
IF (PRESENT(arg)) WRITE(0,*) 'arg was ', arg
STOP
END SUBROUTINE SUB1
SUBROUTINE SUB2
CALL SUB1
END SUBROUTINE SUB2
END MODULE
$ gfortran-4.2-HEAD -c no.f90
no.f90: In function 'sub2':
no.f90:3: internal compiler error: Segmentation fault
Program received signal SIGSEGV, Segmentation fault.
0x080b78c1 in gfc_conv_function_call (se=0xaf82ce8c, sym=0x85df680,
arg=0x85be4e0) at ../../../src/gcc-4.2/gcc/fortran/trans-expr.c:2032
2032 if (fsym && fsym->ts.type == BT_CHARACTER
(gdb) bt
#0 0x080b78c1 in gfc_conv_function_call (se=0xaf82ce8c, sym=0x85df680,
arg=0x85be4e0) at ../../../src/gcc-4.2/gcc/fortran/trans-expr.c:2032
#1 0x080c9ca9 in gfc_trans_call (code=0x85e0460, dependency_check=0
'\0')
at ../../../src/gcc-4.2/gcc/fortran/trans-stmt.c:336
#2 0x080a50d5 in gfc_trans_code (code=0x85e0460)
at ../../../src/gcc-4.2/gcc/fortran/trans.c:509
#3 0x080b26bf in gfc_generate_function_code (ns=0x85e0080)
at ../../../src/gcc-4.2/gcc/fortran/trans-decl.c:3112
#4 0x080a4a2a in gfc_generate_module_code (ns=0x85def40)
at ../../../src/gcc-4.2/gcc/fortran/trans.c:685
#5 0x08085c33 in gfc_parse_file ()
at ../../../src/gcc-4.2/gcc/fortran/parse.c:3218
#6 0x080a4606 in gfc_be_parse_file (set_yydebug=0)
at ../../../src/gcc-4.2/gcc/fortran/f95-lang.c:303
#7 0x082f2cbd in toplev_main (argc=13, argv=0xaf82d124)
at ../../../src/gcc-4.2/gcc/toplev.c:1033
#8 0x080cd61a in main (argc=0, argv=0xc) at
../../../src/gcc-4.2/gcc/main.c:35
Looks like Paul (CCed) did touch that last spot recently at least on
trunk and may know what's going on.
thanks,