This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49623] Segfault of "gfortran -L" if no argument follows the "-L"
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 4 Jul 2011 11:04:56 +0000
- Subject: [Bug fortran/49623] Segfault of "gfortran -L" if no argument follows the "-L"
- Auto-submitted: auto-generated
- References: <bug-49623-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49623
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-07-04 11:04:36 UTC ---
On Mon, 4 Jul 2011, jakub at gcc dot gnu.org wrote:
> Created attachment 24666
> --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24666
> gcc47-pr49623.patch
>
> Untested fix. Unfortunately it is hard to create a dejagnu testcase for this,
> as lots of options are appended after dg-options.
I think it would be better to repeat the logic in the next loop (that
avoids looking in detail at options with CL_ERR_MISSING_ARG set) before
the switch statement in this loop, so that if any more options are added
to this loop that involve looking at the arguments it isn't necessary for
each to check individually for the case of a missing argument.