This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49623] New: Segfault of "gfortran -L" if no argument follows the "-L"
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 4 Jul 2011 06:30:41 +0000
- Subject: [Bug fortran/49623] New: Segfault of "gfortran -L" if no argument follows the "-L"
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49623
Summary: Segfault of "gfortran -L" if no argument follows the
"-L"
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
While it works for the C driver:
$ gcc foo.c -L
gcc: error: missing argument to â-Lâ
the Fortran driver segfaults when there is no argument following the "-L"
argument:
$ gfortran foo.f90 -L
Segmentation fault
Valgrind shows:
==18481== Invalid read of size 1
==18481== at 0x4A06D82: strlen (mc_replace_strmem.c:275)
==18481== by 0x40E8BE: lang_specific_driver (gfortranspec.c:95)
==18481== by 0x405EBF: process_command (gcc.c:3637)
==18481== by 0x40B455: main (gcc.c:6263)
==18481== Address 0x0 is not stack'd, malloc'd or (recently) free'd