This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34722] compile results in "internal compiler error: segmentation fault" message
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2008 07:39:57 -0000
- Subject: [Bug fortran/34722] compile results in "internal compiler error: segmentation fault" message
- References: <bug-34722-14147@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from burnus at gcc dot gnu dot org 2008-01-09 07:39 -------
I don't get an segfault, but:
gamsana1.f90:1550.6:
SUBROUTINE INVENTNAMES(ROWNAM, COLNAM, RNAMLEN, CNAMLEN, M, N)
1
Reduced test case:
PROGRAM GAMSANAL
IMPLICIT NONE
INTEGER(4), ALLOCATABLE, DIMENSION(:) :: namI
CHARACTER, ALLOCATABLE, DIMENSION(:) :: namC
INTEGER IODICT, PROWNAM, PCOLNAM, PRNLEN, PCNLEN, M, N
LOGICAL DICEXIST
INQUIRE(UNIT=IODICT, EXIST=DICEXIST)
CALL INVENTNAMES(namC(PROWNAM), M, N)
end
SUBROUTINE INVENTNAMES(ROWNAM, M, N)
IMPLICIT NONE
INTEGER M,N
CHARACTER ROWNAM(16,M)
INTEGER RNAMLEN(M)
END SUBROUTINE
Removing the "N" argument, crashes GCC here; valgrind shows a huge number of
invalid reads, starting with:
==16951== Invalid read of size 1
==16951== at 0x473909: gfc_undo_symbols (symbol.c:2582)
==16951== by 0x452454: decode_statement (parse.c:122)
==16951== by 0x4530C4: next_statement (parse.c:505)
==16951== by 0x4563B1: gfc_parse_file (parse.c:3317)
==16951== by 0x47EF04: gfc_be_parse_file (f95-lang.c:260)
==16951== by 0x6F2314: toplev_main (toplev.c:1042)
==16951== by 0x52CEB29: (below main) (in /lib64/libc-2.6.1.so)
The reduced program works woth gfortran 4.2, which makes it a regression. (The
full program does not as %VAL is not supported by 4.2.)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34722